mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
Tests/LibWeb: Print properties without indexes
The test CSSStyleDeclaration-has-indexed-property-getter is a frequent source of merge conflicts between PRs that are adding to or otherwise modifying the list of supported CSS properties. This is primarily because the test prints out a numeric index of each property along with the property. As far as I can tell the indexes are inconsequential for what the test is trying to verify. So lets modify the printout to only contain the properties without indexes.
This commit is contained in:
parent
3ba6d129df
commit
417f4edc46
Notes:
github-actions[bot]
2025-06-01 18:10:16 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 417f4edc46
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4954
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 251 additions and 252 deletions
|
@ -1,248 +1,248 @@
|
|||
All properties associated with getComputedStyle(document.body):
|
||||
{
|
||||
"0": "-webkit-text-fill-color",
|
||||
"1": "accent-color",
|
||||
"2": "border-collapse",
|
||||
"3": "border-spacing",
|
||||
"4": "caption-side",
|
||||
"5": "caret-color",
|
||||
"6": "clip-rule",
|
||||
"7": "color",
|
||||
"8": "color-scheme",
|
||||
"9": "cursor",
|
||||
"10": "direction",
|
||||
"11": "fill",
|
||||
"12": "fill-opacity",
|
||||
"13": "fill-rule",
|
||||
"14": "font-family",
|
||||
"15": "font-feature-settings",
|
||||
"16": "font-language-override",
|
||||
"17": "font-size",
|
||||
"18": "font-style",
|
||||
"19": "font-variant-alternates",
|
||||
"20": "font-variant-caps",
|
||||
"21": "font-variant-east-asian",
|
||||
"22": "font-variant-emoji",
|
||||
"23": "font-variant-ligatures",
|
||||
"24": "font-variant-numeric",
|
||||
"25": "font-variant-position",
|
||||
"26": "font-variation-settings",
|
||||
"27": "font-weight",
|
||||
"28": "font-width",
|
||||
"29": "image-rendering",
|
||||
"30": "letter-spacing",
|
||||
"31": "line-height",
|
||||
"32": "list-style-image",
|
||||
"33": "list-style-position",
|
||||
"34": "list-style-type",
|
||||
"35": "math-depth",
|
||||
"36": "math-shift",
|
||||
"37": "math-style",
|
||||
"38": "pointer-events",
|
||||
"39": "quotes",
|
||||
"40": "stroke",
|
||||
"41": "stroke-dasharray",
|
||||
"42": "stroke-dashoffset",
|
||||
"43": "stroke-linecap",
|
||||
"44": "stroke-linejoin",
|
||||
"45": "stroke-miterlimit",
|
||||
"46": "stroke-opacity",
|
||||
"47": "stroke-width",
|
||||
"48": "tab-size",
|
||||
"49": "text-align",
|
||||
"50": "text-anchor",
|
||||
"51": "text-decoration-line",
|
||||
"52": "text-indent",
|
||||
"53": "text-justify",
|
||||
"54": "text-shadow",
|
||||
"55": "text-transform",
|
||||
"56": "text-wrap-mode",
|
||||
"57": "visibility",
|
||||
"58": "white-space-collapse",
|
||||
"59": "word-break",
|
||||
"60": "word-spacing",
|
||||
"61": "word-wrap",
|
||||
"62": "writing-mode",
|
||||
"63": "align-content",
|
||||
"64": "align-items",
|
||||
"65": "align-self",
|
||||
"66": "animation-delay",
|
||||
"67": "animation-direction",
|
||||
"68": "animation-duration",
|
||||
"69": "animation-fill-mode",
|
||||
"70": "animation-iteration-count",
|
||||
"71": "animation-name",
|
||||
"72": "animation-play-state",
|
||||
"73": "animation-timing-function",
|
||||
"74": "appearance",
|
||||
"75": "aspect-ratio",
|
||||
"76": "backdrop-filter",
|
||||
"77": "background-attachment",
|
||||
"78": "background-blend-mode",
|
||||
"79": "background-clip",
|
||||
"80": "background-color",
|
||||
"81": "background-image",
|
||||
"82": "background-origin",
|
||||
"83": "background-position-x",
|
||||
"84": "background-position-y",
|
||||
"85": "background-repeat",
|
||||
"86": "background-size",
|
||||
"87": "block-size",
|
||||
"88": "border-block-end-color",
|
||||
"89": "border-block-end-style",
|
||||
"90": "border-block-end-width",
|
||||
"91": "border-block-start-color",
|
||||
"92": "border-block-start-style",
|
||||
"93": "border-block-start-width",
|
||||
"94": "border-bottom-color",
|
||||
"95": "border-bottom-left-radius",
|
||||
"96": "border-bottom-right-radius",
|
||||
"97": "border-bottom-style",
|
||||
"98": "border-bottom-width",
|
||||
"99": "border-inline-end-color",
|
||||
"100": "border-inline-end-style",
|
||||
"101": "border-inline-end-width",
|
||||
"102": "border-inline-start-color",
|
||||
"103": "border-inline-start-style",
|
||||
"104": "border-inline-start-width",
|
||||
"105": "border-left-color",
|
||||
"106": "border-left-style",
|
||||
"107": "border-left-width",
|
||||
"108": "border-right-color",
|
||||
"109": "border-right-style",
|
||||
"110": "border-right-width",
|
||||
"111": "border-top-color",
|
||||
"112": "border-top-left-radius",
|
||||
"113": "border-top-right-radius",
|
||||
"114": "border-top-style",
|
||||
"115": "border-top-width",
|
||||
"116": "bottom",
|
||||
"117": "box-shadow",
|
||||
"118": "box-sizing",
|
||||
"119": "clear",
|
||||
"120": "clip",
|
||||
"121": "clip-path",
|
||||
"122": "column-count",
|
||||
"123": "column-gap",
|
||||
"124": "column-span",
|
||||
"125": "column-width",
|
||||
"126": "contain",
|
||||
"127": "content",
|
||||
"128": "content-visibility",
|
||||
"129": "counter-increment",
|
||||
"130": "counter-reset",
|
||||
"131": "counter-set",
|
||||
"132": "cx",
|
||||
"133": "cy",
|
||||
"134": "display",
|
||||
"135": "filter",
|
||||
"136": "flex-basis",
|
||||
"137": "flex-direction",
|
||||
"138": "flex-grow",
|
||||
"139": "flex-shrink",
|
||||
"140": "flex-wrap",
|
||||
"141": "float",
|
||||
"142": "grid-auto-columns",
|
||||
"143": "grid-auto-flow",
|
||||
"144": "grid-auto-rows",
|
||||
"145": "grid-column-end",
|
||||
"146": "grid-column-start",
|
||||
"147": "grid-row-end",
|
||||
"148": "grid-row-start",
|
||||
"149": "grid-template-areas",
|
||||
"150": "grid-template-columns",
|
||||
"151": "grid-template-rows",
|
||||
"152": "height",
|
||||
"153": "inline-size",
|
||||
"154": "inset-block-end",
|
||||
"155": "inset-block-start",
|
||||
"156": "inset-inline-end",
|
||||
"157": "inset-inline-start",
|
||||
"158": "isolation",
|
||||
"159": "justify-content",
|
||||
"160": "justify-items",
|
||||
"161": "justify-self",
|
||||
"162": "left",
|
||||
"163": "margin-block-end",
|
||||
"164": "margin-block-start",
|
||||
"165": "margin-bottom",
|
||||
"166": "margin-inline-end",
|
||||
"167": "margin-inline-start",
|
||||
"168": "margin-left",
|
||||
"169": "margin-right",
|
||||
"170": "margin-top",
|
||||
"171": "mask-image",
|
||||
"172": "mask-type",
|
||||
"173": "max-block-size",
|
||||
"174": "max-height",
|
||||
"175": "max-inline-size",
|
||||
"176": "max-width",
|
||||
"177": "min-block-size",
|
||||
"178": "min-height",
|
||||
"179": "min-inline-size",
|
||||
"180": "min-width",
|
||||
"181": "mix-blend-mode",
|
||||
"182": "object-fit",
|
||||
"183": "object-position",
|
||||
"184": "opacity",
|
||||
"185": "order",
|
||||
"186": "outline-color",
|
||||
"187": "outline-offset",
|
||||
"188": "outline-style",
|
||||
"189": "outline-width",
|
||||
"190": "overflow-x",
|
||||
"191": "overflow-y",
|
||||
"192": "padding-block-end",
|
||||
"193": "padding-block-start",
|
||||
"194": "padding-bottom",
|
||||
"195": "padding-inline-end",
|
||||
"196": "padding-inline-start",
|
||||
"197": "padding-left",
|
||||
"198": "padding-right",
|
||||
"199": "padding-top",
|
||||
"200": "position",
|
||||
"201": "r",
|
||||
"202": "right",
|
||||
"203": "rotate",
|
||||
"204": "row-gap",
|
||||
"205": "rx",
|
||||
"206": "ry",
|
||||
"207": "scale",
|
||||
"208": "scrollbar-gutter",
|
||||
"209": "scrollbar-width",
|
||||
"210": "stop-color",
|
||||
"211": "stop-opacity",
|
||||
"212": "table-layout",
|
||||
"213": "text-decoration-color",
|
||||
"214": "text-decoration-style",
|
||||
"215": "text-decoration-thickness",
|
||||
"216": "text-overflow",
|
||||
"217": "top",
|
||||
"218": "touch-action",
|
||||
"219": "transform",
|
||||
"220": "transform-box",
|
||||
"221": "transform-origin",
|
||||
"222": "transition-behavior",
|
||||
"223": "transition-delay",
|
||||
"224": "transition-duration",
|
||||
"225": "transition-property",
|
||||
"226": "transition-timing-function",
|
||||
"227": "translate",
|
||||
"228": "unicode-bidi",
|
||||
"229": "user-select",
|
||||
"230": "vertical-align",
|
||||
"231": "view-transition-name",
|
||||
"232": "white-space-trim",
|
||||
"233": "width",
|
||||
"234": "x",
|
||||
"235": "y",
|
||||
"236": "z-index"
|
||||
}
|
||||
[
|
||||
"-webkit-text-fill-color",
|
||||
"accent-color",
|
||||
"border-collapse",
|
||||
"border-spacing",
|
||||
"caption-side",
|
||||
"caret-color",
|
||||
"clip-rule",
|
||||
"color",
|
||||
"color-scheme",
|
||||
"cursor",
|
||||
"direction",
|
||||
"fill",
|
||||
"fill-opacity",
|
||||
"fill-rule",
|
||||
"font-family",
|
||||
"font-feature-settings",
|
||||
"font-language-override",
|
||||
"font-size",
|
||||
"font-style",
|
||||
"font-variant-alternates",
|
||||
"font-variant-caps",
|
||||
"font-variant-east-asian",
|
||||
"font-variant-emoji",
|
||||
"font-variant-ligatures",
|
||||
"font-variant-numeric",
|
||||
"font-variant-position",
|
||||
"font-variation-settings",
|
||||
"font-weight",
|
||||
"font-width",
|
||||
"image-rendering",
|
||||
"letter-spacing",
|
||||
"line-height",
|
||||
"list-style-image",
|
||||
"list-style-position",
|
||||
"list-style-type",
|
||||
"math-depth",
|
||||
"math-shift",
|
||||
"math-style",
|
||||
"pointer-events",
|
||||
"quotes",
|
||||
"stroke",
|
||||
"stroke-dasharray",
|
||||
"stroke-dashoffset",
|
||||
"stroke-linecap",
|
||||
"stroke-linejoin",
|
||||
"stroke-miterlimit",
|
||||
"stroke-opacity",
|
||||
"stroke-width",
|
||||
"tab-size",
|
||||
"text-align",
|
||||
"text-anchor",
|
||||
"text-decoration-line",
|
||||
"text-indent",
|
||||
"text-justify",
|
||||
"text-shadow",
|
||||
"text-transform",
|
||||
"text-wrap-mode",
|
||||
"visibility",
|
||||
"white-space-collapse",
|
||||
"word-break",
|
||||
"word-spacing",
|
||||
"word-wrap",
|
||||
"writing-mode",
|
||||
"align-content",
|
||||
"align-items",
|
||||
"align-self",
|
||||
"animation-delay",
|
||||
"animation-direction",
|
||||
"animation-duration",
|
||||
"animation-fill-mode",
|
||||
"animation-iteration-count",
|
||||
"animation-name",
|
||||
"animation-play-state",
|
||||
"animation-timing-function",
|
||||
"appearance",
|
||||
"aspect-ratio",
|
||||
"backdrop-filter",
|
||||
"background-attachment",
|
||||
"background-blend-mode",
|
||||
"background-clip",
|
||||
"background-color",
|
||||
"background-image",
|
||||
"background-origin",
|
||||
"background-position-x",
|
||||
"background-position-y",
|
||||
"background-repeat",
|
||||
"background-size",
|
||||
"block-size",
|
||||
"border-block-end-color",
|
||||
"border-block-end-style",
|
||||
"border-block-end-width",
|
||||
"border-block-start-color",
|
||||
"border-block-start-style",
|
||||
"border-block-start-width",
|
||||
"border-bottom-color",
|
||||
"border-bottom-left-radius",
|
||||
"border-bottom-right-radius",
|
||||
"border-bottom-style",
|
||||
"border-bottom-width",
|
||||
"border-inline-end-color",
|
||||
"border-inline-end-style",
|
||||
"border-inline-end-width",
|
||||
"border-inline-start-color",
|
||||
"border-inline-start-style",
|
||||
"border-inline-start-width",
|
||||
"border-left-color",
|
||||
"border-left-style",
|
||||
"border-left-width",
|
||||
"border-right-color",
|
||||
"border-right-style",
|
||||
"border-right-width",
|
||||
"border-top-color",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-top-style",
|
||||
"border-top-width",
|
||||
"bottom",
|
||||
"box-shadow",
|
||||
"box-sizing",
|
||||
"clear",
|
||||
"clip",
|
||||
"clip-path",
|
||||
"column-count",
|
||||
"column-gap",
|
||||
"column-span",
|
||||
"column-width",
|
||||
"contain",
|
||||
"content",
|
||||
"content-visibility",
|
||||
"counter-increment",
|
||||
"counter-reset",
|
||||
"counter-set",
|
||||
"cx",
|
||||
"cy",
|
||||
"display",
|
||||
"filter",
|
||||
"flex-basis",
|
||||
"flex-direction",
|
||||
"flex-grow",
|
||||
"flex-shrink",
|
||||
"flex-wrap",
|
||||
"float",
|
||||
"grid-auto-columns",
|
||||
"grid-auto-flow",
|
||||
"grid-auto-rows",
|
||||
"grid-column-end",
|
||||
"grid-column-start",
|
||||
"grid-row-end",
|
||||
"grid-row-start",
|
||||
"grid-template-areas",
|
||||
"grid-template-columns",
|
||||
"grid-template-rows",
|
||||
"height",
|
||||
"inline-size",
|
||||
"inset-block-end",
|
||||
"inset-block-start",
|
||||
"inset-inline-end",
|
||||
"inset-inline-start",
|
||||
"isolation",
|
||||
"justify-content",
|
||||
"justify-items",
|
||||
"justify-self",
|
||||
"left",
|
||||
"margin-block-end",
|
||||
"margin-block-start",
|
||||
"margin-bottom",
|
||||
"margin-inline-end",
|
||||
"margin-inline-start",
|
||||
"margin-left",
|
||||
"margin-right",
|
||||
"margin-top",
|
||||
"mask-image",
|
||||
"mask-type",
|
||||
"max-block-size",
|
||||
"max-height",
|
||||
"max-inline-size",
|
||||
"max-width",
|
||||
"min-block-size",
|
||||
"min-height",
|
||||
"min-inline-size",
|
||||
"min-width",
|
||||
"mix-blend-mode",
|
||||
"object-fit",
|
||||
"object-position",
|
||||
"opacity",
|
||||
"order",
|
||||
"outline-color",
|
||||
"outline-offset",
|
||||
"outline-style",
|
||||
"outline-width",
|
||||
"overflow-x",
|
||||
"overflow-y",
|
||||
"padding-block-end",
|
||||
"padding-block-start",
|
||||
"padding-bottom",
|
||||
"padding-inline-end",
|
||||
"padding-inline-start",
|
||||
"padding-left",
|
||||
"padding-right",
|
||||
"padding-top",
|
||||
"position",
|
||||
"r",
|
||||
"right",
|
||||
"rotate",
|
||||
"row-gap",
|
||||
"rx",
|
||||
"ry",
|
||||
"scale",
|
||||
"scrollbar-gutter",
|
||||
"scrollbar-width",
|
||||
"stop-color",
|
||||
"stop-opacity",
|
||||
"table-layout",
|
||||
"text-decoration-color",
|
||||
"text-decoration-style",
|
||||
"text-decoration-thickness",
|
||||
"text-overflow",
|
||||
"top",
|
||||
"touch-action",
|
||||
"transform",
|
||||
"transform-box",
|
||||
"transform-origin",
|
||||
"transition-behavior",
|
||||
"transition-delay",
|
||||
"transition-duration",
|
||||
"transition-property",
|
||||
"transition-timing-function",
|
||||
"translate",
|
||||
"unicode-bidi",
|
||||
"user-select",
|
||||
"vertical-align",
|
||||
"view-transition-name",
|
||||
"white-space-trim",
|
||||
"width",
|
||||
"x",
|
||||
"y",
|
||||
"z-index"
|
||||
]
|
||||
All properties associated with document.body.style by default:
|
||||
{}
|
||||
[]
|
||||
All properties associated with document.body.style after setting some properties:
|
||||
{
|
||||
"0": "display",
|
||||
"1": "background-color",
|
||||
"2": "font-size"
|
||||
}
|
||||
[
|
||||
"display",
|
||||
"background-color",
|
||||
"font-size"
|
||||
]
|
||||
|
|
|
@ -2,22 +2,21 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const bodyStyleDeclaration = getComputedStyle(document.body);
|
||||
function printProperties(properties) {
|
||||
println(JSON.stringify(Object.values(properties), null, 4));
|
||||
}
|
||||
|
||||
const serializedBodyComputedStyle = JSON.stringify(bodyStyleDeclaration, null, 4);
|
||||
println("All properties associated with getComputedStyle(document.body):");
|
||||
println(serializedBodyComputedStyle);
|
||||
printProperties(getComputedStyle(document.body));
|
||||
|
||||
const serializedBodyElementStyle = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style by default:");
|
||||
println(serializedBodyElementStyle);
|
||||
printProperties(document.body.style);
|
||||
|
||||
document.body.style.display = "none";
|
||||
document.body.style.backgroundColor = "red";
|
||||
document.body.style.fontSize = "15px";
|
||||
|
||||
const serializedBodyElementStyleWithSetProperties = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style after setting some properties:");
|
||||
println(serializedBodyElementStyleWithSetProperties);
|
||||
printProperties(document.body.style);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue