Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen

Differential Revision: https://phabricator.services.mozilla.com/D193673
This commit is contained in:
Adam Vandolder 2023-12-07 21:27:09 +00:00
Родитель 876bc6ccc6
Коммит 23775aed9b
4 изменённых файлов: 871 добавлений и 845 удалений

Просмотреть файл

@ -798,10 +798,12 @@ public final class AttributeName
public static final AttributeName LOADING = new AttributeName(ALL_NO_NS, "loading", "loading", "loading", "loading", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName READONLY = new AttributeName(ALL_NO_NS, "readonly", "readonly", "readonly", "readonly", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG | CASE_FOLDED | BOOLEAN);
public static final AttributeName RENDERING_INTENT = new AttributeName(ALL_NO_NS, "rendering-intent", "rendering-intent", "rendering-intent", "rendering-intent", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName SHADOWROOTMODE = new AttributeName(ALL_NO_NS, "shadowrootmode", "shadowrootmode", "shadowrootmode", "shadowrootmode", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName SEED = new AttributeName(ALL_NO_NS, "seed", "seed", "seed", "seed", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName SRCDOC = new AttributeName(ALL_NO_NS, "srcdoc", "srcdoc", "srcdoc", "srcdoc", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName STDDEVIATION = new AttributeName(ALL_NO_NS, "stddeviation", "stddeviation", "stdDeviation", "stddeviation", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName SANDBOX = new AttributeName(ALL_NO_NS, "sandbox", "sandbox", "sandbox", "sandbox", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName SHADOWROOTDELEGATESFOCUS = new AttributeName(ALL_NO_NS, "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName WORD_SPACING = new AttributeName(ALL_NO_NS, "word-spacing", "word-spacing", "word-spacing", "word-spacing", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName ACCENTUNDER = new AttributeName(ALL_NO_NS, "accentunder", "accentunder", "accentunder", "accentunder", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName ACCEPT_CHARSET = new AttributeName(ALL_NO_NS, "accept-charset", "accept-charset", "accept-charset", "accept-charset", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
@ -1192,36 +1194,36 @@ public final class AttributeName
public static final AttributeName RY = new AttributeName(ALL_NO_NS, "ry", "ry", "ry", "ry", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
public static final AttributeName REFY = new AttributeName(ALL_NO_NS, "refy", "refy", "refY", "refy", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
private final static @NoLength AttributeName[] ATTRIBUTE_NAMES = {
DECLARE,
CITE,
CHAR,
CELLSPACING,
CODETYPE,
ATTRIBUTENAME,
CLEAR,
HEIGHT,
COLOR_RENDERING,
FONT_SIZE,
ALIGNMENTSCOPE,
BGCOLOR,
FILTERUNITS,
ARIA_DISABLED,
OPACITY,
ONBEFOREPASTE,
ADDITIVE,
KERNELUNITLENGTH,
STROKE_MITERLIMIT,
KEYSPLINES,
ONCUT,
ONBEFORECOPY,
ACTION,
KERNELMATRIX,
STROKE_DASHOFFSET,
IS,
INPUTMODE,
Y,
ARIA_MULTISELECTABLE,
ROTATE,
SANDBOX,
NORESIZE,
SCHEME,
ARCHIVE,
VALIGN,
FRAME,
WHEN,
ONCONTEXTMENU,
KEYPOINTS,
ONDRAGLEAVE,
CONTENT,
TEXT_RENDERING,
STDDEVIATION,
MODE,
SUPERSCRIPTSHIFT,
TARGETX,
SCRIPTMINSIZE,
FORMAT,
TRANSFORM,
ONMOUSEOVER,
GLYPHREF,
OVERFLOW,
CONTENTEDITABLE,
STITCHTILES,
RX,
MIN,
K3,
@ -1230,30 +1232,30 @@ public final class AttributeName
LOCAL,
ONABORT,
HIDDEN,
BASEFREQUENCY,
INDEX,
ONREADYSTATECHANGE,
RULES,
ONAFTERPRINT,
LENGTHADJUST,
NOSHADE,
ONFINISH,
MARKER_START,
ROWLINES,
USEMAP,
POINTSATX,
XLINK_SHOW,
LQUOTE,
ONFOCUSOUT,
CLIP_PATH,
SLOPE,
ONDRAGOVER,
CROSSORIGIN,
ROWSPACING,
FONTSTYLE,
POSTER,
COLUMNSPAN,
ELEVATION,
ACCEPT,
ENTERKEYHINT,
OTHER,
REPEAT,
HREF,
LARGEOP,
MATHCOLOR,
MEDIA,
MARKER_END,
ONBLUR,
SYMMETRIC,
POINTER_EVENTS,
XMLNS,
FLOOD_COLOR,
ONFOCUS,
CLIP,
SCOPE,
ONDRAG,
COLSPAN,
PRESERVEASPECTRATIO,
FONTWEIGHT,
ONSTOP,
WIDTH,
VALUETYPE,
DY,
END,
SRC,
@ -1269,54 +1271,54 @@ public final class AttributeName
FETCHPRIORITY,
BORDER,
RENDERING_INTENT,
ACCESSKEY,
BASE,
EDGEMODE,
LABEL,
ONSELECT,
ORIENT,
ONKEYDOWN,
SELECTED,
TYPE,
ALIGN,
LANGUAGE,
PING,
METHOD,
ALTIMG,
DEFINITIONURL,
SCRIPTLEVEL,
MARKER_MID,
MASKCONTENTUNITS,
MAXLENGTH,
TITLE,
PROMPT,
IN,
ONEND,
STANDBY,
XLINK_ARCROLE,
AUTOFOCUS,
ENCODING,
ONMOUSEWHEEL,
ONMOUSEMOVE,
STROKE_LINECAP,
STROKE_OPACITY,
GLYPH_ORIENTATION_VERTICAL,
STEP,
WRAP,
NOWRAP,
ONERROR,
AXIS,
CLOSE,
OFFSET,
VERSION,
FONT_STRETCH,
FONT_VARIANT,
MULTIPLE,
PATTERNCONTENTUNITS,
TEXT,
COLUMNWIDTH,
REQUIREDEXTENSIONS,
DX,
ACCENTUNDER,
BASEPROFILE,
DATETIME,
INTEGRITY,
ONREPEAT,
ONBEGIN,
ONKEYUP,
REPEATCOUNT,
SELECTION,
SURFACESCALE,
IMAGESRCSET,
MARGINWIDTH,
LIGHTING_COLOR,
PATHLENGTH,
DOMINANT_BASELINE,
RADIOGROUP,
BACKGROUND,
MASKUNITS,
FILL,
STYLE,
FROM,
ASYNC,
OPEN,
POINTSATZ,
XLINK_TITLE,
AUTOPLAY,
COLOR,
NOMODULE,
ONCOPY,
TO,
SCROLLING,
DISPLAY,
PROPERTY,
STOP_OPACITY,
CHAROFF,
ONDROP,
START,
CURSOR,
MAXSIZE,
SRCSET,
DEPTH,
FONTFAMILY,
LETTER_SPACING,
PATTERN,
TEXT_ANCHOR,
COLUMNALIGN,
REQUIREDFEATURES,
VIEWBOX,
BY,
RY,
DIR,
@ -1346,103 +1348,103 @@ public final class AttributeName
SPECULAREXPONENT,
GRADIENTTRANSFORM,
LOADING,
SRCDOC,
ACCENTUNDER,
ACCEPT,
BASEPROFILE,
CODETYPE,
DATETIME,
ENTERKEYHINT,
INTEGRITY,
MODE,
ONREPEAT,
OTHER,
ONBEGIN,
ONBEFORECOPY,
ONKEYUP,
REPEAT,
REPEATCOUNT,
SUPERSCRIPTSHIFT,
SELECTION,
HREF,
SURFACESCALE,
ALIGNMENTSCOPE,
IMAGESRCSET,
LARGEOP,
MARGINWIDTH,
TARGETX,
LIGHTING_COLOR,
MATHCOLOR,
PATHLENGTH,
ACTION,
DOMINANT_BASELINE,
MEDIA,
RADIOGROUP,
SCRIPTMINSIZE,
BACKGROUND,
MARKER_END,
MASKUNITS,
CELLSPACING,
FILL,
ONBLUR,
STYLE,
FORMAT,
FROM,
SYMMETRIC,
ASYNC,
KERNELMATRIX,
OPEN,
POINTER_EVENTS,
POINTSATZ,
TRANSFORM,
XLINK_TITLE,
XMLNS,
AUTOPLAY,
BGCOLOR,
COLOR,
FLOOD_COLOR,
NOMODULE,
ONMOUSEOVER,
ONCOPY,
ONFOCUS,
TO,
STROKE_DASHOFFSET,
SCROLLING,
CLIP,
DISPLAY,
GLYPHREF,
PROPERTY,
SCOPE,
STOP_OPACITY,
ATTRIBUTENAME,
CHAROFF,
ONDRAG,
ONDROP,
OVERFLOW,
START,
COLSPAN,
CURSOR,
IS,
MAXSIZE,
PRESERVEASPECTRATIO,
SRCSET,
CONTENTEDITABLE,
DEPTH,
FONTWEIGHT,
FONTFAMILY,
FILTERUNITS,
LETTER_SPACING,
ONSTOP,
PATTERN,
STITCHTILES,
TEXT_ANCHOR,
WIDTH,
COLUMNALIGN,
INPUTMODE,
REQUIREDFEATURES,
VALUETYPE,
VIEWBOX,
FX,
SEED,
SHADOWROOTDELEGATESFOCUS,
ACCESSKEY,
BASEFREQUENCY,
BASE,
CITE,
EDGEMODE,
INDEX,
LABEL,
NORESIZE,
ONSELECT,
ONREADYSTATECHANGE,
ORIENT,
ONBEFOREPASTE,
ONKEYDOWN,
RULES,
SELECTED,
SCHEME,
TYPE,
ONAFTERPRINT,
ALIGN,
HEIGHT,
LANGUAGE,
LENGTHADJUST,
PING,
ARCHIVE,
METHOD,
NOSHADE,
ALTIMG,
ADDITIVE,
DEFINITIONURL,
ONFINISH,
SCRIPTLEVEL,
VALIGN,
MARKER_MID,
MARKER_START,
MASKCONTENTUNITS,
DECLARE,
MAXLENGTH,
ROWLINES,
TITLE,
FRAME,
PROMPT,
USEMAP,
IN,
KERNELUNITLENGTH,
ONEND,
POINTSATX,
STANDBY,
WHEN,
XLINK_ARCROLE,
XLINK_SHOW,
AUTOFOCUS,
COLOR_RENDERING,
ENCODING,
LQUOTE,
ONMOUSEWHEEL,
ONCONTEXTMENU,
ONMOUSEMOVE,
ONFOCUSOUT,
STROKE_LINECAP,
STROKE_MITERLIMIT,
STROKE_OPACITY,
CLIP_PATH,
GLYPH_ORIENTATION_VERTICAL,
KEYPOINTS,
STEP,
SLOPE,
WRAP,
CHAR,
NOWRAP,
ONDRAGOVER,
ONERROR,
ONDRAGLEAVE,
AXIS,
CROSSORIGIN,
CLOSE,
KEYSPLINES,
OFFSET,
ROWSPACING,
VERSION,
CONTENT,
FONT_STRETCH,
FONTSTYLE,
FONT_VARIANT,
FONT_SIZE,
MULTIPLE,
POSTER,
PATTERNCONTENTUNITS,
TEXT_RENDERING,
TEXT,
COLUMNSPAN,
COLUMNWIDTH,
ONCUT,
REQUIREDEXTENSIONS,
ELEVATION,
DX,
REFX,
CY,
FY,
@ -1501,8 +1503,9 @@ public final class AttributeName
GRADIENTUNITS,
HEADERS,
READONLY,
SEED,
STDDEVIATION,
SHADOWROOTMODE,
SRCDOC,
SANDBOX,
WORD_SPACING,
ACCEPT_CHARSET,
ACCENT,
@ -1693,38 +1696,39 @@ public final class AttributeName
VALUE,
VIEWTARGET,
CX,
FX,
};
private final static int[] ATTRIBUTE_HASHES = {
1866496199,
1748566068,
1966384692,
1865910331,
1748503880,
1965512429,
1681174213,
1784574102,
1916247343,
2001898809,
1781007934,
1915757815,
2001826027,
1680165421,
1721347639,
1754860061,
1814656840,
1903759600,
1924583073,
1987422362,
2023342821,
1754835516,
1814560070,
1903612236,
1924517489,
1984430082,
2019887833,
71827457,
1680282148,
1689324870,
1740130375,
1754434872,
1756836998,
1797886599,
1825437894,
1884246821,
1909819252,
1922566877,
1937336473,
1972996699,
2000160071,
2009041198,
1740119884,
1753550036,
1756762256,
1791068279,
1824159037,
1884079398,
1908462185,
1922413307,
1934970504,
1972922984,
2000096287,
2008401563,
2073034754,
57205395,
911736834,
@ -1733,30 +1737,30 @@ public final class AttributeName
1685882101,
1704526375,
1734182982,
1747800157,
1751507685,
1754647074,
1756219733,
1771569964,
1786851500,
1804405895,
1821958888,
1854466380,
1873656984,
1891937366,
1906419001,
1910527802,
1921061206,
1922679610,
1933123337,
1941440197,
1972744954,
1983290011,
1991220282,
2001669449,
2006824246,
2016711994,
2034765641,
1747479606,
1749549708,
1754644293,
1756147974,
1767725700,
1786775671,
1804081401,
1820727381,
1854366938,
1872343590,
1890996553,
1906408542,
1910503637,
1917857531,
1922677495,
1932959284,
1941435445,
1972656710,
1983157559,
1990107683,
2001634458,
2006459190,
2010716309,
2026893641,
2082471938,
53006051,
60345635,
@ -1772,54 +1776,54 @@ public final class AttributeName
1716623661,
1731048742,
1739583824,
1747309881,
1748021284,
1749350104,
1753049109,
1754612424,
1754794646,
1754927689,
1756704824,
1757421892,
1780879045,
1786622296,
1788842244,
1804054854,
1814517574,
1816178925,
1823829083,
1854285018,
1854497008,
1871251689,
1874788501,
1889569526,
1900544002,
1905754853,
1907701479,
1910441773,
1915341049,
1917295176,
1922400908,
1922665179,
1924443742,
1924773438,
1934917290,
1941286708,
1943317364,
1972151670,
1972908839,
1982254612,
1983432389,
1989522022,
1993343287,
2001527900,
2001732764,
2005342360,
2007064819,
2009231684,
2017010843,
2024794274,
2065694722,
1747295467,
1747906667,
1748971848,
1751755561,
1754579720,
1754698327,
1754899031,
1756360955,
1756889417,
1773606972,
1785053243,
1787365531,
1803561214,
1805715690,
1816104145,
1823574314,
1848600826,
1854497001,
1867462756,
1874270021,
1884295780,
1898415413,
1905628916,
1906423097,
1910441627,
1915025672,
1916286197,
1921977416,
1922607670,
1923088386,
1924629705,
1933369607,
1939976792,
1941550652,
1966442279,
1972904518,
1975062341,
1983398182,
1988784439,
1991625270,
2000752725,
2001710298,
2004846654,
2007021895,
2009079867,
2016810187,
2024647008,
2060474743,
2081423362,
2089811970,
52488851,
@ -1849,103 +1853,103 @@ public final class AttributeName
1723336432,
1733874289,
1736416327,
1740096054,
1747295467,
1747479606,
1747906667,
1748503880,
1748971848,
1749549708,
1751755561,
1753550036,
1754579720,
1754644293,
1754698327,
1754835516,
1754899031,
1756147974,
1756360955,
1756762256,
1756889417,
1767725700,
1773606972,
1781007934,
1785053243,
1786775671,
1787365531,
1791068279,
1803561214,
1804081401,
1805715690,
1814560070,
1816104145,
1820727381,
1823574314,
1824159037,
1848600826,
1854366938,
1854497001,
1865910331,
1867462756,
1872343590,
1874270021,
1884079398,
1884295780,
1890996553,
1898415413,
1903612236,
1905628916,
1906408542,
1906423097,
1908462185,
1910441627,
1910503637,
1915025672,
1915757815,
1916286197,
1917857531,
1921977416,
1922413307,
1922607670,
1922677495,
1923088386,
1924517489,
1924629705,
1932959284,
1933369607,
1934970504,
1939976792,
1941435445,
1941550652,
1965512429,
1966442279,
1972656710,
1972904518,
1972922984,
1975062341,
1983157559,
1983398182,
1984430082,
1988784439,
1990107683,
1991625270,
2000096287,
2000752725,
2001634458,
2001710298,
2001826027,
2004846654,
2006459190,
2007021895,
2008401563,
2009079867,
2010716309,
2016810187,
2019887833,
2024647008,
2026893641,
2060474743,
2066743298,
1739927860,
1740222216,
1747309881,
1747800157,
1748021284,
1748566068,
1749350104,
1751507685,
1753049109,
1754434872,
1754612424,
1754647074,
1754794646,
1754860061,
1754927689,
1756219733,
1756704824,
1756836998,
1757421892,
1771569964,
1780879045,
1784574102,
1786622296,
1786851500,
1788842244,
1797886599,
1804054854,
1804405895,
1814517574,
1814656840,
1816178925,
1821958888,
1823829083,
1825437894,
1854285018,
1854466380,
1854497008,
1866496199,
1871251689,
1873656984,
1874788501,
1884246821,
1889569526,
1891937366,
1900544002,
1903759600,
1905754853,
1906419001,
1907701479,
1909819252,
1910441773,
1910527802,
1915341049,
1916247343,
1917295176,
1921061206,
1922400908,
1922566877,
1922665179,
1922679610,
1924443742,
1924583073,
1924773438,
1933123337,
1934917290,
1937336473,
1941286708,
1941440197,
1943317364,
1966384692,
1972151670,
1972744954,
1972908839,
1972996699,
1982254612,
1983290011,
1983432389,
1987422362,
1989522022,
1991220282,
1993343287,
2000160071,
2001527900,
2001669449,
2001732764,
2001898809,
2005342360,
2006824246,
2007064819,
2009041198,
2009231684,
2016711994,
2017010843,
2023342821,
2024794274,
2034765641,
2065694722,
2075005220,
2081947650,
2083520514,
@ -2004,8 +2008,9 @@ public final class AttributeName
1733919469,
1734404167,
1739561208,
1739927860,
1740119884,
1739914974,
1740096054,
1740130375,
1742183484,
1747299630,
1747446838,
@ -2196,5 +2201,6 @@ public final class AttributeName
2026975253,
2060302634,
2065170434,
2066743298,
};
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -281,10 +281,12 @@ class nsHtml5AttributeName {
static nsHtml5AttributeName* ATTR_LOADING;
static nsHtml5AttributeName* ATTR_READONLY;
static nsHtml5AttributeName* ATTR_RENDERING_INTENT;
static nsHtml5AttributeName* ATTR_SHADOWROOTMODE;
static nsHtml5AttributeName* ATTR_SEED;
static nsHtml5AttributeName* ATTR_SRCDOC;
static nsHtml5AttributeName* ATTR_STDDEVIATION;
static nsHtml5AttributeName* ATTR_SANDBOX;
static nsHtml5AttributeName* ATTR_SHADOWROOTDELEGATESFOCUS;
static nsHtml5AttributeName* ATTR_WORD_SPACING;
static nsHtml5AttributeName* ATTR_ACCENTUNDER;
static nsHtml5AttributeName* ATTR_ACCEPT_CHARSET;

Просмотреть файл

@ -39,8 +39,12 @@ HTML_PARSER_ATOMS = [
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("rendering_intent", "rendering-intent"),
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("shadowrootmode", "shadowrootmode"),
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("stddeviation", "stddeviation"),
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("shadowrootdelegatesfocus", "shadowrootdelegatesfocus"),
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("basefrequency", "basefrequency"),
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
Atom("baseprofile", "baseprofile"),