Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 59be4482527cc45549faf238a867f79f17c0cfbd
      
https://github.com/WebKit/WebKit/commit/59be4482527cc45549faf238a867f79f17c0cfbd
  Author: Antti Koivisto <an...@apple.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    R LayoutTests/fast/css/variables/test-suite/062-expected.html
    R LayoutTests/fast/css/variables/test-suite/062.html
    R LayoutTests/fast/css/variables/test-suite/166-expected.html
    R LayoutTests/fast/css/variables/test-suite/166.html
    M Source/WebCore/css/CSSVariableReferenceValue.cpp
    M Source/WebCore/css/CSSVariableReferenceValue.h
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.h
    M Source/WebCore/css/parser/CSSVariableParser.cpp
    M Source/WebCore/css/parser/CSSVariableParser.h

  Log Message:
  -----------
  ASSERTION FAILED: isCustomPropertyName(name) in 
WebCore::Style::CustomPropertyRegistry::get
https://bugs.webkit.org/show_bug.cgi?id=250811
<rdar://problem/104403704>

Reviewed by Antoine Quint.

This new assertion revealed two bugs.

* LayoutTests/TestExpectations:

New PASSes under web-platform-tests/css/css-variables.

* LayoutTests/fast/css/variables/test-suite/062-expected.html: Removed.
* LayoutTests/fast/css/variables/test-suite/062.html: Removed.
* LayoutTests/fast/css/variables/test-suite/166-expected.html: Removed.
* LayoutTests/fast/css/variables/test-suite/166.html: Removed.

These are the same as the tests under web-platform-tests/css/css-variables with 
wrong expected results.

* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::CSSVariableReferenceValue::resolveVariableFallback const):

Don't try to look up env() variables from custom property registry in fallback 
resolution.

(WebCore::CSSVariableReferenceValue::resolveVariableReference const):
* Source/WebCore/css/CSSVariableReferenceValue.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::isCustomPropertyName):
* Source/WebCore/css/parser/CSSPropertyParser.h:
* Source/WebCore/css/parser/CSSVariableParser.cpp:
(WebCore::CSSVariableParser::isValidVariableName):

This function incorrecty accepted '--' as valid variable name while 
isCustomPropertyName() didn't.
Fix by just calling isCustomPropertyName().

* Source/WebCore/css/parser/CSSVariableParser.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to