Bug 1790920 - Remove nsButtonBoxFrame. r=smaug

Create XULButtonElement instead to do the event handling. Pretty much a
straight port, this allows these elements to respect CSS display
properly (and use modern flexbox rather than old XUL layout).

Differential Revision: https://phabricator.services.mozilla.com/D157509
This commit is contained in:
Emilio Cobos Álvarez
2022-09-19 17:02:37 +00:00
parent 27061e8c18
commit 1d46b07024
16 changed files with 221 additions and 311 deletions

View File

@@ -225,8 +225,6 @@ nsIFrame* NS_NewImageBoxFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewTextBoxFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewButtonBoxFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewSplitterFrame(PresShell* aPresShell, ComputedStyle* aStyle);
nsIFrame* NS_NewMenuPopupFrame(PresShell* aPresShell, ComputedStyle* aStyle);
@@ -4104,11 +4102,6 @@ nsCSSFrameConstructor::FindXULTagData(const Element& aElement,
MOZ_ASSERT(aElement.IsXULElement());
static constexpr FrameConstructionDataByTag sXULTagData[] = {
SCROLLABLE_XUL_CREATE(thumb, NS_NewButtonBoxFrame),
SCROLLABLE_XUL_CREATE(checkbox, NS_NewButtonBoxFrame),
SCROLLABLE_XUL_CREATE(radio, NS_NewButtonBoxFrame),
SCROLLABLE_XUL_CREATE(toolbarpaletteitem, NS_NewBoxFrame),
SCROLLABLE_XUL_CREATE(treecolpicker, NS_NewButtonBoxFrame),
SIMPLE_XUL_CREATE(image, NS_NewImageBoxFrame),
SIMPLE_XUL_CREATE(spacer, NS_NewLeafBoxFrame),
SIMPLE_XUL_CREATE(treechildren, NS_NewTreeBodyFrame),
@@ -4170,9 +4163,7 @@ nsCSSFrameConstructor::FindXULButtonData(const Element& aElement,
}
#endif
static constexpr FrameConstructionData sXULButtonData =
SCROLLABLE_XUL_FCDATA(NS_NewButtonBoxFrame);
return &sXULButtonData;
return nullptr;
}
/* static */