Title: [236273] trunk
Revision
236273
Author
commit-qu...@webkit.org
Date
2018-09-20 11:57:56 -0700 (Thu, 20 Sep 2018)

Log Message

Implement CSS Custom Properties and Values Skeleton
https://bugs.webkit.org/show_bug.cgi?id=189694

Patch by Justin Michaud <justin_mich...@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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236272 => 236273)


--- trunk/LayoutTests/ChangeLog	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/LayoutTests/ChangeLog	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1,3 +1,17 @@
+2018-09-20  Justin Michaud  <justin_mich...@apple.com>
+
+        Implement CSS Custom Properties and Values Skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=189694
+
+        Reviewed by Simon Fraser.
+
+        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:
+
 2018-09-20  Dawei Fenton  <realda...@apple.com>
 
         WebGL conformance: Failures and Timeouts in suite 2.0.0/conformance

Added: trunk/LayoutTests/css-custom-properties-api/registerProperty-expected.txt (0 => 236273)


--- trunk/LayoutTests/css-custom-properties-api/registerProperty-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css-custom-properties-api/registerProperty-expected.txt	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,5 @@
+
+PASS registerProperty requires a Dictionary type 
+PASS registerProperty requires a name matching <custom-property-name> 
+PASS registerProperty only allows omitting initialValue is syntax is '*' 
+

Added: trunk/LayoutTests/css-custom-properties-api/registerProperty.html (0 => 236273)


--- trunk/LayoutTests/css-custom-properties-api/registerProperty.html	                        (rev 0)
+++ trunk/LayoutTests/css-custom-properties-api/registerProperty.html	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,33 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSCustomPropertiesAndValuesEnabled=true ] -->
+<!-- https://chromium.googlesource.com/chromium/src/+/01ce431409e3a019858677626a983c55168da6dc/third_party/WebKit/LayoutTests/custom-properties/register-property.html -->
+<script src=""
+<script src=""
+<script>
+// Tests for error checking during property registration
+test(function() {
+    assert_throws(new TypeError(), () => CSS.registerProperty());
+    assert_throws(new TypeError(), () => CSS.registerProperty(undefined));
+    assert_throws(new TypeError(), () => CSS.registerProperty(true));
+    assert_throws(new TypeError(), () => CSS.registerProperty(2));
+    assert_throws(new TypeError(), () => CSS.registerProperty("css"));
+    assert_throws(new TypeError(), () => CSS.registerProperty(null));
+}, "registerProperty requires a Dictionary type");
+test(function() {
+    // Valid property names, shouldn't throw
+    CSS.registerProperty({name: '--name1', inherits: false});
+    CSS.registerProperty({name: '--name2, no need for escapes', inherits: false});
+    CSS.registerProperty({name: ['--name', 3], inherits: false});
+    // Invalid property names
+    assert_throws(new TypeError(), () => CSS.registerProperty({}));
+    assert_throws(new TypeError(), () => CSS.registerProperty({name: '--no-inherits'}));
+    //assert_throws(new SyntaxError(), () => CSS.registerProperty({name: 'no-leading-dash', inherits: false}));
+    //assert_throws(new SyntaxError(), () => CSS.registerProperty({name: '', inherits: false}));
+    //assert_throws(new SyntaxError(), () => CSS.registerProperty({name: '\\--name', inherits: false}));
+}, "registerProperty requires a name matching <custom-property-name>");
+test(function() {
+    CSS.registerProperty({name: '--syntax-test-1', inherits: false, syntax: '*'});
+    CSS.registerProperty({name: '--syntax-test-2', inherits: false, syntax: ' * '});
+    /*assert_throws(new SyntaxError(),
+        () => CSS.registerProperty({name: '--syntax-test-3', syntax: 'length'}));*/
+}, "registerProperty only allows omitting initialValue is syntax is '*'");
+</script>

Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (236272 => 236273)


--- trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1973,3 +1973,6 @@
 imported/w3c/web-platform-tests/credential-management/ [ Skip ]
 
 webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html [ Pass Failure ]
