[webkit-changes] [WebKit/WebKit] 4172b6: text-decoration-thickness should support percentages

ChangSeok Oh noreply at github.com
Sat Oct 28 04:16:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4172b60326a851840071774f9b1341c8147c6718
      https://github.com/WebKit/WebKit/commit/4172b60326a851840071774f9b1341c8147c6718
  Author: ChangSeok Oh <changseok at webkit.org>
  Date:   2023-10-28 (Sat, 28 Oct 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/discrete-no-interpolation-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/text-decoration-thickness-interpolation-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/text-decoration-thickness-interpolation.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-computed.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-thickness-expected.txt
    M Source/WebCore/animation/CSSPropertyAnimation.cpp
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/rendering/style/TextDecorationThickness.h
    M Source/WebCore/style/StyleBuilderConverter.h

  Log Message:
  -----------
  text-decoration-thickness should support percentages
https://bugs.webkit.org/show_bug.cgi?id=262866

Reviewed by Tim Nguyen.

This change adds support of percentage to text-decoration-thickness [1].

The text-decoration-thickness-interpolation.html is newly added to evaluate interpolation
between various length types. The updated text-decoration-thickness-computed.html
verifies calc() computation with em, %, and px values. And
text-decoration-thickness-calc.html verifies the actual rendering.

Test: imported/w3c/web-platform-tests/css/css-fonts/size-adjust-text-decoration.tentative.html
      imported/w3c/web-platform-tests/css/css-text-decor/animations/discrete-no-interpolation.html
      imported/w3c/web-platform-tests/css/css-text-decor/animations/text-decoration-thickness-interpolation.html
      imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc.html
      imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-computed.html
      imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-fixed.html
      imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-valid.html
      imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-thickness.html

[1] https://drafts.csswg.org/css-text-decor-4/#valdef-text-decoration-thickness-percentage

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/discrete-no-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/text-decoration-thickness-interpolation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/animations/text-decoration-thickness-interpolation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-calc.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-decoration-thickness-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::textDecorationThicknessToCSSValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::initialTextDecorationThickness):
* Source/WebCore/rendering/style/TextDecorationThickness.h:
(WebCore::TextDecorationThickness::createWithAuto):
(WebCore::TextDecorationThickness::createFromFont):
(WebCore::TextDecorationThickness::createWithLength):
(WebCore::TextDecorationThickness::length const):
(WebCore::TextDecorationThickness::resolve const):
(WebCore::TextDecorationThickness::TextDecorationThickness):
(WebCore::operator<<):
(WebCore::TextDecorationThickness::setLengthValue): Deleted.
(WebCore::TextDecorationThickness::lengthValue const): Deleted.
(): Deleted.
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertTextDecorationThickness):

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




More information about the webkit-changes mailing list