Bug 1362907 - Make select use nsHTMLButtonControlFrame for layout. r=jfkthame,dholbert

This simplifies our combobox code a bit more:

 * Reflow() is only needed to compute the label isize.
 * Frame construction uses a setup more similar to <input type=file> to
   get the right frame tree, removing a bunch of special code.
 * Lots of special code removed all over the place.

Differential Revision: https://phabricator.services.mozilla.com/D203010
This commit is contained in:
Emilio Cobos Álvarez
2024-02-29 11:15:52 +00:00
parent a4bb89e1a9
commit 14c69b2672
22 changed files with 308 additions and 940 deletions

View File

@@ -55,13 +55,8 @@ FRAME_CLASSES = [
Frame("nsColorControlFrame", "ColorControl", REPLACED_WITH_BLOCK | LEAF),
Frame("nsColumnSetFrame", "ColumnSet", COMMON),
Frame("ColumnSetWrapperFrame", "ColumnSetWrapper", BLOCK),
Frame("nsComboboxControlFrame", "ComboboxControl", BLOCK | REPLACED_WITH_BLOCK),
# FIXME(emilio, bug 1362907): Revisit these after that bug, this is the
# only frame that has ReplacedContainsBlock but not Replaced, which is
# sketchy.
Frame(
"nsComboboxDisplayFrame", "ComboboxDisplay", REPLACED_WITH_BLOCK - {"Replaced"}
),
Frame("nsComboboxControlFrame", "ComboboxControl", REPLACED_WITH_BLOCK | LEAF),
Frame("ComboboxLabelFrame", "Block", BLOCK),
Frame("nsContinuingTextFrame", "Text", TEXT),
Frame("nsDateTimeControlFrame", "DateTimeControl", REPLACED_WITH_BLOCK),
Frame("nsFieldSetFrame", "FieldSet", BLOCK),