+
+# Not supported on WK1
+css-custom-properties-api [ Skip ]

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (236272 => 236273)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-09-20 18:57:56 UTC (rev 236273)
@@ -619,3 +619,6 @@
 webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html [ Pass Failure ]
 
 webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
+
+# Not supported on WK1
+css-custom-properties-api [ Skip ]

Modified: trunk/Source/WebCore/CMakeLists.txt (236272 => 236273)


--- trunk/Source/WebCore/CMakeLists.txt	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/CMakeLists.txt	2018-09-20 18:57:56 UTC (rev 236273)
@@ -525,6 +525,9 @@
     css/CSSStyleSheet.idl
     css/CSSSupportsRule.idl
     css/CSSUnknownRule.idl
+    css/DOMCSSCustomPropertyDescriptor.idl
+    css/DOMCSSNamespace.idl
+    css/DOMCSSRegisterCustomProperty.idl
     css/DOMMatrix.idl
     css/DOMMatrix2DInit.idl
     css/DOMMatrixInit.idl
@@ -535,7 +538,6 @@
     css/DeprecatedCSSOMRect.idl
     css/DeprecatedCSSOMValue.idl
     css/DeprecatedCSSOMValueList.idl
-    css/DOMCSSNamespace.idl
     css/ElementCSSInlineStyle.idl
     css/FontFace.idl
     css/FontFaceSet.idl

Modified: trunk/Source/WebCore/ChangeLog (236272 => 236273)


--- trunk/Source/WebCore/ChangeLog	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/ChangeLog	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1,5 +1,40 @@
 2018-09-20  Justin Michaud  <justin_mich...@apple.com>
 
+        Implement CSS Custom Properties and Values Skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=189694
+
+        Reviewed by Simon Fraser.
+
+        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):
+
+2018-09-20  Justin Michaud  <justin_mich...@apple.com>
+
         JS bindings generator should support EnabledAtRuntime for static methods
         https://bugs.webkit.org/show_bug.cgi?id=189729
 

Modified: trunk/Source/WebCore/DerivedSources.make (236272 => 236273)


--- trunk/Source/WebCore/DerivedSources.make	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/DerivedSources.make	2018-09-20 18:57:56 UTC (rev 236273)
@@ -451,7 +451,9 @@
 	$(WebCore)/css/DeprecatedCSSOMRect.idl \
 	$(WebCore)/css/DeprecatedCSSOMValue.idl \
     $(WebCore)/css/DeprecatedCSSOMValueList.idl \
+    $(WebCore)/css/DOMCSSCustomPropertyDescriptor.idl \
     $(WebCore)/css/DOMCSSNamespace.idl \
+    $(WebCore)/css/DOMCSSRegisterCustomProperty.idl \
     $(WebCore)/css/ElementCSSInlineStyle.idl \
     $(WebCore)/css/FontFace.idl \
     $(WebCore)/css/FontFaceSet.idl \

Modified: trunk/Source/WebCore/Sources.txt (236272 => 236273)


--- trunk/Source/WebCore/Sources.txt	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/Sources.txt	2018-09-20 18:57:56 UTC (rev 236273)
@@ -620,6 +620,7 @@
 css/CSSVariableData.cpp
 css/CSSVariableReferenceValue.cpp
 css/DOMCSSNamespace.cpp
+css/DOMCSSRegisterCustomProperty.cpp
 css/DOMMatrix.cpp
 css/DOMMatrixReadOnly.cpp
 css/DeprecatedCSSOMPrimitiveValue.cpp
@@ -2513,6 +2514,8 @@
 JSDocumentTimelineOptions.cpp
 JSDOMApplicationCache.cpp
 JSDOMCSSNamespace.cpp
+JSDOMCSSRegisterCustomProperty.cpp
+JSDOMCSSCustomPropertyDescriptor.cpp
 JSDOMCache.cpp
 JSDOMCacheStorage.cpp
 JSDOMException.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (236272 => 236273)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1344,6 +1344,9 @@
 		4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3480920EEF50D400AC1B41 /* ImageSourceCG.h */; };
 		4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */; };
