Implement CSS Custom Properties and Values Skeleton
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2018 18:57:56 +0000 (18:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2018 18:57:56 +0000 (18:57 +0000)
commit3725e59dc368c87f7a7601aed0c2c698db663eb5
tree6bd86cbf5a352d3a8758ac72a94cc093155390af
parentbe2196dd7811e3443376b5b306b83ad489e097d0
Implement CSS Custom Properties and Values Skeleton
https://bugs.webkit.org/show_bug.cgi?id=189694

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

Source/WebCore:

Add feature flag, CSS.registerProperty binding and registered property set in Document.h
for the css custom properties and values api.

Test: css-properties-values-api/registerProperty.html

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSRegisteredCustomProperty.h: Added.
* css/DOMCSSCustomPropertyDescriptor.h: Added.
* css/DOMCSSCustomPropertyDescriptor.idl: Added.
* css/DOMCSSNamespace.h:
* css/DOMCSSRegisterCustomProperty.cpp: Added.
(WebCore::DOMCSSRegisterCustomProperty::registerProperty):
(WebCore::DOMCSSRegisterCustomProperty::from):
(WebCore::DOMCSSRegisterCustomProperty::supplementName):
* css/DOMCSSRegisterCustomProperty.h: Added.
* css/DOMCSSRegisterCustomProperty.idl: Added.
* css/parser/CSSParserContext.cpp:
* dom/Document.cpp:
(WebCore::Document::registerCSSProperty):
* dom/Document.h:
* features.json:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSCustomPropertiesAndValuesEnabled):
(WebCore::RuntimeEnabledFeatures::cssCustomPropertiesAndValuesEnabled const):

Source/WebKit:

Add feature flag for CSS custom properties and values api

* Shared/WebPreferences.yaml:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

LayoutTests:

Add test to check that the CSS.registerProperty method exists.

* css-custom-properties-api/registerProperty-expected.txt: Added.
* css-custom-properties-api/registerProperty.html: Added.
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/css-custom-properties-api/registerProperty-expected.txt [new file with mode: 0644]
LayoutTests/css-custom-properties-api/registerProperty.html [new file with mode: 0644]
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSRegisteredCustomProperty.h [new file with mode: 0644]
Source/WebCore/css/DOMCSSCustomPropertyDescriptor.h [new file with mode: 0644]
Source/WebCore/css/DOMCSSCustomPropertyDescriptor.idl [new file with mode: 0644]
Source/WebCore/css/DOMCSSNamespace.h
Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp [new file with mode: 0644]
Source/WebCore/css/DOMCSSRegisterCustomProperty.h [new file with mode: 0644]
Source/WebCore/css/DOMCSSRegisterCustomProperty.idl [new file with mode: 0644]
Source/WebCore/css/parser/CSSParserContext.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/features.json
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp