Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid code duplication between ComputedStylePropertyMapReadOnly and M…
…ainThreadStylePropertyMapReadOnly https://bugs.webkit.org/show_bug.cgi?id=248583 Reviewed by Antti Koivisto. Avoid code duplication between ComputedStylePropertyMapReadOnly and MainThreadStylePropertyMapReadOnly by having ComputedStylePropertyMapReadOnly subclass MainThreadStylePropertyMapReadOnly instead of the more generic StylePropertyMapReadOnly. Doing so exposed a bug in the way we serialize shorthand property values in MainThreadStylePropertyMapReadOnly and caused some test failures. To address the issue, we now avoid doing the serialization ourselves and rely on StyleProperties::getPropertyValue() instead. Fixing this actually caused quite a few tests to pass. * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/background-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/border-radius-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-area-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-template-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/marker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mask-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/transition-expected.txt: * Source/WebCore/css/typedom/CSSStyleValueFactory.cpp: (WebCore::CSSStyleValueFactory::constructStyleValueForShorthandSerialization): (WebCore::CSSStyleValueFactory::extractShorthandCSSValues): (WebCore::CSSStyleValueFactory::constructStyleValueForShorthandProperty): Deleted. * Source/WebCore/css/typedom/CSSStyleValueFactory.h: * Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp: (WebCore::ComputedStylePropertyMapReadOnly::propertyValue const): (WebCore::ComputedStylePropertyMapReadOnly::shorthandPropertySerialization const): (WebCore::ComputedStylePropertyMapReadOnly::customPropertyValue const): (WebCore::ComputedStylePropertyMapReadOnly::get const): Deleted. (WebCore::ComputedStylePropertyMapReadOnly::getAll const): Deleted. (WebCore::ComputedStylePropertyMapReadOnly::has const): Deleted. * Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.h: * Source/WebCore/css/typedom/DeclaredStylePropertyMap.cpp: (WebCore::DeclaredStylePropertyMap::shorthandPropertySerialization const): * Source/WebCore/css/typedom/DeclaredStylePropertyMap.h: * Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.cpp: (WebCore::MainThreadStylePropertyMapReadOnly::get const): (WebCore::MainThreadStylePropertyMapReadOnly::getAll const): (WebCore::MainThreadStylePropertyMapReadOnly::shorthandPropertyValue const): Deleted. * Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.h: * Source/WebCore/dom/StyledElement.cpp: * Source/WebCore/html/CustomPaintImage.cpp: Canonical link: https://commits.webkit.org/257284@main
- Loading branch information
Showing
25 changed files
with
91 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...eb-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FAIL 'flex-flow' does not supported 'row' assert_class_string: Unsupported value must be a CSSStyleValue and not one of its subclasses expected "[object CSSStyleValue]" but got "[object CSSKeywordValue]" | ||
PASS 'flex-flow' does not supported 'row' | ||
PASS 'flex-flow' does not supported 'column wrap' | ||
PASS 'flex-flow' does not supported 'row-reverse wrap-reverse' | ||
|
10 changes: 5 additions & 5 deletions
10
...w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
FAIL 'font' does not supported '1.2em "Fira Sans", sans-serif' Bad value for shorthand CSS property | ||
FAIL 'font' does not supported 'italic 1.2em "Fira Sans", serif' Bad value for shorthand CSS property | ||
FAIL 'font' does not supported 'italic small-caps bold 16px/2 cursive' Bad value for shorthand CSS property | ||
FAIL 'font' does not supported 'small-caps bold 24px/1 sans-serif' Bad value for shorthand CSS property | ||
FAIL 'font' does not supported 'caption' assert_not_equals: Unsupported value must not be null got disallowed value null | ||
PASS 'font' does not supported '1.2em "Fira Sans", sans-serif' | ||
PASS 'font' does not supported 'italic 1.2em "Fira Sans", serif' | ||
PASS 'font' does not supported 'italic small-caps bold 16px/2 cursive' | ||
PASS 'font' does not supported 'small-caps bold 24px/1 sans-serif' | ||
PASS 'font' does not supported 'caption' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
FAIL 'font-variant' does not supported 'normal' Bad value for shorthand CSS property | ||
PASS 'font-variant' does not supported 'normal' | ||
PASS 'font-variant' does not supported 'no-common-ligatures proportional-nums' | ||
PASS 'font-variant' does not supported 'common-ligatures tabular-nums' | ||
FAIL 'font-variant' does not supported 'small-caps slashed-zero' Bad value for shorthand CSS property | ||
PASS 'font-variant' does not supported 'small-caps slashed-zero' | ||
|
14 changes: 7 additions & 7 deletions
14
...eb-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-area-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
FAIL 'grid-area' does not supported 'a' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported 'a / a' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported 'auto' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported 'auto / auto' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported '2 / 1 / 2' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported 'span 3' Bad value for shorthand CSS property | ||
FAIL 'grid-area' does not supported '2 span / a span' Bad value for shorthand CSS property | ||
PASS 'grid-area' does not supported 'a' | ||
PASS 'grid-area' does not supported 'a / a' | ||
PASS 'grid-area' does not supported 'auto' | ||
PASS 'grid-area' does not supported 'auto / auto' | ||
PASS 'grid-area' does not supported '2 / 1 / 2' | ||
PASS 'grid-area' does not supported 'span 3' | ||
PASS 'grid-area' does not supported '2 span / a span' | ||
|
6 changes: 3 additions & 3 deletions
6
...w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FAIL 'grid' does not supported 'auto-flow / 1fr 1fr 1fr' Bad value for shorthand CSS property | ||
FAIL 'grid' does not supported 'auto-flow dense / 40px 40px 1fr' Bad value for shorthand CSS property | ||
FAIL 'grid' does not supported 'repeat(3, 80px) / auto-flow' Bad value for shorthand CSS property | ||
PASS 'grid' does not supported 'auto-flow / 1fr 1fr 1fr' | ||
PASS 'grid' does not supported 'auto-flow dense / 40px 40px 1fr' | ||
PASS 'grid' does not supported 'repeat(3, 80px) / auto-flow' | ||
|
12 changes: 6 additions & 6 deletions
12
...latform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-template-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
|
||
FAIL 'grid-template' does not supported 'none' Bad value for shorthand CSS property | ||
FAIL 'grid-template' does not supported '100px 1fr / 50px 1fr' Bad value for shorthand CSS property | ||
FAIL 'grid-template' does not supported '[linename] 100px / [columnname1] 30% [columname2] 70%' Bad value for shorthand CSS property | ||
FAIL 'grid-template' does not supported 'fit-content(100px) / fit-content(40%)' Bad value for shorthand CSS property | ||
FAIL 'grid-template' does not supported '"a a a" "b b b"' Bad value for shorthand CSS property | ||
FAIL 'grid-template' does not supported '[header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto' Bad value for shorthand CSS property | ||
PASS 'grid-template' does not supported 'none' | ||
PASS 'grid-template' does not supported '100px 1fr / 50px 1fr' | ||
PASS 'grid-template' does not supported '[linename] 100px / [columnname1] 30% [columname2] 70%' | ||
PASS 'grid-template' does not supported 'fit-content(100px) / fit-content(40%)' | ||
PASS 'grid-template' does not supported '"a a a" "b b b"' | ||
PASS 'grid-template' does not supported '[header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto' | ||
|
4 changes: 2 additions & 2 deletions
4
...c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/marker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mask-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL 'mask' does not supported 'none' assert_class_string: Unsupported value must be a CSSStyleValue and not one of its subclasses expected "[object CSSStyleValue]" but got "[object CSSKeywordValue]" | ||
FAIL 'mask' does not supported 'url(mask.png)' assert_class_string: Unsupported value must be a CSSStyleValue and not one of its subclasses expected "[object CSSStyleValue]" but got "[object CSSImageValue]" | ||
PASS 'mask' does not supported 'none' | ||
PASS 'mask' does not supported 'url(mask.png)' | ||
|
12 changes: 6 additions & 6 deletions
12
...c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
|
||
FAIL 'offset' does not supported 'auto' Bad value for shorthand CSS property | ||
FAIL 'offset' does not supported '10px 30px' Bad value for shorthand CSS property | ||
FAIL 'offset' does not supported 'none' Bad value for shorthand CSS property | ||
FAIL 'offset' does not supported 'ray(45deg closest-side)' Bad value for shorthand CSS property | ||
FAIL 'offset' does not supported 'path("M 100 100 L 300 100 L 200 300 z")' Bad value for shorthand CSS property | ||
FAIL 'offset' does not supported 'ray(45deg closest-side) / 40px 20px' Bad value for shorthand CSS property | ||
PASS 'offset' does not supported 'auto' | ||
PASS 'offset' does not supported '10px 30px' | ||
PASS 'offset' does not supported 'none' | ||
PASS 'offset' does not supported 'ray(45deg closest-side)' | ||
PASS 'offset' does not supported 'path("M 100 100 L 300 100 L 200 300 z")' | ||
PASS 'offset' does not supported 'ray(45deg closest-side) / 40px 20px' | ||
|
2 changes: 1 addition & 1 deletion
2
...tform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FAIL 'text-decoration' does not supported 'underline' assert_class_string: Unsupported value must be a CSSStyleValue and not one of its subclasses expected "[object CSSStyleValue]" but got "[object CSSKeywordValue]" | ||
PASS 'text-decoration' does not supported 'underline' | ||
FAIL 'text-decoration' does not supported 'underline dotted #ff3028' assert_not_equals: Unsupported value must not be null got disallowed value null | ||
FAIL 'text-decoration' does not supported 'green wavy underline' assert_not_equals: Unsupported value must not be null got disallowed value null | ||
|
2 changes: 1 addition & 1 deletion
2
...-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.