diff --git a/Libraries/LibWeb/CSS/StylePropertyMapReadOnly.cpp b/Libraries/LibWeb/CSS/StylePropertyMapReadOnly.cpp index 67487943f2b..4a068b86549 100644 --- a/Libraries/LibWeb/CSS/StylePropertyMapReadOnly.cpp +++ b/Libraries/LibWeb/CSS/StylePropertyMapReadOnly.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -61,8 +62,8 @@ WebIDL::ExceptionOr, Empty>> StylePropertyMapRead // 4. If props[property] exists, subdivide into iterations props[property], then reify the first item of the result and return it. if (auto property_value = get_style_value(props, property.value())) { - // FIXME: Subdivide into iterations, and only reify/return the first. - return property_value->reify(realm(), property->name()); + auto iterations = property_value->subdivide_into_iterations(property.value()); + return iterations.first()->reify(realm(), property->name()); } // 5. Otherwise, return undefined. @@ -85,8 +86,11 @@ WebIDL::ExceptionOr>> StylePropertyMapReadOnly::ge // 4. If props[property] exists, subdivide into iterations props[property], then reify each item of the result, and return the list. if (auto property_value = get_style_value(props, property.value())) { - // FIXME: Subdivide into iterations. - return Vector { property_value->reify(realm(), property->name()) }; + auto iterations = property_value->subdivide_into_iterations(property.value()); + GC::RootVector> results { heap() }; + for (auto const& style_value : iterations) + results.append(style_value->reify(realm(), property->name())); + return results; } // 5. Otherwise, return an empty list. diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/get.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/get.txt index c3b63ecbb9b..4995cfad9ce 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/get.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/get.txt @@ -2,11 +2,10 @@ Harness status: OK Found 6 tests -5 Pass -1 Fail +6 Pass Pass Getting a custom property not in the computed style returns undefined Pass Getting a valid property from computed style returns the correct entry Pass Getting a valid custom property from computed style returns the correct entry -Fail Getting a list-valued property from computed style returns only the first value +Pass Getting a list-valued property from computed style returns only the first value Pass Computed StylePropertyMap.get is not case-sensitive Pass Computed StylePropertyMap.get reflects updates in inline style \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/getAll.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/getAll.tentative.txt index 8135dc86df9..8a67a14bd63 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/getAll.tentative.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/computed/getAll.tentative.txt @@ -2,11 +2,10 @@ Harness status: OK Found 6 tests -5 Pass -1 Fail +6 Pass Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry Pass StylePropertyMap.getAll is case-insensitive Pass Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry -Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file +Pass Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/get.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/get.txt index 63dd95ec075..82000251a9f 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/get.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/get.txt @@ -2,12 +2,11 @@ Harness status: OK Found 7 tests -6 Pass -1 Fail +7 Pass Pass Getting a custom property not in the CSS rule returns undefined Pass Getting a valid property not in the CSS rule returns undefined Pass Getting a valid property from CSS rule returns the correct entry Pass Getting a valid custom property from CSS rule returns the correct entry -Fail Getting a list-valued property from CSS rule returns only the first value +Pass Getting a list-valued property from CSS rule returns only the first value Pass Declared StylePropertyMap.get is not case-sensitive Pass Declared StylePropertyMap.get reflects changes in the CSS rule \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/getAll.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/getAll.tentative.txt index 0242cd8eb30..b9a7d099145 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/getAll.tentative.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/getAll.tentative.txt @@ -2,12 +2,11 @@ Harness status: OK Found 7 tests -6 Pass -1 Fail +7 Pass Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError Pass Calling StylePropertyMap.getAll with a property not in the property model returns an empty list Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry Pass StylePropertyMap.getAll is case-insensitive Pass Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry -Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file +Pass Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/set.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/set.tentative.txt index e7973d31743..b9b4f26be3e 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/set.tentative.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/declared/set.tentative.txt @@ -2,8 +2,8 @@ Harness status: OK Found 14 tests -11 Pass -3 Fail +13 Pass +1 Fail Pass Setting a StylePropertyMap with an unsupported property name throws TypeError Pass Setting a StylePropertyMap with an null property name throws TypeError Pass Setting a StylePropertyMap with a descriptor throws TypeError @@ -14,7 +14,7 @@ Pass Setting a non list-valued property with list-valued string throws TypeError Pass Setting a list-valued property with a CSSUnparsedValue and other values throws TypeError Pass Setting a list-valued property with a var ref() and other values throws TypeError Pass Setting a property with CSSStyleValue or String updates its value -Fail Setting a list-valued property with CSSStyleValue or String updates its values +Pass Setting a list-valued property with CSSStyleValue or String updates its values Fail Setting a list-valued property with a list-valued string updates its value Pass Setting a custom property with CSSStyleValue or String updates its value -Fail StylePropertyMap.set is case-insensitive \ No newline at end of file +Pass StylePropertyMap.set is case-insensitive \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/get.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/get.txt index aea7c7d8246..ba0cbeea2c8 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/get.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/get.txt @@ -2,12 +2,11 @@ Harness status: OK Found 7 tests -6 Pass -1 Fail +7 Pass Pass Getting a custom property not in the inline style returns undefined Pass Getting a valid property not in the inline style returns undefined Pass Getting a valid property from inline style returns the correct entry Pass Getting a valid custom property from inline style returns the correct entry -Fail Getting a list-valued property from inline style returns only the first value +Pass Getting a list-valued property from inline style returns only the first value Pass Declared StylePropertyMap.get is not case-sensitive Pass Declared StylePropertyMap.get reflects changes in the inline style \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/getAll.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/getAll.tentative.txt index 0242cd8eb30..b9a7d099145 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/getAll.tentative.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/getAll.tentative.txt @@ -2,12 +2,11 @@ Harness status: OK Found 7 tests -6 Pass -1 Fail +7 Pass Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError Pass Calling StylePropertyMap.getAll with a property not in the property model returns an empty list Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry Pass StylePropertyMap.getAll is case-insensitive Pass Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry -Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file +Pass Calling StylePropertyMap.getAll with a list-valued property returns all the values \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/set.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/set.tentative.txt index e7973d31743..b9b4f26be3e 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/set.tentative.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/inline/set.tentative.txt @@ -2,8 +2,8 @@ Harness status: OK Found 14 tests -11 Pass -3 Fail +13 Pass +1 Fail Pass Setting a StylePropertyMap with an unsupported property name throws TypeError Pass Setting a StylePropertyMap with an null property name throws TypeError Pass Setting a StylePropertyMap with a descriptor throws TypeError @@ -14,7 +14,7 @@ Pass Setting a non list-valued property with list-valued string throws TypeError Pass Setting a list-valued property with a CSSUnparsedValue and other values throws TypeError Pass Setting a list-valued property with a var ref() and other values throws TypeError Pass Setting a property with CSSStyleValue or String updates its value -Fail Setting a list-valued property with CSSStyleValue or String updates its values +Pass Setting a list-valued property with CSSStyleValue or String updates its values Fail Setting a list-valued property with a list-valued string updates its value Pass Setting a custom property with CSSStyleValue or String updates its value -Fail StylePropertyMap.set is case-insensitive \ No newline at end of file +Pass StylePropertyMap.set is case-insensitive \ No newline at end of file