[webkit-changes] [WebKit/WebKit] 95de65: Avoid code duplication between ComputedStyleProper...
Chris Dumez
noreply at github.com
Fri Dec 2 08:05:16 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 95de65d6299743f9aa53a547a5b17f0e28ad7898
https://github.com/WebKit/WebKit/commit/95de65d6299743f9aa53a547a5b17f0e28ad7898
Author: Chris Dumez <cdumez at apple.com>
Date: 2022-12-02 (Fri, 02 Dec 2022)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/background-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/border-radius-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/flex-flow-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-area-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/grid-template-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/marker-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/mask-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/offset-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-skip-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/transition-expected.txt
M Source/WebCore/css/typedom/CSSStyleValueFactory.cpp
M Source/WebCore/css/typedom/CSSStyleValueFactory.h
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.h
M Source/WebCore/css/typedom/DeclaredStylePropertyMap.cpp
M Source/WebCore/css/typedom/DeclaredStylePropertyMap.h
M Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.cpp
M Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.h
M Source/WebCore/dom/StyledElement.cpp
M Source/WebCore/html/CustomPaintImage.cpp
Log Message:
-----------
Avoid code duplication between ComputedStylePropertyMapReadOnly and MainThreadStylePropertyMapReadOnly
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
More information about the webkit-changes
mailing list