import changes from win7-7/UXP:

bug1347737, bug1365982, bug1367206
This commit is contained in:
Roy Tam 2019-06-29 06:38:51 +08:00
commit 0f035317a3
96 changed files with 1525 additions and 1329 deletions

View file

@ -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);

View file

@ -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;
}