+		4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */; };
+		4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959240A39DACC00220FE5 /* MediaQuery.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7840,6 +7843,12 @@
 		4B6FA6F20C39E48C00087011 /* SmartReplace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartReplace.h; sourceTree = "<group>"; };
 		4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartReplaceCF.cpp; sourceTree = "<group>"; };
 		4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorDeleteAction.h; sourceTree = "<group>"; };
+		4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSRegisterCustomProperty.idl; sourceTree = "<group>"; };
+		4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCSSRegisterCustomProperty.cpp; sourceTree = "<group>"; };
+		4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSCustomPropertyDescriptor.h; sourceTree = "<group>"; };
+		4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSRegisterCustomProperty.h; sourceTree = "<group>"; };
+		4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSCustomPropertyDescriptor.idl; sourceTree = "<group>"; };
+		4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSRegisteredCustomProperty.h; sourceTree = "<group>"; };
 		4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaFeatureNames.cpp; sourceTree = "<group>"; };
 		4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaFeatureNames.h; sourceTree = "<group>"; };
 		4E1959230A39DACC00220FE5 /* MediaQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQuery.cpp; sourceTree = "<group>"; };
@@ -23951,8 +23960,8 @@
 				2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */,
 				2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */,
 				AD9FF6E01908391D003B61E0 /* IOSurfacePoolCocoa.mm */,
+				CDC48AC82149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.cpp */,
 				CDC48AC72149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h */,
-				CDC48AC82149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.cpp */,
 				526724F21CB2FDF60075974D /* TextTrackRepresentationCocoa.h */,
 				526724F11CB2FDF60075974D /* TextTrackRepresentationCocoa.mm */,
 				2D3EF4441917915C00034184 /* WebActionDisablingCALayerDelegate.h */,
@@ -24730,8 +24739,8 @@
 		CD669D651D232DF4004D1866 /* cocoa */ = {
 			isa = PBXGroup;
 			children = (
+				417F7AED2139BF6500FBA7EC /* MediaSessionManagerCocoa.h */,
 				417F7AEA2139BF6400FBA7EC /* MediaSessionManagerCocoa.mm */,
-				417F7AED2139BF6500FBA7EC /* MediaSessionManagerCocoa.h */,
 				417F7AEB2139BF6400FBA7EC /* WebAudioBufferList.cpp */,
 				417F7AEC2139BF6500FBA7EC /* WebAudioBufferList.h */,
 			);
@@ -25677,6 +25686,7 @@
 				9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */,
 				BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */,
 				BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */,
+				4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */,
 				BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */,
 				BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */,
 				A80E6CDC0A1989CA007FB8C5 /* CSSRule.cpp */,
@@ -25746,9 +25756,14 @@
 				A8D0651C0A23C1FE005E7203 /* DeprecatedCSSOMValueList.idl */,
 				4A4F48A716B0DFC000EDBB29 /* DocumentRuleSets.cpp */,
 				4A4F48A816B0DFC000EDBB29 /* DocumentRuleSets.h */,
+				4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */,
+				4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */,
 				FD677735195CAB200072E0D3 /* DOMCSSNamespace.cpp */,
 				FC9A0F72164094CF003D6B8D /* DOMCSSNamespace.h */,
 				FC9A0F73164094CF003D6B8D /* DOMCSSNamespace.idl */,
+				4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */,
+				4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */,
+				4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */,
 				836ACEC41ECA6654004BD012 /* DOMMatrix.cpp */,
 				836ACEC51ECA6654004BD012 /* DOMMatrix.h */,
 				836ACEC61ECA6654004BD012 /* DOMMatrix.idl */,
@@ -27671,6 +27686,7 @@
 				FE271F672082DBE500A952D4 /* CSSPtrTag.h in Headers */,
 				9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */,
 				BC5A12E00DC0414800C9AFAD /* CSSReflectValue.h in Headers */,
+				4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */,
 				BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */,
 				A80E6D0D0A1989CA007FB8C5 /* CSSRule.h in Headers */,
 				A80E6CF20A1989CA007FB8C5 /* CSSRuleList.h in Headers */,
@@ -27830,7 +27846,9 @@
 				41380C271F3436AC00155FDA /* DOMCache.h in Headers */,
 				41FABD2D1F4DFE4A006A6C97 /* DOMCacheEngine.h in Headers */,
 				41380C291F3436AC00155FDA /* DOMCacheStorage.h in Headers */,
+				4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */,
 				FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */,
+				4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */,
 				7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */,
 				BC60D6E90D28D83400B9918F /* DOMException.h in Headers */,
 				8399470C1F50B63E00E9D86B /* DOMFileSystem.h in Headers */,
@@ -29472,6 +29490,7 @@
 				2D9BF7061DBFBB24007A7D99 /* MediaEncryptedEvent.h in Headers */,
 				2D9BF7081DBFBB24007A7D99 /* MediaEncryptedEventInit.h in Headers */,
 				41B28B151F8501D300FB52AC /* MediaEndpointConfiguration.h in Headers */,
+				CDC48AC92149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h in Headers */,
 				E44613AD0CD6331000FADA75 /* MediaError.h in Headers */,
 				4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */,
 				07A6D1EC1491137700051D0C /* MediaFragmentURIParser.h in Headers */,
@@ -30286,7 +30305,6 @@
 				517A534F1F54A8BA00DCDC0A /* ServiceWorkerRegistrationData.h in Headers */,
 				517A53291F4B90B900DCDC0A /* ServiceWorkerRegistrationKey.h in Headers */,
 				51F175691F3EBC8300C74950 /* ServiceWorkerRegistrationOptions.h in Headers */,
-				CDC48AC92149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h in Headers */,
 				51BCCE301F8F179E006BA0ED /* ServiceWorkerThread.h in Headers */,
 				4112B5431F9F9CA000E67875 /* ServiceWorkerThreadProxy.h in Headers */,
 				515E37F61FAA940200D7F22A /* ServiceWorkerTypes.h in Headers */,

Added: trunk/Source/WebCore/css/CSSRegisteredCustomProperty.h (0 => 236273)


--- trunk/Source/WebCore/css/CSSRegisteredCustomProperty.h	                        (rev 0)
+++ trunk/Source/WebCore/css/CSSRegisteredCustomProperty.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+struct CSSRegisteredCustomProperty {
+    const String name;
+    /* TODO syntax, inherits, initialValue */
+};
+
+}

Added: trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.h (0 => 236273)


--- trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.h	                        (rev 0)
+++ trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+struct DOMCSSCustomPropertyDescriptor {
+    String name;
+    String syntax { "*" };
+    bool inherits;
+    String initialValue;
+};
+
+}

Added: trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.idl (0 => 236273)


--- trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.idl	                        (rev 0)
+++ trunk/Source/WebCore/css/DOMCSSCustomPropertyDescriptor.idl	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,34 @@
+/*
+* Copyright (C) 2018 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+    JSGenerateToJSObject,
+    EnabledAtRuntime=CSSCustomPropertiesAndValues
+] dictionary DOMCSSCustomPropertyDescriptor {
+    required DOMString name;
+             DOMString syntax       = "*";
+    required boolean   inherits;
+             DOMString initialValue;
+};

Modified: trunk/Source/WebCore/css/DOMCSSNamespace.h (236272 => 236273)


--- trunk/Source/WebCore/css/DOMCSSNamespace.h	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/css/DOMCSSNamespace.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -29,6 +29,8 @@
 
 #pragma once
 
+#include "Supplementable.h"
+
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
 
@@ -36,7 +38,7 @@
 
 class Document;
 
-class DOMCSSNamespace final : public RefCounted<DOMCSSNamespace> {
+class DOMCSSNamespace final : public RefCounted<DOMCSSNamespace>, public Supplementable<DOMCSSNamespace> {
 public:
     static bool supports(Document&, const String& property, const String& value);
     static bool supports(Document&, const String& conditionText);

Added: trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp (0 => 236273)


--- trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp	                        (rev 0)
+++ trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMCSSRegisterCustomProperty.h"
+
+#include "CSSRegisteredCustomProperty.h"
+#include "DOMCSSNamespace.h"
+#include "Document.h"
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+void DOMCSSRegisterCustomProperty::registerProperty(Document& document, const DOMCSSCustomPropertyDescriptor& descriptor)
+{
+    CSSRegisteredCustomProperty property { descriptor.name };
+    if (!document.registerCSSProperty(WTFMove(property))) {
+        /* TODO throw JS exception */
+        return;
+    }
+}
+
+DOMCSSRegisterCustomProperty* DOMCSSRegisterCustomProperty::from(DOMCSSNamespace& css)
+{
+    auto* supplement = static_cast<DOMCSSRegisterCustomProperty*>(Supplement<DOMCSSNamespace>::from(&css, supplementName()));
+    if (!supplement) {
+        auto newSupplement = std::make_unique<DOMCSSRegisterCustomProperty>(css);
+        supplement = newSupplement.get();
+        provideTo(&css, supplementName(), WTFMove(newSupplement));
+    }
+    return supplement;
+}
+
+const char* DOMCSSRegisterCustomProperty::supplementName()
+{
+    return "DOMCSSRegisterCustomProperty";
+}
+
+}

