diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2019-06-26 01:51:45 +0300 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2019-06-26 01:51:45 +0300 |
commit | 00812e30dfa70f9b1a752cf0d09de00f6d401c85 (patch) | |
tree | e7eec9b55dd4e5825d3196f196c7f981be56e17a /layout/xul | |
parent | d7359c38b197c221c43def1e24cb48d4aee51bba (diff) | |
download | uxp-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.gz |
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.
Diffstat (limited to 'layout/xul')
-rw-r--r-- | layout/xul/nsBox.cpp | 7 | ||||
-rw-r--r-- | layout/xul/nsMenuFrame.cpp | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/layout/xul/nsBox.cpp b/layout/xul/nsBox.cpp index f7ec5fead4..787758b157 100644 --- a/layout/xul/nsBox.cpp +++ b/layout/xul/nsBox.cpp @@ -144,10 +144,9 @@ nsBox::BeginXULLayout(nsBoxLayoutState& aState) // Another copy-over from ReflowInput. // Since we are in reflow, we don't need to store these properties anymore. - FrameProperties props = Properties(); - props.Delete(UsedBorderProperty()); - props.Delete(UsedPaddingProperty()); - props.Delete(UsedMarginProperty()); + DeleteProperty(UsedBorderProperty()); + DeleteProperty(UsedPaddingProperty()); + DeleteProperty(UsedMarginProperty()); #ifdef DEBUG_LAYOUT PropagateDebug(aState); diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index ea968fab5a..67fcdbe431 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -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; } |