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