зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1449414 - Reorder nsCSSAnonBoxList.h. r=xidorn
Putting all the non-inheriting entries first means we don't have to play games at the inclusion sites. This is a small win now, but will help a lot with bug 1449395. MozReview-Commit-ID: JNt7yFKs6br --HG-- extra : rebase_source : 84ee0e78fc2c94f5bd73dbc35a8f27269a455ee3
This commit is contained in:
Родитель
cb4b451b23
Коммит
f437a6c4f5
|
@ -23,7 +23,8 @@
|
|||
*
|
||||
* CSS_NON_INHERITING_ANON_BOX is used for anon boxes that never inherit style
|
||||
* from anything. This means all their property values are the initial values
|
||||
* of those properties.
|
||||
* of those properties. These ones must come first! Code relies on this.
|
||||
* If this macro is not defined, it will default to CSS_ANON_BOX.
|
||||
*
|
||||
* CSS_WRAPPER_ANON_BOX is used for anon boxes that are used as wrappers around
|
||||
* other frames during frametree fixup (e.g. table anonymous boxes, ruby
|
||||
|
@ -51,13 +52,33 @@
|
|||
# define DEFINED_CSS_WRAPPER_ANON_BOX
|
||||
#endif /* CSS_WRAPPER_ANON_BOX */
|
||||
|
||||
// ::-moz-text, ::-moz-oof-placeholder, and ::-moz-first-letter-continuation are
|
||||
// non-elements which no rule will match.
|
||||
CSS_ANON_BOX(mozText, ":-moz-text")
|
||||
// placeholder frames for out of flows. Note that :-moz-placeholder is used for
|
||||
//---------------------------------------------------------------------------
|
||||
// Non-inheriting ones, which must come first
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Placeholder frames for out of flows. Note that :-moz-placeholder is used for
|
||||
// the pseudo-element that represents the placeholder text in <input
|
||||
// placeholder="foo">, so we need a different string here.
|
||||
CSS_NON_INHERITING_ANON_BOX(oofPlaceholder, ":-moz-oof-placeholder")
|
||||
|
||||
// Framesets
|
||||
CSS_NON_INHERITING_ANON_BOX(horizontalFramesetBorder, ":-moz-hframeset-border")
|
||||
CSS_NON_INHERITING_ANON_BOX(verticalFramesetBorder, ":-moz-vframeset-border")
|
||||
|
||||
CSS_NON_INHERITING_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
|
||||
|
||||
CSS_NON_INHERITING_ANON_BOX(tableColGroup, ":-moz-table-column-group")
|
||||
CSS_NON_INHERITING_ANON_BOX(tableCol, ":-moz-table-column")
|
||||
|
||||
CSS_NON_INHERITING_ANON_BOX(pageBreak, ":-moz-pagebreak")
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Other ones
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// ::-moz-text, ::-moz-oof-placeholder, and ::-moz-first-letter-continuation are
|
||||
// non-elements which no rule will match.
|
||||
CSS_ANON_BOX(mozText, ":-moz-text")
|
||||
// nsFirstLetterFrames for content outside the ::first-letter.
|
||||
CSS_ANON_BOX(firstLetterContinuation, ":-moz-first-letter-continuation")
|
||||
|
||||
|
@ -65,31 +86,23 @@ CSS_ANON_BOX(mozBlockInsideInlineWrapper, ":-moz-block-inside-inline-wrapper")
|
|||
CSS_WRAPPER_ANON_BOX(mozMathMLAnonymousBlock, ":-moz-mathml-anonymous-block")
|
||||
CSS_ANON_BOX(mozXULAnonymousBlock, ":-moz-xul-anonymous-block")
|
||||
|
||||
// Framesets
|
||||
CSS_NON_INHERITING_ANON_BOX(horizontalFramesetBorder, ":-moz-hframeset-border")
|
||||
CSS_NON_INHERITING_ANON_BOX(verticalFramesetBorder, ":-moz-vframeset-border")
|
||||
|
||||
CSS_ANON_BOX(mozLineFrame, ":-moz-line-frame")
|
||||
|
||||
CSS_ANON_BOX(buttonContent, ":-moz-button-content")
|
||||
CSS_ANON_BOX(cellContent, ":-moz-cell-content")
|
||||
CSS_ANON_BOX(dropDownList, ":-moz-dropdown-list")
|
||||
CSS_ANON_BOX(fieldsetContent, ":-moz-fieldset-content")
|
||||
CSS_NON_INHERITING_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
|
||||
CSS_ANON_BOX(mozDisplayComboboxControlFrame, ":-moz-display-comboboxcontrol-frame")
|
||||
CSS_ANON_BOX(htmlCanvasContent, ":-moz-html-canvas-content")
|
||||
|
||||
CSS_WRAPPER_ANON_BOX(inlineTable, ":-moz-inline-table")
|
||||
CSS_WRAPPER_ANON_BOX(table, ":-moz-table")
|
||||
CSS_WRAPPER_ANON_BOX(tableCell, ":-moz-table-cell")
|
||||
CSS_NON_INHERITING_ANON_BOX(tableColGroup, ":-moz-table-column-group")
|
||||
CSS_NON_INHERITING_ANON_BOX(tableCol, ":-moz-table-column")
|
||||
CSS_ANON_BOX(tableWrapper, ":-moz-table-wrapper")
|
||||
CSS_WRAPPER_ANON_BOX(tableRowGroup, ":-moz-table-row-group")
|
||||
CSS_WRAPPER_ANON_BOX(tableRow, ":-moz-table-row")
|
||||
|
||||
CSS_ANON_BOX(canvas, ":-moz-canvas")
|
||||
CSS_NON_INHERITING_ANON_BOX(pageBreak, ":-moz-pagebreak")
|
||||
CSS_ANON_BOX(page, ":-moz-page")
|
||||
CSS_ANON_BOX(pageContent, ":-moz-pagecontent")
|
||||
CSS_ANON_BOX(pageSequence, ":-moz-page-sequence")
|
||||
|
|
|
@ -39,21 +39,12 @@ MOZ_POP_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING
|
|||
#undef CSS_ANON_BOX
|
||||
|
||||
static const nsStaticAtomSetup sCSSAnonBoxAtomSetup[] = {
|
||||
// Put the non-inheriting anon boxes first, so we can index into them easily.
|
||||
#define CSS_ANON_BOX(name_, value_) /* nothing */
|
||||
#define CSS_NON_INHERITING_ANON_BOX(name_, value_) \
|
||||
NS_STATIC_ATOM_SUBCLASS_SETUP( \
|
||||
mozilla::detail::gCSSAnonBoxAtoms, nsCSSAnonBoxes, name_)
|
||||
#include "nsCSSAnonBoxList.h"
|
||||
#undef CSS_NON_INHERITING_ANON_BOX
|
||||
#undef CSS_ANON_BOX
|
||||
|
||||
// Non-inheriting boxes must come first in nsCSSAnonBoxList.h so that
|
||||
// `NonInheriting` values can index into this array and other similar arrays.
|
||||
#define CSS_ANON_BOX(name_, value_) \
|
||||
NS_STATIC_ATOM_SUBCLASS_SETUP( \
|
||||
mozilla::detail::gCSSAnonBoxAtoms, nsCSSAnonBoxes, name_)
|
||||
#define CSS_NON_INHERITING_ANON_BOX(name_, value_) /* nothing */
|
||||
#include "nsCSSAnonBoxList.h"
|
||||
#undef CSS_NON_INHERITING_ANON_BOX
|
||||
#undef CSS_ANON_BOX
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче