Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd9594cdf418745718908fd1869a116307a46e7a
      
https://github.com/WebKit/WebKit/commit/fd9594cdf418745718908fd1869a116307a46e7a
  Author: Oriol Brufau <[email protected]>
  Date:   2022-11-26 (Sat, 26 Nov 2022)

  Changed paths:
    M 
LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/webkit-border-radius-valid-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/webkit-border-radius-valid.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks-expected.txt
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/StyleProperties.cpp
    M Source/WebCore/css/StyleProperties.h

  Log Message:
  -----------
  [cssom] Proper serialization for border-radius and -webkit-border-radius
https://bugs.webkit.org/show_bug.cgi?id=183994

Reviewed by Darin Adler.

The border-radius shorthand serialized incorrectly at specified-value
time. And -webkit-border-radius was never serialized.

The same serialization logic is used for both shorthands, except that if
border-radius would serialize as 'l1 l2', -webkit-border-radius chooses
'l1 l2 l1', since '-webkit-border-radius: l1 l2' would be parsed like
'border-radius: l1 / l2'.

Tests: 
imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html
       
imported/w3c/web-platform-tests/css/css-backgrounds/parsing/webkit-border-radius-valid.html
       
imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks.html

* 
LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-expected.txt:
Expect border radius longhands to always compute to a CSSPrimitiveValue.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid-expected.txt:
Update expectations.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-valid.html:
Import changes from WPT.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/webkit-border-radius-valid-expected.txt:
 Added.
Add expectations for new test.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/webkit-border-radius-valid.html:
 Added.
Add new test.

* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssom-getPropertyValue-common-checks-expected.txt:
Update expectations.

* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::borderRadiusCornerValues):
(WebCore::borderRadiusCornerValue):
(WebCore::borderRadiusShorthandValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
Serialize -webkit-border-radius at computed-value time.
Change border radius longhands to use a Pair CSSPrimitiveValue.

* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::borderRadiusShorthandValue const):
Serialize -webkit-border-radius at specified-value time.
Fix serialization of border-radius at specified-value time.

* Source/WebCore/css/StyleProperties.h:
Add method.

Canonical link: https://commits.webkit.org/257041@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to