diff --git a/Libraries/LibWeb/CSS/Enums.json b/Libraries/LibWeb/CSS/Enums.json index e9b2aaab987..acc01301af8 100644 --- a/Libraries/LibWeb/CSS/Enums.json +++ b/Libraries/LibWeb/CSS/Enums.json @@ -621,6 +621,12 @@ "wrap", "nowrap" ], + "text-wrap-style": [ + "auto", + "balance", + "stable", + "pretty" + ], "touch-action": [ "auto", "manipulation", diff --git a/Libraries/LibWeb/CSS/Keywords.json b/Libraries/LibWeb/CSS/Keywords.json index 2e3173b1780..57e89b13553 100644 --- a/Libraries/LibWeb/CSS/Keywords.json +++ b/Libraries/LibWeb/CSS/Keywords.json @@ -90,6 +90,7 @@ "back", "background", "backwards", + "balance", "baseline", "bevel", "bidi-override", @@ -384,6 +385,7 @@ "preserve", "preserve-breaks", "preserve-spaces", + "pretty", "progress", "progress-bar", "progressive", diff --git a/Libraries/LibWeb/CSS/Properties.json b/Libraries/LibWeb/CSS/Properties.json index 6a23b26e9cd..cdece9846a4 100644 --- a/Libraries/LibWeb/CSS/Properties.json +++ b/Libraries/LibWeb/CSS/Properties.json @@ -2951,6 +2951,14 @@ "text-wrap-mode" ] }, + "text-wrap-style": { + "animation-type": "discrete", + "inherited": true, + "initial": "auto", + "valid-types": [ + "text-wrap-style" + ] + }, "top": { "animation-type": "by-computed-value", "inherited": false, diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp index 4b9fe02a181..84999d7543e 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPseudoElement.cpp @@ -434,7 +434,7 @@ bool pseudo_element_supports_property(PseudoElement pseudo_element, PropertyID p append_property("text-transform"sv); // FIXME: text-wrap append_property("text-wrap-mode"sv); - // FIXME: text-wrap-style + append_property("text-wrap-style"sv); append_property("white-space"sv); append_property("white-space-collapse"sv); append_property("white-space-trim"sv); diff --git a/Tests/LibWeb/Text/expected/css/CSSStyleDeclaration-has-indexed-property-getter.txt b/Tests/LibWeb/Text/expected/css/CSSStyleDeclaration-has-indexed-property-getter.txt index 3975a41b29c..e8219e8a005 100644 --- a/Tests/LibWeb/Text/expected/css/CSSStyleDeclaration-has-indexed-property-getter.txt +++ b/Tests/LibWeb/Text/expected/css/CSSStyleDeclaration-has-indexed-property-getter.txt @@ -57,6 +57,7 @@ All properties associated with getComputedStyle(document.body): "text-shadow", "text-transform", "text-wrap-mode", + "text-wrap-style", "visibility", "white-space-collapse", "word-break", diff --git a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt index e5093445757..4195682e826 100644 --- a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt +++ b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt @@ -619,6 +619,8 @@ All supported properties and their default values exposed from CSSStylePropertie 'text-transform': 'none' 'textWrapMode': 'wrap' 'text-wrap-mode': 'wrap' +'textWrapStyle': 'auto' +'text-wrap-style': 'auto' 'top': 'auto' 'touchAction': 'auto' 'touch-action': 'auto' diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index ea9bc7d2fec..463174cb750 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -55,6 +55,7 @@ text-justify: auto text-shadow: none text-transform: none text-wrap-mode: wrap +text-wrap-style: auto visibility: visible white-space-collapse: collapse word-break: normal @@ -85,7 +86,7 @@ background-position-x: 0% background-position-y: 0% background-repeat: repeat background-size: auto auto -block-size: 1305px +block-size: 1320px border-block-end-color: rgb(0, 0, 0) border-block-end-style: none border-block-end-width: medium @@ -150,7 +151,7 @@ grid-row-start: auto grid-template-areas: none grid-template-columns: none grid-template-rows: none -height: 2280px +height: 2295px inline-size: 784px inset-block-end: auto inset-block-start: auto diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-cascade/all-prop-revert-layer.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-cascade/all-prop-revert-layer.txt index 994090408ba..ac9664b58da 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-cascade/all-prop-revert-layer.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-cascade/all-prop-revert-layer.txt @@ -1,8 +1,8 @@ Harness status: OK -Found 200 tests +Found 201 tests -190 Pass +191 Pass 10 Fail Pass accent-color Pass border-collapse @@ -58,6 +58,7 @@ Pass text-indent Pass text-justify Pass text-shadow Pass text-transform +Pass text-wrap-style Pass visibility Pass word-break Pass word-spacing diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-computed.txt new file mode 100644 index 00000000000..58e66a412ec --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-computed.txt @@ -0,0 +1,8 @@ +Harness status: OK + +Found 3 tests + +3 Pass +Pass Property text-wrap-style value 'auto' +Pass Property text-wrap-style value 'balance' +Pass Property text-wrap-style value 'stable' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-invalid.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-invalid.txt new file mode 100644 index 00000000000..217365e1ca6 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-invalid.txt @@ -0,0 +1,17 @@ +Harness status: OK + +Found 12 tests + +12 Pass +Pass e.style['text-wrap-style'] = "normal" should not set the property value +Pass e.style['text-wrap-style'] = "none" should not set the property value +Pass e.style['text-wrap-style'] = "wrap" should not set the property value +Pass e.style['text-wrap-style'] = "nowrap" should not set the property value +Pass e.style['text-wrap-style'] = "wrap wrap" should not set the property value +Pass e.style['text-wrap-style'] = "nowrap nowrap" should not set the property value +Pass e.style['text-wrap-style'] = "wrap nowrap" should not set the property value +Pass e.style['text-wrap-style'] = "pretty balance" should not set the property value +Pass e.style['text-wrap-style'] = "balance stable" should not set the property value +Pass e.style['text-wrap-style'] = "stable pretty" should not set the property value +Pass e.style['text-wrap-style'] = "delicious wrap" should not set the property value +Pass e.style['text-wrap-style'] = "5px" should not set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-valid.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-valid.txt new file mode 100644 index 00000000000..fa19f8da900 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/text-wrap-style-valid.txt @@ -0,0 +1,13 @@ +Harness status: OK + +Found 8 tests + +8 Pass +Pass e.style['text-wrap-style'] = "auto" should set the property value +Pass e.style['text-wrap-style'] = "balance" should set the property value +Pass e.style['text-wrap-style'] = "stable" should set the property value +Pass e.style['text-wrap-style'] = "initial" should set the property value +Pass e.style['text-wrap-style'] = "inherit" should set the property value +Pass e.style['text-wrap-style'] = "unset" should set the property value +Pass e.style['text-wrap-style'] = "revert" should set the property value +Pass e.style['text-wrap-style'] = "revert-layer" should set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/text-wrap-style-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/text-wrap-style-computed.html new file mode 100644 index 00000000000..a03e2bee9bb --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/text-wrap-style-computed.html @@ -0,0 +1,21 @@ + + +
+ +