Implement initialValue support for CSS Custom Properties and Values API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Sep 2018 01:03:48 +0000 (01:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Sep 2018 01:03:48 +0000 (01:03 +0000)
commitbad3c6cd45dd7b482f754fa50007d294df72042d
tree2cbdb4a67fbbddea20c040b88809821ee28f9d39
parent04edef91e911cb0ede5e813debe03a7c552fc52b
Implement initialValue support for CSS Custom Properties and Values API
https://bugs.webkit.org/show_bug.cgi?id=189819

Patch by Justin Michaud <justin_michaud@apple.com> on 2018-09-21
Reviewed by Simon Fraser.

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
* css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::resolveVariableReferences const):
* css/CSSCustomPropertyValue.h:
* css/CSSRegisteredCustomProperty.h:
* css/CSSVariableData.cpp:
(WebCore::CSSVariableData::resolveVariableFallback const):
(WebCore::CSSVariableData::resolveVariableReference const):
(WebCore::CSSVariableData::resolveVariableReferences const):
(WebCore::CSSVariableData::resolveTokenRange const):
* css/CSSVariableData.h:
* css/DOMCSSRegisterCustomProperty.cpp:
(WebCore::DOMCSSRegisterCustomProperty::registerProperty):
* css/DOMCSSRegisterCustomProperty.h:
* css/DOMCSSRegisterCustomProperty.idl:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::resolvedVariableValue):
(WebCore::StyleResolver::applyCascadedProperties):
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValueWithVariableReferences):
* css/parser/CSSParser.h:
* dom/Document.h:
(WebCore::Document::getCSSRegisteredCustomPropertySet const):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::checkVariablesInCustomProperties):
* rendering/style/RenderStyle.h:

LayoutTests:

* css-custom-properties-api/initialValue-expected.html: Added.
* css-custom-properties-api/initialValue.html: Added.
* css-custom-properties-api/initialValueJS-expected.txt: Added.
* css-custom-properties-api/initialValueJS.html: Added.
* css-custom-properties-api/registerProperty-expected.txt:
* css-custom-properties-api/registerProperty.html:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/css-custom-properties-api/initialValue-expected.html [new file with mode: 0644]
LayoutTests/css-custom-properties-api/initialValue.html [new file with mode: 0644]
LayoutTests/css-custom-properties-api/initialValueJS-expected.txt [new file with mode: 0644]
LayoutTests/css-custom-properties-api/initialValueJS.html [new file with mode: 0644]
LayoutTests/css-custom-properties-api/registerProperty-expected.txt
LayoutTests/css-custom-properties-api/registerProperty.html
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSCustomPropertyValue.cpp
Source/WebCore/css/CSSCustomPropertyValue.h
Source/WebCore/css/CSSRegisteredCustomProperty.h
Source/WebCore/css/CSSVariableData.cpp
Source/WebCore/css/CSSVariableData.h
Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp
Source/WebCore/css/DOMCSSRegisterCustomProperty.h
Source/WebCore/css/DOMCSSRegisterCustomProperty.idl
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParser.h
Source/WebCore/dom/Document.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h