Added: trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.h (0 => 236273)


--- trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.h	                        (rev 0)
+++ trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "DOMCSSCustomPropertyDescriptor.h"
+#include "Supplementable.h"
+
+namespace WebCore {
+
+class Document;
+class DOMCSSNamespace;
+
+class DOMCSSRegisterCustomProperty final : public Supplement<DOMCSSNamespace> {
+public:
+    explicit DOMCSSRegisterCustomProperty(DOMCSSNamespace&) { }
+
+    static void registerProperty(Document&, const DOMCSSCustomPropertyDescriptor&);
+
+private:
+    static DOMCSSRegisterCustomProperty* from(DOMCSSNamespace&);
+    static const char* supplementName();
+};
+
+}

Added: trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.idl (0 => 236273)


--- trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.idl	                        (rev 0)
+++ trunk/Source/WebCore/css/DOMCSSRegisterCustomProperty.idl	2018-09-20 18:57:56 UTC (rev 236273)
@@ -0,0 +1,30 @@
+/*
+* Copyright (C) 2018 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+    EnabledAtRuntime=CSSCustomPropertiesAndValues
+] partial interface DOMCSSNamespace {
+    [CallWith=Document] static void registerProperty(DOMCSSCustomPropertyDescriptor descriptor);
+};

Modified: trunk/Source/WebCore/css/parser/CSSParserContext.cpp (236272 => 236273)


--- trunk/Source/WebCore/css/parser/CSSParserContext.cpp	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/css/parser/CSSParserContext.cpp	2018-09-20 18:57:56 UTC (rev 236273)
@@ -26,6 +26,9 @@
 #include "config.h"
 #include "CSSParserContext.h"
 
+#include "Document.h"
+#include "Page.h"
+#include "Settings.h"
 #include <wtf/NeverDestroyed.h>
 
 namespace WebCore {

Modified: trunk/Source/WebCore/dom/Document.cpp (236272 => 236273)


--- trunk/Source/WebCore/dom/Document.cpp	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/dom/Document.cpp	2018-09-20 18:57:56 UTC (rev 236273)
@@ -8216,4 +8216,9 @@
     return page->chrome().client().signedPublicKeyAndChallengeString(keySizeIndex, challengeString, url);
 }
 
+bool Document::registerCSSProperty(CSSRegisteredCustomProperty&& prop)
+{
+    return m_CSSRegisteredPropertySet.add(prop.name, std::make_unique<CSSRegisteredCustomProperty>(WTFMove(prop))).isNewEntry;
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/dom/Document.h (236272 => 236273)


--- trunk/Source/WebCore/dom/Document.h	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/dom/Document.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -27,6 +27,7 @@
 
 #pragma once
 
+#include "CSSRegisteredCustomProperty.h"
 #include "Color.h"
 #include "ContainerNode.h"
 #include "DisabledAdaptations.h"
@@ -1491,6 +1492,8 @@
     void updateMainArticleElementAfterLayout();
     bool hasMainArticleElement() const { return !!m_mainArticleElement; }
 
+    bool registerCSSProperty(CSSRegisteredCustomProperty&&);
+
     void setAsRunningUserScripts() { m_isRunningUserScripts = true; }
     bool isRunningUserScripts() const { return m_isRunningUserScripts; }
 
@@ -2023,6 +2026,8 @@
     
     std::unique_ptr<UserGestureIndicator> m_temporaryUserGesture;
 
+    HashMap<String, std::unique_ptr<CSSRegisteredCustomProperty>> m_CSSRegisteredPropertySet;
+
     bool m_isRunningUserScripts { false };
 };
 

Modified: trunk/Source/WebCore/features.json (236272 => 236273)


--- trunk/Source/WebCore/features.json	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/features.json	2018-09-20 18:57:56 UTC (rev 236273)
@@ -50,6 +50,16 @@
         "description": "Allows content to specify colors outside of the sRGB Color Space."
     },
     {
+        "name": "CSS Custom Properties And Values",
+        "status": {
+            "status": "Under Development"
+        },
+        "url": "https://drafts.css-houdini.org/css-properties-values-api/",
+        "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=189692",
+        "keywords": ["CSSCustomPropertiesAndValues", "custom properties", "css"],
+        "description": "An API for registering new CSS properties. Properties registered using this API are provided with a parse syntax that defines a type, inheritance behaviour, and an initial value."
+    },
+    {
         "name": "CSS Font Display",
         "status": {
             "status": "In Development",

Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (236272 => 236273)


--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h	2018-09-20 18:57:56 UTC (rev 236273)
@@ -285,6 +285,9 @@
     void setWebAPIStatisticsEnabled(bool isEnabled) { m_webAPIStatisticsEnabled = isEnabled; }
     bool webAPIStatisticsEnabled() const { return m_webAPIStatisticsEnabled; }
 
+    void setCSSCustomPropertiesAndValuesEnabled(bool isEnabled) { m_CSSCustomPropertiesAndValuesEnabled = isEnabled; }
+    bool cssCustomPropertiesAndValuesEnabled() const { return m_CSSCustomPropertiesAndValuesEnabled; }
+
     WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
 
 private:
@@ -430,6 +433,8 @@
 
     bool m_webAPIStatisticsEnabled { false };
 
+    bool m_CSSCustomPropertiesAndValuesEnabled { false };
+
     friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
 };
 

Modified: trunk/Source/WebKit/ChangeLog (236272 => 236273)


--- trunk/Source/WebKit/ChangeLog	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebKit/ChangeLog	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1,3 +1,16 @@
+2018-09-20  Justin Michaud  <justin_mich...@apple.com>
+
+        Implement CSS Custom Properties and Values Skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=189694
+
+        Reviewed by Simon Fraser.
+
+        Add feature flag for CSS custom properties and values api
+
+        * Shared/WebPreferences.yaml:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2018-09-19  Dean Jackson  <d...@apple.com>
 
         Temporarily move fullscreen back to experimental features

Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (236272 => 236273)


--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2018-09-20 18:57:56 UTC (rev 236273)
@@ -1350,3 +1350,11 @@
   humanReadableDescription: "Enable Web API Statistics"
   webcoreBinding: RuntimeEnabledFeatures
   category: internal
+
+CSSCustomPropertiesAndValuesEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "CSS Custom Properties and Values API"
+  humanReadableDescription: "Enable CSS Custom Properties and Values API"
+  webcoreBinding: RuntimeEnabledFeatures
+  category: experimental

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (236272 => 236273)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2018-09-20 18:23:06 UTC (rev 236272)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2018-09-20 18:57:56 UTC (rev 236273)
@@ -253,6 +253,9 @@
     if (preference == "WebKitWebAPIStatisticsEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setWebAPIStatisticsEnabled(enabled);
 
+    if (preference == "CSSCustomPropertiesAndValuesEnabled")
+        RuntimeEnabledFeatures::sharedFeatures().setCSSCustomPropertiesAndValuesEnabled(enabled);
+
     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
 #define FOR_EACH_OVERRIDE_BOOL_PREFERENCE(macro) \
     macro(WebKitJavaEnabled, JavaEnabled, javaEnabled) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to