Skip to content
Permalink
Browse files
Implement support for StylePropertyMap.append()
https://bugs.webkit.org/show_bug.cgi?id=248400

Reviewed by Alex Christensen.

Implement support for StylePropertyMap.append():
- https://drafts.css-houdini.org/css-typed-om/#dom-stylepropertymap-append

* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/declared/append.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/inline/append.tentative-expected.txt:
* Source/WebCore/css/typedom/StylePropertyMap.cpp:
(WebCore::StylePropertyMap::append):

Canonical link: https://commits.webkit.org/257123@main
  • Loading branch information
cdumez committed Nov 29, 2022
1 parent 5b5387a commit 30535abeb949cd7184975a689457ed372ed7a107
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 189 deletions.
@@ -191,16 +191,8 @@ PASS CSSUnitValue rejected by set() for syntax <length>+ [attributeStyleMap]
PASS CSSUnitValue rejected by set() for syntax <length>+ [styleMap]
PASS CSSUnitValue rejected by set() for syntax <length># [attributeStyleMap]
PASS CSSUnitValue rejected by set() for syntax <length># [styleMap]
FAIL Appending a string to * is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to * is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
PASS Appending a string to * is not allowed [attributeStyleMap]
PASS Appending a string to * is not allowed [styleMap]
FAIL Appending a string to foo+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to foo+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <angle>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
@@ -211,46 +203,14 @@ FAIL Appending a string to <custom-ident>+ is not allowed [attributeStyleMap] Th
FAIL Appending a string to <custom-ident>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <image>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <image>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <integer>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <integer>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <length-percentage>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <length-percentage>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <length>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <length>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <number>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <number>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
PASS Appending a string to <integer>+ is not allowed [attributeStyleMap]
PASS Appending a string to <integer>+ is not allowed [styleMap]
PASS Appending a string to <length-percentage>+ is not allowed [attributeStyleMap]
PASS Appending a string to <length-percentage>+ is not allowed [styleMap]
PASS Appending a string to <length>+ is not allowed [attributeStyleMap]
PASS Appending a string to <length>+ is not allowed [styleMap]
PASS Appending a string to <number>+ is not allowed [attributeStyleMap]
PASS Appending a string to <number>+ is not allowed [styleMap]
FAIL Appending a string to <percentage>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <percentage>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <resolution>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
@@ -263,26 +223,10 @@ FAIL Appending a string to <transform-list> is not allowed [attributeStyleMap] T
FAIL Appending a string to <transform-list> is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <url>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <url>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a string to <length># is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a string to <length># is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSKeywordValue to * is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSKeywordValue to * is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
PASS Appending a string to <length># is not allowed [attributeStyleMap]
PASS Appending a string to <length># is not allowed [styleMap]
PASS Appending a CSSKeywordValue to * is not allowed [attributeStyleMap]
PASS Appending a CSSKeywordValue to * is not allowed [styleMap]
FAIL Appending a CSSKeywordValue to foo+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSKeywordValue to foo+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSUnitValue to <angle>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
@@ -291,46 +235,14 @@ FAIL Appending a CSSKeywordValue to <custom-ident>+ is not allowed [attributeSty
FAIL Appending a CSSKeywordValue to <custom-ident>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSImageValue to <image>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSImageValue to <image>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSUnitValue to <integer>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <integer>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <length-percentage>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <length-percentage>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <length>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <length>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <number>+ is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <number>+ is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
PASS Appending a CSSUnitValue to <integer>+ is not allowed [attributeStyleMap]
PASS Appending a CSSUnitValue to <integer>+ is not allowed [styleMap]
PASS Appending a CSSUnitValue to <length-percentage>+ is not allowed [attributeStyleMap]
PASS Appending a CSSUnitValue to <length-percentage>+ is not allowed [styleMap]
PASS Appending a CSSUnitValue to <length>+ is not allowed [attributeStyleMap]
PASS Appending a CSSUnitValue to <length>+ is not allowed [styleMap]
PASS Appending a CSSUnitValue to <number>+ is not allowed [attributeStyleMap]
PASS Appending a CSSUnitValue to <number>+ is not allowed [styleMap]
FAIL Appending a CSSUnitValue to <percentage>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSUnitValue to <percentage>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSUnitValue to <resolution>+ is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
@@ -339,16 +251,8 @@ FAIL Appending a CSSUnitValue to <time>+ is not allowed [attributeStyleMap] The
FAIL Appending a CSSUnitValue to <time>+ is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSKeywordValue to <transform-list> is not allowed [attributeStyleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSKeywordValue to <transform-list> is not allowed [styleMap] The given initial value does not parse for the given syntax.
FAIL Appending a CSSUnitValue to <length># is not allowed [attributeStyleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a CSSUnitValue to <length># is not allowed [styleMap] assert_throws_js: function "() => {
map.append(name, value);
}" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
PASS Appending a CSSUnitValue to <length># is not allowed [attributeStyleMap]
PASS Appending a CSSUnitValue to <length># is not allowed [styleMap]
PASS CSSStyleValue.parse[All] returns CSSUnparsedValue for syntax *
FAIL CSSStyleValue.parse[All] returns CSSUnparsedValue for syntax <angle> The given initial value does not parse for the given syntax.
FAIL CSSStyleValue.parse[All] returns CSSUnparsedValue for syntax <color> The given initial value does not parse for the given syntax.
@@ -1,32 +1,14 @@

FAIL Calling StylePropertyMap.append with an unsupported property name throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with an null property name throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with a property that is not list valued throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with a shorthand property throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with an invalid CSSStyleValue throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with an invalid String value throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with a mix of valid and invalid values throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with a CSSUnparsedValue throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Calling StylePropertyMap.append with a var ref throws TypeError assert_throws_js: function "() => styleMap.append(property, ...values)" threw object "NotSupportedError: append() is not yet supported" ("NotSupportedError") expected instance of function "function TypeError() {
[native code]
}" ("TypeError")
FAIL Appending a list-valued property with CSSStyleValue or String updates its values append() is not yet supported
FAIL Appending a list-valued property with list-valued string updates its values append() is not yet supported
FAIL StylePropertyMap.append is case-insensitive append() is not yet supported
PASS Calling StylePropertyMap.append with an unsupported property name throws TypeError
PASS Calling StylePropertyMap.append with an null property name throws TypeError
PASS Calling StylePropertyMap.append with a property that is not list valued throws TypeError
PASS Calling StylePropertyMap.append with a shorthand property throws TypeError
PASS Calling StylePropertyMap.append with an invalid CSSStyleValue throws TypeError
PASS Calling StylePropertyMap.append with an invalid String value throws TypeError
PASS Calling StylePropertyMap.append with a mix of valid and invalid values throws TypeError
PASS Calling StylePropertyMap.append with a CSSUnparsedValue throws TypeError
PASS Calling StylePropertyMap.append with a var ref throws TypeError
PASS Appending a list-valued property with CSSStyleValue or String updates its values
PASS Appending a list-valued property with list-valued string updates its values
PASS StylePropertyMap.append is case-insensitive

0 comments on commit 30535ab

Please sign in to comment.