Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Keywords should be lowercased during serialization #7726

Merged

Commits on Dec 17, 2022

  1. CSS Keywords should be lowercased during serialization

    https://bugs.webkit.org/show_bug.cgi?id=249438
    
    Reviewed by Sam Weinig.
    
    CSS Keywords should be lowercased during serialization:
    - https://www.w3.org/TR/cssom-1/#serialize-a-css-component-value
    
    * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/color-interpolation-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/shape-rendering-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/text-rendering-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-presentation-attribute-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/inheritance-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-computed-expected.txt:
    * LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/color-interpolation-filters-parsing-valid-expected.txt:
    Rebaseline WPT tests now that more checks are passing.
    
    * Source/WebCore/css/CSSPrimitiveValue.cpp:
    (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
    Call nameStringForSerialization() instead of nameString() since we are serializing.
    This makes sure that the identifier is serialized as lowercase.
    
    * Source/WebCore/css/typedom/CSSStyleValueFactory.cpp:
    (WebCore::CSSStyleValueFactory::reifyValue):
    Per https://drafts.css-houdini.org/css-typed-om-1/#reify-ident, we should create
    a CSSKeywordValue from the *serialization* of the identifier, which means that
    the identifier would become lowercase.
    
    * Source/WebCore/css/process-css-values.py:
    (GenerationContext):
    Generate nameStringForSerialization() which provides the name string of the
    keyword as lowercase, for the purpose of serialization.
    
    Canonical link: https://commits.webkit.org/258024@main
    cdumez committed Dec 17, 2022
    Copy the full SHA
    5c14835 View commit details
    Browse the repository at this point in the history