mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
This commit is contained in:
parent
c135831979
commit
922e819d1c
62 changed files with 738 additions and 945 deletions
|
|
@ -273,7 +273,7 @@ nsMenuFrame::GetPopupList() const
|
|||
if (!HasPopup()) {
|
||||
return nullptr;
|
||||
}
|
||||
nsFrameList* prop = Properties().Get(PopupListProperty());
|
||||
nsFrameList* prop = GetProperty(PopupListProperty());
|
||||
NS_ASSERTION(prop && prop->GetLength() == 1 &&
|
||||
prop->FirstChild()->GetType() == nsGkAtoms::menuPopupFrame,
|
||||
"popup list should have exactly one nsMenuPopupFrame");
|
||||
|
|
@ -284,7 +284,7 @@ void
|
|||
nsMenuFrame::DestroyPopupList()
|
||||
{
|
||||
NS_ASSERTION(HasPopup(), "huh?");
|
||||
nsFrameList* prop = Properties().Remove(PopupListProperty());
|
||||
nsFrameList* prop = RemoveProperty(PopupListProperty());
|
||||
NS_ASSERTION(prop && prop->IsEmpty(),
|
||||
"popup list must exist and be empty when destroying");
|
||||
RemoveStateBits(NS_STATE_MENU_HAS_POPUP_LIST);
|
||||
|
|
@ -300,7 +300,7 @@ nsMenuFrame::SetPopupFrame(nsFrameList& aFrameList)
|
|||
// Remove the frame from the list and store it in a nsFrameList* property.
|
||||
aFrameList.RemoveFrame(popupFrame);
|
||||
nsFrameList* popupList = new (PresContext()->PresShell()) nsFrameList(popupFrame, popupFrame);
|
||||
Properties().Set(PopupListProperty(), popupList);
|
||||
SetProperty(PopupListProperty(), popupList);
|
||||
AddStateBits(NS_STATE_MENU_HAS_POPUP_LIST);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue