Implement feature flag and bindings for CSS Painting API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 18:04:43 +0000 (18:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 18:04:43 +0000 (18:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190237

Patch by Justin Michaud <justin_michaud@apple.com> on 2018-10-16
Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add feature flag and bindings for CSS Painting API. This adds a new property,
CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint
worklet global scope untill CSS.paintWorklet is implemented.

There are a few small changes, mostly adding headers and "using" declarations,
that were required to get this to build. This is probably related to unified sources.

Tests: fast/css-custom-paint/basic.html
       fast/css-custom-paint/registerPaintBindings.html

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added.
(WebCore::throwInvalidModificationError):
(WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
* bindings/js/JSEventListener.cpp:
* bindings/js/JSRemoteDOMWindowCustom.cpp:
* bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp:
* bindings/js/WebCoreBuiltinNames.h:
* css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
(WebCore::CSSPaintCallback::~CSSPaintCallback):
* css/CSSPaintCallback.idl: Added.
* css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
(WebCore::CSSPaintWorkletGlobalScope::create):
(WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope):
(WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio):
(WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint):
* css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
(WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap):
* css/CSSPaintWorkletGlobalScope.idl: Added.
* css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
(WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope):
(WebCore::DOMCSSPaintWorklet::from):
(WebCore::DOMCSSPaintWorklet::supplementName):
* css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
* css/DOMCSSPaintWorklet.idl: Added.
* css/MediaQueryParserContext.cpp:
* css/StyleBuilder.h:
* dom/Document.cpp:
(WebCore::Document::ensureCSSPaintWorkletGlobalScope):
* dom/Document.h:
* features.json:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled):
(WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

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

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Add basic tests for the CSS Painting API registerPaint function,
and test the custom bindings.

* fast/css-custom-paint/basic-expected.txt: Added.
* fast/css-custom-paint/basic.html: Added.
* fast/css-custom-paint/registerPaintBindings-expected.txt: Added.
* fast/css-custom-paint/registerPaintBindings.html: Added.
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237192 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-custom-paint/basic-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-custom-paint/basic.html [new file with mode: 0644]
LayoutTests/fast/css-custom-paint/registerPaintBindings-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-custom-paint/registerPaintBindings.html [new file with mode: 0644]
LayoutTests/platform/ios-wk1/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/DerivedSources.make
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/css/CSSPaintCallback.h [new file with mode: 0644]
Source/WebCore/css/CSSPaintCallback.idl [new file with mode: 0644]
Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp [new file with mode: 0644]
Source/WebCore/css/CSSPaintWorkletGlobalScope.h [new file with mode: 0644]
Source/WebCore/css/CSSPaintWorkletGlobalScope.idl [new file with mode: 0644]
Source/WebCore/css/DOMCSSPaintWorklet.cpp [new file with mode: 0644]
Source/WebCore/css/DOMCSSPaintWorklet.h [new file with mode: 0644]
Source/WebCore/css/DOMCSSPaintWorklet.idl [new file with mode: 0644]
Source/WebCore/css/MediaQueryParserContext.cpp
Source/WebCore/css/StyleBuilder.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/features.json
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Configurations/FeatureDefines.xcconfig
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

index a77a81d..31898a5 100644 (file)
@@ -1,3 +1,21 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        Add basic tests for the CSS Painting API registerPaint function,
+        and test the custom bindings.
+
+        * fast/css-custom-paint/basic-expected.txt: Added.
+        * fast/css-custom-paint/basic.html: Added.
+        * fast/css-custom-paint/registerPaintBindings-expected.txt: Added.
+        * fast/css-custom-paint/registerPaintBindings.html: Added.
+        * platform/ios-wk1/TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+        * platform/win/TestExpectations:
+
 2018-10-16  Per Arne Vollan  <pvollan@apple.com>
 
         [WebVTT] Support inline WebVTT styles
diff --git a/LayoutTests/fast/css-custom-paint/basic-expected.txt b/LayoutTests/fast/css-custom-paint/basic-expected.txt
new file mode 100644 (file)
index 0000000..e712dcc
--- /dev/null
@@ -0,0 +1,8 @@
+
+PASS test that registerPaint runs 
+PASS test that registerPaint runs without inputProperties 
+PASS test that registerPaint runs with inputArguments 
+PASS test that registerPaint runs with contextOptions 
+PASS test that registerPaint runs with predefined class 
+PASS test that registerPaint accepts only a string and a class constructor 
+
diff --git a/LayoutTests/fast/css-custom-paint/basic.html b/LayoutTests/fast/css-custom-paint/basic.html
new file mode 100644 (file)
index 0000000..52c0e5b
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<meta name="author" title="Justin Michaud" href="mailto:justin_michaud@webkit.org">
+<meta name="assert" content="registerPaint can be called with the correct arguments">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+  CSS.paintWorkletGlobalScope.registerPaint('test1', class {
+    static get inputProperties() { return ["--test"]; }
+    paint() { }
+  });
+}, 'test that registerPaint runs');
+
+test(function() {
+  CSS.paintWorkletGlobalScope.registerPaint('test2', class {
+    paint() { }
+  });
+}, 'test that registerPaint runs without inputProperties');
+
+test(function() {
+  CSS.paintWorkletGlobalScope.registerPaint('test3', class {
+    static get inputArguments() { return ["<length>"]; }
+    paint() { }
+  });
+}, 'test that registerPaint runs with inputArguments');
+
+test(function() {
+  CSS.paintWorkletGlobalScope.registerPaint('test4', class {
+    static get contextOptions() { return { alpha: true }; }
+    paint() { }
+  });
+}, 'test that registerPaint runs with contextOptions');
+
+class MyPaint {
+  paint() { }
+}
+
+test(function() {
+  CSS.paintWorkletGlobalScope.registerPaint('test5', MyPaint);
+  assert_throws({'name': 'InvalidModificationError'}, () => CSS.paintWorkletGlobalScope.registerPaint('test5', MyPaint));
+  CSS.paintWorkletGlobalScope.registerPaint('test6', class extends MyPaint { });
+}, 'test that registerPaint runs with predefined class');
+
+test(function() {
+  assert_throws({'name': 'InvalidModificationError'}, () => CSS.paintWorkletGlobalScope.registerPaint('test6', 'test'));
+  assert_throws(new TypeError(), () => CSS.paintWorkletGlobalScope.registerPaint('test7'));
+  assert_throws(new TypeError(), () => CSS.paintWorkletGlobalScope.registerPaint('test8', []));
+  assert_throws(new TypeError(), () => CSS.paintWorkletGlobalScope.registerPaint('test9', {}));
+  assert_throws(new TypeError(), () => CSS.paintWorkletGlobalScope.registerPaint('test10', 5));
+  assert_throws(new TypeError(), () => CSS.paintWorkletGlobalScope.registerPaint('', 5));
+}, 'test that registerPaint accepts only a string and a class constructor');
+
+</script>
diff --git a/LayoutTests/fast/css-custom-paint/registerPaintBindings-expected.txt b/LayoutTests/fast/css-custom-paint/registerPaintBindings-expected.txt
new file mode 100644 (file)
index 0000000..3014315
--- /dev/null
@@ -0,0 +1,13 @@
+
+PASS registerPaint must be a method 
+PASS must get "prototype" property of the constructor 
+PASS must rethrow an exception thrown while getting "inputProperties" property of the constructor 
+PASS must rethrow an exception thrown while getting "prototype" property of the constructor 
+PASS must throw when "prototype" property of the constructor is not an object 
+PASS must get paint callback of the constructor prototype 
+PASS must rethrow an exception thrown while getting paint callback on the constructor prototype 
+PASS must rethrow an exception thrown while converting paint callback value to Function callback type 
+PASS must rethrow an exception thrown while converting the value of inputArguments to sequence<DOMString> 
+PASS must rethrow an exception thrown while iterating over inputArguments to sequence<DOMString> 
+PASS must rethrow an exception thrown while retrieving Symbol.iterator on inputArguments 
+
diff --git a/LayoutTests/fast/css-custom-paint/registerPaintBindings.html b/LayoutTests/fast/css-custom-paint/registerPaintBindings.html
new file mode 100644 (file)
index 0000000..dc902c4
--- /dev/null
@@ -0,0 +1,152 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<meta name="author" title="Justin Michaud" href="mailto:justin_michaud@webkit.org">
+<meta name="assert" content="registerPaint accesses arguments in the correct order">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+class MyPaint {
+  paint() { }
+}
+
+test(function () {
+    assert_true('registerPaint' in CSS.paintWorkletGlobalScope.__proto__, '"registerPaint" exists on prototype');
+    assert_true('registerPaint' in CSS.paintWorkletGlobalScope, '"registerPaint" exists on window');
+}, 'registerPaint must be a method');
+
+test(function () {
+    const calls = [];
+    const proxy = new Proxy(class extends MyPaint { }, {
+        get: function (target, name) {
+            calls.push(name);
+            return target[name];
+        }
+    });
+    CSS.paintWorkletGlobalScope.registerPaint('test-proto', proxy);
+    assert_array_equals(calls, ["inputProperties", "inputArguments", "contextOptions", "prototype"]);
+}, 'must get "prototype" property of the constructor');
+
+test(function () {
+    const calls = [];
+    const proxy = new Proxy(class extends MyPaint { }, {
+        get: function (target, name) {
+            calls.push(name);
+            if (name == 'inputProperties')
+                throw {name: 'expectedError'};
+            return target[name];
+        }
+    });
+    assert_throws({'name': 'expectedError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-inputProperties0', proxy); });
+}, 'must rethrow an exception thrown while getting "inputProperties" property of the constructor');
+
+test(function () {
+    const calls = [];
+    const proxy = new Proxy(class extends MyPaint { }, {
+        get: function (target, name) {
+            calls.push(name);
+            if (name == 'prototype')
+                throw {name: 'expectedError'};
+            return target[name];
+        }
+    });
+    assert_throws({'name': 'expectedError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto', proxy); });
+}, 'must rethrow an exception thrown while getting "prototype" property of the constructor');
+
+test(function () {
+    let returnedValue;
+    const proxy = new Proxy(class extends MyPaint { }, {
+        get: function (target, name) {
+          if (name == 'prototype')
+            return returnedValue;
+          return target[name];
+        }
+    });
+
+    returnedValue = null;
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto-noobj1', proxy); },
+        'must throw when "prototype" property of the constructor is null');
+    returnedValue = undefined;
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto-noobj2', proxy); },
+        'must throw when "prototype" property of the constructor is undefined');
+    returnedValue = 'hello';
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto-noobj3', proxy);; },
+        'must throw when "prototype" property of the constructor is a string');
+    returnedValue = 1;
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto-noobj4', proxy);; },
+        'must throw when "prototype" property of the constructor is a number');
+
+}, 'must throw when "prototype" property of the constructor is not an object');
+
+test(function () {
+    const constructor = function () {}
+    constructor.prototype.paint = function() {}
+    const calls = [];
+    constructor.prototype = new Proxy(constructor.prototype, {
+        get: function (target, name) {
+            calls.push(name);
+            return target[name];
+        }
+    });
+    CSS.paintWorkletGlobalScope.registerPaint('callbacks', constructor);
+    assert_array_equals(calls, ['paint']);
+}, 'must get paint callback of the constructor prototype');
+
+test(function () {
+    const constructor = function () {}
+    const calls = [];
+    constructor.prototype = new Proxy(constructor.prototype, {
+        get: function (target, name) {
+            calls.push(name);
+            if (name == 'paint')
+                throw {name: 'expectedError'};
+            return target[name];
+        }
+    });
+    assert_throws({'name': 'expectedError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('callbacks-throw', constructor); });
+    assert_array_equals(calls, ['paint']);
+}, 'must rethrow an exception thrown while getting paint callback on the constructor prototype');
+
+test(function () {
+    const constructor = function () {}
+    const calls = [];
+    constructor.prototype = new Proxy(constructor.prototype, {
+        get: function (target, name) {
+            calls.push(name);
+            if (name == 'paint')
+                return 1;
+            return target[name];
+        }
+    });
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('callbacks-throw2', constructor); });
+    assert_array_equals(calls, ['paint']);
+}, 'must rethrow an exception thrown while converting paint callback value to Function callback type');
+
+test(function () {
+  const calls = [];
+  const proxy = new Proxy(class extends MyPaint { }, {
+      get: function (target, name) {
+          calls.push(name);
+          if (name == 'inputArguments')
+            return 1;
+          return target[name];
+      }
+  });
+  assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('sequence-throw', proxy); });
+  assert_array_equals(calls, ["inputProperties", "inputArguments"]);
+}, 'must rethrow an exception thrown while converting the value of inputArguments to sequence<DOMString>');
+
+test(function () {
+    const constructor = function () {}
+    constructor.inputArguments = {[Symbol.iterator]: function *() {
+        yield '<length>';
+        throw {name: 'SomeError'};
+    }};
+    assert_throws({'name': 'SomeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('sequence-throw2', constructor); });
+}, 'must rethrow an exception thrown while iterating over inputArguments to sequence<DOMString>');
+
+test(function () {
+    const constructor = function () {}
+    constructor.inputArguments = {[Symbol.iterator]: 1};
+    assert_throws({'name': 'TypeError'}, function () { CSS.paintWorkletGlobalScope.registerPaint('symbol-iterator-throw2', constructor); });
+}, 'must rethrow an exception thrown while retrieving Symbol.iterator on inputArguments');
+</script>
index 3fa5eb0..5bc624e 100644 (file)
@@ -1975,3 +1975,4 @@ webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-s
 
 # Not supported on WK1
 css-custom-properties-api [ Skip ]
+fast/css-custom-paint [ Skip ]
index 8579c68..37b9bd0 100644 (file)
@@ -629,6 +629,7 @@ webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-s
 webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
 
 # Not supported on WK1
+fast/css-custom-paint [ Skip ]
 imported/w3c/web-platform-tests/css/css-properties-values-api/ [ Skip ]
 css-custom-properties-api [ Skip ]
 css-dark-mode [ Skip ]
index 1504409..43d599f 100644 (file)
@@ -4129,6 +4129,7 @@ imported/blink/http/tests/security/mixedContent/websocket [ Skip ]
 
 # Feature flag only enabled for wk2
 css-custom-properties-api [ Skip ]
+fast/css-custom-paint [ Skip ]
 
 editing/pasteboard/drag-and-drop-color-input-events.html [ Skip ]
 
index 7d1eb0c..28a6fcb 100644 (file)
@@ -1,3 +1,12 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2018-10-16  Keith Miller  <keith_miller@apple.com>
 
         Unreviewed, forgot to add untracked files.
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 5f05d1e..ec29655 100644 (file)
@@ -525,6 +525,8 @@ set(WebCore_NON_SVG_IDL_FILES
     css/CSSKeyframesRule.idl
     css/CSSMediaRule.idl
     css/CSSNamespaceRule.idl
+    css/CSSPaintCallback.idl
+    css/CSSPaintWorkletGlobalScope.idl
     css/CSSPageRule.idl
     css/CSSRule.idl
     css/CSSRuleList.idl
@@ -535,6 +537,7 @@ set(WebCore_NON_SVG_IDL_FILES
     css/CSSUnknownRule.idl
     css/DOMCSSCustomPropertyDescriptor.idl
     css/DOMCSSNamespace.idl
+    css/DOMCSSPaintWorklet.idl
     css/DOMCSSRegisterCustomProperty.idl
     css/DOMMatrix.idl
     css/DOMMatrix2DInit.idl
index 49ecd0e..2c1f96d 100644 (file)
@@ -1,3 +1,59 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        Add feature flag and bindings for CSS Painting API. This adds a new property,
+        CSS.paintWorkletGlobalScope, which will be a temporary way to access the paint
+        worklet global scope untill CSS.paintWorklet is implemented.
+
+        There are a few small changes, mostly adding headers and "using" declarations,
+        that were required to get this to build. This is probably related to unified sources.
+
+        Tests: fast/css-custom-paint/basic.html
+               fast/css-custom-paint/registerPaintBindings.html
+
+        * CMakeLists.txt:
+        * Configurations/FeatureDefines.xcconfig:
+        * DerivedSources.make:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp: Added.
+        (WebCore::throwInvalidModificationError):
+        (WebCore::JSCSSPaintWorkletGlobalScope::registerPaint):
+        * bindings/js/JSEventListener.cpp:
+        * bindings/js/JSRemoteDOMWindowCustom.cpp:
+        * bindings/js/JSWebMetalRenderPassAttachmentDescriptorCustom.cpp:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * css/CSSPaintCallback.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
+        (WebCore::CSSPaintCallback::~CSSPaintCallback):
+        * css/CSSPaintCallback.idl: Added.
+        * css/CSSPaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
+        (WebCore::CSSPaintWorkletGlobalScope::create):
+        (WebCore::CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope):
+        (WebCore::CSSPaintWorkletGlobalScope::devicePixelRatio):
+        (WebCore::CSSPaintWorkletGlobalScope::addRegisteredPaint):
+        * css/CSSPaintWorkletGlobalScope.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
+        (WebCore::CSSPaintWorkletGlobalScope::paintDefinitionMap):
+        * css/CSSPaintWorkletGlobalScope.idl: Added.
+        * css/DOMCSSPaintWorklet.cpp: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
+        (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope):
+        (WebCore::DOMCSSPaintWorklet::from):
+        (WebCore::DOMCSSPaintWorklet::supplementName):
+        * css/DOMCSSPaintWorklet.h: Copied from Source/WebCore/css/MediaQueryParserContext.cpp.
+        * css/DOMCSSPaintWorklet.idl: Added.
+        * css/MediaQueryParserContext.cpp:
+        * css/StyleBuilder.h:
+        * dom/Document.cpp:
+        (WebCore::Document::ensureCSSPaintWorkletGlobalScope):
+        * dom/Document.h:
+        * features.json:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setCSSPaintingAPIEnabled):
+        (WebCore::RuntimeEnabledFeatures::cssPaintingAPIEnabled const):
+
 2018-10-16  Per Arne Vollan  <pvollan@apple.com>
 
         [WebVTT] Support inline WebVTT styles
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 4a5fdfa..bba6a05 100644 (file)
@@ -441,6 +441,8 @@ JS_BINDING_IDLS = \
     $(WebCore)/css/CSSMediaRule.idl \
     $(WebCore)/css/CSSNamespaceRule.idl \
     $(WebCore)/css/CSSPageRule.idl \
+    $(WebCore)/css/CSSPaintCallback.idl \
+    $(WebCore)/css/CSSPaintWorkletGlobalScope.idl \
     $(WebCore)/css/CSSRule.idl \
     $(WebCore)/css/CSSRuleList.idl \
     $(WebCore)/css/CSSStyleDeclaration.idl \
@@ -461,6 +463,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/css/DOMCSSCustomPropertyDescriptor.idl \
     $(WebCore)/css/DOMCSSNamespace.idl \
     $(WebCore)/css/DOMCSSRegisterCustomProperty.idl \
+    $(WebCore)/css/DOMCSSPaintWorklet.idl \
     $(WebCore)/css/ElementCSSInlineStyle.idl \
     $(WebCore)/css/FontFace.idl \
     $(WebCore)/css/FontFaceSet.idl \
index 353842b..482081d 100644 (file)
@@ -1,3 +1,12 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2018-10-15  Justin Fan  <justin_fan@apple.com>
 
         Add WebGPU 2018 feature flag and experimental feature flag
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index d2a2902..6806664 100644 (file)
@@ -378,6 +378,7 @@ bindings/js/JSDOMConvertStrings.cpp
 bindings/js/JSDOMConvertWebGL.cpp
 bindings/js/JSDOMIterator.cpp
 bindings/js/JSDeprecatedCSSOMValueCustom.cpp
+bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp
 bindings/js/JSCallbackData.cpp
 bindings/js/JSCanvasRenderingContext2DCustom.cpp
 bindings/js/JSCustomElementInterface.cpp
@@ -603,6 +604,7 @@ css/CSSMediaRule.cpp
 css/CSSNamedImageValue.cpp
 css/CSSNamespaceRule.cpp
 css/CSSPageRule.cpp
+css/CSSPaintWorkletGlobalScope.cpp
 css/CSSPendingSubstitutionValue.cpp
 css/CSSPrimitiveValue.cpp
 css/CSSProperty.cpp
@@ -632,6 +634,7 @@ css/CSSVariableData.cpp
 css/CSSVariableReferenceValue.cpp
 css/DOMCSSNamespace.cpp
 css/DOMCSSRegisterCustomProperty.cpp
+css/DOMCSSPaintWorklet.cpp
 css/DOMMatrix.cpp
 css/DOMMatrixReadOnly.cpp
 css/DeprecatedCSSOMPrimitiveValue.cpp
@@ -2461,6 +2464,8 @@ JSCSSKeyframeRule.cpp
 JSCSSKeyframesRule.cpp
 JSCSSMediaRule.cpp
 JSCSSNamespaceRule.cpp
+JSCSSPaintCallback.cpp
+JSCSSPaintWorkletGlobalScope.cpp
 JSCSSPageRule.cpp
 JSCSSRule.cpp
 JSCSSRuleList.cpp
@@ -2533,6 +2538,7 @@ JSDocumentTimelineOptions.cpp
 JSDOMApplicationCache.cpp
 JSDOMCSSNamespace.cpp
 JSDOMCSSRegisterCustomProperty.cpp
+JSDOMCSSPaintWorklet.cpp
 JSDOMCSSCustomPropertyDescriptor.cpp
 JSDOMCache.cpp
 JSDOMCacheStorage.cpp
index ac35e3b..b3dc7d5 100644 (file)
                4B2708C70AF19EE40065127F /* Pasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2708C50AF19EE40065127F /* Pasteboard.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4B3043CD0AE0373B00A82647 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043CB0AE0373B00A82647 /* Editor.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3480920EEF50D400AC1B41 /* ImageSourceCG.h */; };
+               4B5BDD9B21658A1500DD4262 /* CSSPaintCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B5BDD9A21658A1500DD4262 /* CSSPaintCallback.h */; };
+               4B6B5CBD21640EFF00603817 /* DOMCSSPaintWorklet.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6B5CB82163EC0700603817 /* DOMCSSPaintWorklet.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               4B6B5CC02164386400603817 /* CSSPaintWorkletGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6B5CBF2164386400603817 /* CSSPaintWorkletGlobalScope.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 */; };
                4B3043CB0AE0373B00A82647 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Editor.h; sourceTree = "<group>"; };
                4B3480910EEF50D400AC1B41 /* ImageSourceCGMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ImageSourceCGMac.mm; sourceTree = "<group>"; };
                4B3480920EEF50D400AC1B41 /* ImageSourceCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSourceCG.h; sourceTree = "<group>"; };
+               4B5BDD99216588E500DD4262 /* CSSPaintCallback.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CSSPaintCallback.idl; sourceTree = "<group>"; };
+               4B5BDD9A21658A1500DD4262 /* CSSPaintCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSPaintCallback.h; sourceTree = "<group>"; };
+               4B6B5CB62163DC1A00603817 /* DOMCSSPaintWorklet.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMCSSPaintWorklet.idl; sourceTree = "<group>"; };
+               4B6B5CB82163EC0700603817 /* DOMCSSPaintWorklet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMCSSPaintWorklet.h; sourceTree = "<group>"; };
+               4B6B5CB92163ED3200603817 /* DOMCSSPaintWorklet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCSSPaintWorklet.cpp; sourceTree = "<group>"; };
+               4B6B5CBE216434FB00603817 /* JSCSSPaintWorkletGlobalScopeCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSPaintWorkletGlobalScopeCustom.cpp; sourceTree = "<group>"; };
+               4B6B5CBF2164386400603817 /* CSSPaintWorkletGlobalScope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSPaintWorkletGlobalScope.h; sourceTree = "<group>"; };
+               4B6B5CC1216439CF00603817 /* CSSPaintWorkletGlobalScope.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPaintWorkletGlobalScope.cpp; sourceTree = "<group>"; };
+               4B6B5CC321643A8E00603817 /* CSSPaintWorkletGlobalScope.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CSSPaintWorkletGlobalScope.idl; sourceTree = "<group>"; };
                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>"; };
                        children = (
                                7CD3441B1F32DE30000DCD49 /* Cached Attributes w/ Invalidation */,
                                7C3D8EE41E08BABE0023B084 /* GC / Wrapping Only */,
+                               4B6B5CBE216434FB00603817 /* JSCSSPaintWorkletGlobalScopeCustom.cpp */,
                                9BC5F9DF1D5AAF6A002B749D /* JSCustomElementRegistryCustom.cpp */,
                                BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
                                652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
                                A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */,
                                A80E6CD60A1989CA007FB8C5 /* CSSPageRule.h */,
                                85C56CA60AA89D5F00D95755 /* CSSPageRule.idl */,
+                               4B5BDD9A21658A1500DD4262 /* CSSPaintCallback.h */,
+                               4B5BDD99216588E500DD4262 /* CSSPaintCallback.idl */,
+                               4B6B5CC1216439CF00603817 /* CSSPaintWorkletGlobalScope.cpp */,
+                               4B6B5CBF2164386400603817 /* CSSPaintWorkletGlobalScope.h */,
+                               4B6B5CC321643A8E00603817 /* CSSPaintWorkletGlobalScope.idl */,
                                9418278C1D8CAE9500492764 /* CSSPendingSubstitutionValue.cpp */,
                                9418278D1D8CAE9500492764 /* CSSPendingSubstitutionValue.h */,
                                A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */,
                                FD677735195CAB200072E0D3 /* DOMCSSNamespace.cpp */,
                                FC9A0F72164094CF003D6B8D /* DOMCSSNamespace.h */,
                                FC9A0F73164094CF003D6B8D /* DOMCSSNamespace.idl */,
+                               4B6B5CB92163ED3200603817 /* DOMCSSPaintWorklet.cpp */,
+                               4B6B5CB82163EC0700603817 /* DOMCSSPaintWorklet.h */,
+                               4B6B5CB62163DC1A00603817 /* DOMCSSPaintWorklet.idl */,
                                4BDA3FF72151B6F100FD6604 /* DOMCSSRegisterCustomProperty.cpp */,
                                4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */,
                                4BDA3FF52151B6F000FD6604 /* DOMCSSRegisterCustomProperty.idl */,
                                314BE3A11B30F6B700141982 /* CSSNamedImageValue.h in Headers */,
                                94E839511DFB2A0E007BC6A7 /* CSSNamespaceRule.h in Headers */,
                                A80E6D000A1989CA007FB8C5 /* CSSPageRule.h in Headers */,
+                               4B5BDD9B21658A1500DD4262 /* CSSPaintCallback.h in Headers */,
+                               4B6B5CC02164386400603817 /* CSSPaintWorkletGlobalScope.h in Headers */,
                                946D372E1D6CB2940077084F /* CSSParser.h in Headers */,
                                E4A7995220EE4B1400C19568 /* CSSParserContext.h in Headers */,
                                949C77011D6E1D9800C0DE4F /* CSSParserFastPaths.h in Headers */,
                                41380C291F3436AC00155FDA /* DOMCacheStorage.h in Headers */,
                                4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */,
                                FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */,
+                               4B6B5CBD21640EFF00603817 /* DOMCSSPaintWorklet.h in Headers */,
                                4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */,
                                7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */,
                                BC60D6E90D28D83400B9918F /* DOMException.h in Headers */,
diff --git a/Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp b/Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp
new file mode 100644 (file)
index 0000000..057ac3f
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * 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 "JSCSSPaintWorkletGlobalScope.h"
+
+#if ENABLE(CSS_PAINTING_API)
+
+#include "Document.h"
+#include "JSCSSPaintCallback.h"
+#include "JSDOMConvertCallbacks.h"
+#include "JSDOMConvertSequences.h"
+#include <wtf/SetForScope.h>
+
+namespace WebCore {
+using namespace JSC;
+
+static JSValue throwInvalidModificationError(ExecState& state, ThrowScope& scope, ASCIILiteral message)
+{
+    scope.assertNoException();
+    throwException(&state, scope, createDOMException(&state, InvalidModificationError, message));
+    return jsUndefined();
+}
+
+// https://drafts.css-houdini.org/css-paint-api/#registering-custom-paint
+JSValue JSCSSPaintWorkletGlobalScope::registerPaint(ExecState& state)
+{
+    using PaintDefinition = CSSPaintWorkletGlobalScope::PaintDefinition;
+
+    CSSPaintWorkletGlobalScope& workletGlobalScope = wrapped();
+    VM& vm = state.vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (UNLIKELY(state.argumentCount() < 2))
+        return throwException(&state, scope, createNotEnoughArgumentsError(&state));
+
+    AtomicString name(state.uncheckedArgument(0).toString(&state)->toAtomicString(&state));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    JSValue constructorValue = state.uncheckedArgument(1);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    if (name.isEmpty())
+        return throwTypeError(&state, scope, "The first argument must not be the empty string"_s);
+
+    auto& paintDefinitionMap = workletGlobalScope.paintDefinitionMap();
+
+    if (paintDefinitionMap.contains(name))
+        return throwInvalidModificationError(state, scope, "This name has already been registered"_s);
+
+    Vector<String> inputProperties;
+
+    JSValue inputPropertiesIterableValue = constructorValue.get(&state, Identifier::fromString(&vm, "inputProperties"));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    if (!inputPropertiesIterableValue.isUndefined())
+        inputProperties = convert<IDLSequence<IDLDOMString>>(state, inputPropertiesIterableValue);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    // FIXME: Validate input properties here (step 7).
+
+    Vector<String> inputArguments;
+
+    JSValue inputArgumentsIterableValue = constructorValue.get(&state, Identifier::fromString(&vm, "inputArguments"));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    if (!inputArgumentsIterableValue.isUndefined())
+        inputArguments = convert<IDLSequence<IDLDOMString>>(state, inputArgumentsIterableValue);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    // FIXME: Parse syntax for inputArguments here (steps 11 and 12).
+
+    JSValue contextOptionsValue = constructorValue.get(&state, Identifier::fromString(&vm, "contextOptions"));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+    UNUSED_PARAM(contextOptionsValue);
+
+    // FIXME: Convert to PaintRenderingContext2DSettings here (step 14).
+
+    if (!constructorValue.isConstructor(vm))
+        return throwTypeError(&state, scope, "The second argument must be a constructor"_s);
+
+    JSValue prototypeValue = constructorValue.get(&state, vm.propertyNames->prototype);
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    if (!prototypeValue.isObject())
+        return throwTypeError(&state, scope, "The second argument must have a prototype that is an object"_s);
+
+    JSValue paintValue = prototypeValue.get(&state, Identifier::fromString(&vm, "paint"));
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    if (paintValue.isUndefined())
+        return throwTypeError(&state, scope, "The class must have a paint method"_s);
+
+    RefPtr<JSCSSPaintCallback> paint = convert<IDLCallbackFunction<JSCSSPaintCallback>>(state, paintValue, *globalObject());
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    auto paintDefinition = std::unique_ptr<PaintDefinition>(new PaintDefinition { name });
+    paintDefinitionMap.add(name, WTFMove(paintDefinition));
+
+    // FIXME: construct documentDefinition (step 22).
+
+    // FIXME: This is for testing only.
+    paint->handleEvent();
+    RETURN_IF_EXCEPTION(scope, JSValue());
+
+    UNUSED_PARAM(inputProperties);
+    UNUSED_PARAM(inputArguments);
+
+    return jsUndefined();
+}
+
+}
+#endif
index 0613436..571e7c7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "BeforeUnloadEvent.h"
 #include "ContentSecurityPolicy.h"
+#include "EventNames.h"
 #include "Frame.h"
 #include "HTMLElement.h"
 #include "JSDOMConvertNullable.h"
index ee5be70..a7a5081 100644 (file)
@@ -30,6 +30,7 @@
 #include "WebCoreJSClientData.h"
 
 namespace WebCore {
+using namespace JSC;
 
 bool JSRemoteDOMWindow::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
 {
index 922399b..60b6636 100644 (file)
@@ -35,6 +35,7 @@
 #include "WebMetalRenderPassDepthAttachmentDescriptor.h"
 
 namespace WebCore {
+using namespace JSC;
 
 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<WebMetalRenderPassAttachmentDescriptor>&& object)
 {
index fb1a5d2..df43421 100644 (file)
@@ -51,6 +51,7 @@ namespace WebCore {
     macro(Credential) \
     macro(CredentialsContainer) \
     macro(CSSAnimation) \
+    macro(CSSPaintWorkletGlobalScope) \
     macro(CSSTransition) \
     macro(CustomElementRegistry) \
     macro(DataTransferItem) \
diff --git a/Source/WebCore/css/CSSPaintCallback.h b/Source/WebCore/css/CSSPaintCallback.h
new file mode 100644 (file)
index 0000000..d44bdb3
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * 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
+
+#if ENABLE(CSS_PAINTING_API)
+
+#include "ActiveDOMCallback.h"
+#include "CallbackResult.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class CSSPaintCallback : public RefCounted<CSSPaintCallback>, public ActiveDOMCallback {
+public:
+    using ActiveDOMCallback::ActiveDOMCallback;
+
+    virtual CallbackResult<void> handleEvent() = 0;
+
+    virtual ~CSSPaintCallback()
+    {
+    }
+};
+
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/css/CSSPaintCallback.idl b/Source/WebCore/css/CSSPaintCallback.idl
new file mode 100644 (file)
index 0000000..969c865
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+* 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=CSSPaintingAPI,
+    Conditional=CSS_PAINTING_API,
+] callback CSSPaintCallback = void ();
diff --git a/Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp b/Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp
new file mode 100644 (file)
index 0000000..ed973cd
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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 "CSSPaintWorkletGlobalScope.h"
+
+#if ENABLE(CSS_PAINTING_API)
+
+namespace WebCore {
+
+Ref<CSSPaintWorkletGlobalScope> CSSPaintWorkletGlobalScope::create()
+{
+    return adoptRef(*new CSSPaintWorkletGlobalScope());
+}
+
+CSSPaintWorkletGlobalScope::CSSPaintWorkletGlobalScope()
+{
+}
+
+double CSSPaintWorkletGlobalScope::devicePixelRatio()
+{
+    return 1.0;
+}
+
+ExceptionOr<void> CSSPaintWorkletGlobalScope::addRegisteredPaint()
+{
+    return { };
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/css/CSSPaintWorkletGlobalScope.h b/Source/WebCore/css/CSSPaintWorkletGlobalScope.h
new file mode 100644 (file)
index 0000000..90092d9
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * 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
+
+#if ENABLE(CSS_PAINTING_API)
+
+#include "ExceptionOr.h"
+#include <wtf/HashMap.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace JSC {
+
+class JSValue;
+
+} // namespace JSC
+
+namespace WebCore {
+
+class CSSPaintWorkletGlobalScope : public RefCounted<CSSPaintWorkletGlobalScope> {
+public:
+    static Ref<CSSPaintWorkletGlobalScope> create();
+
+    ExceptionOr<void> addRegisteredPaint();
+    double devicePixelRatio();
+
+    struct PaintDefinition {
+        const AtomicString name;
+    };
+
+    HashMap<String, std::unique_ptr<PaintDefinition>>& paintDefinitionMap() { return m_paintDefinitionMap; }
+
+private:
+    CSSPaintWorkletGlobalScope();
+
+    HashMap<String, std::unique_ptr<PaintDefinition>> m_paintDefinitionMap;
+};
+
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/css/CSSPaintWorkletGlobalScope.idl b/Source/WebCore/css/CSSPaintWorkletGlobalScope.idl
new file mode 100644 (file)
index 0000000..411eb74
--- /dev/null
@@ -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.
+*/
+
+[
+    EnabledAtRuntime=CSSPaintingAPI,
+    Conditional=CSS_PAINTING_API,
+    ImplementationLacksVTable,
+    JSGenerateToNativeObject
+] interface CSSPaintWorkletGlobalScope {
+    [Custom, MayThrowException] void registerPaint(DOMString name, Function paintCtor);
+    readonly attribute unrestricted double devicePixelRatio;
+};
diff --git a/Source/WebCore/css/DOMCSSPaintWorklet.cpp b/Source/WebCore/css/DOMCSSPaintWorklet.cpp
new file mode 100644 (file)
index 0000000..120681b
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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 "DOMCSSPaintWorklet.h"
+
+#if ENABLE(CSS_PAINTING_API)
+
+#include "CSSPaintWorkletGlobalScope.h"
+#include "DOMCSSNamespace.h"
+#include "Document.h"
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+CSSPaintWorkletGlobalScope& DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope(Document& document)
+{
+    return document.ensureCSSPaintWorkletGlobalScope();
+}
+
+DOMCSSPaintWorklet* DOMCSSPaintWorklet::from(DOMCSSNamespace& css)
+{
+    auto* supplement = static_cast<DOMCSSPaintWorklet*>(Supplement<DOMCSSNamespace>::from(&css, supplementName()));
+    if (!supplement) {
+        auto newSupplement = std::make_unique<DOMCSSPaintWorklet>(css);
+        supplement = newSupplement.get();
+        provideTo(&css, supplementName(), WTFMove(newSupplement));
+    }
+    return supplement;
+}
+
+const char* DOMCSSPaintWorklet::supplementName()
+{
+    return "DOMCSSPaintWorklet";
+}
+
+}
+#endif
diff --git a/Source/WebCore/css/DOMCSSPaintWorklet.h b/Source/WebCore/css/DOMCSSPaintWorklet.h
new file mode 100644 (file)
index 0000000..ee5efb1
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * 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
+
+#if ENABLE(CSS_PAINTING_API)
+
+#include "Supplementable.h"
+
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class Document;
+class CSSPaintWorkletGlobalScope;
+class DOMCSSNamespace;
+
+class DOMCSSPaintWorklet final : public Supplement<DOMCSSNamespace> {
+public:
+    explicit DOMCSSPaintWorklet(DOMCSSNamespace&) { }
+
+    static CSSPaintWorkletGlobalScope& ensurePaintWorkletGlobalScope(Document&);
+
+private:
+    static DOMCSSPaintWorklet* from(DOMCSSNamespace&);
+    static const char* supplementName();
+};
+
+} // namespace WebCore
+#endif
diff --git a/Source/WebCore/css/DOMCSSPaintWorklet.idl b/Source/WebCore/css/DOMCSSPaintWorklet.idl
new file mode 100644 (file)
index 0000000..190cdb4
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+* 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=CSSPaintingAPI,
+    Conditional=CSS_PAINTING_API,
+] partial interface DOMCSSNamespace {
+    // FIXME: This is not actually part of the spec, and should be replaced when worklets are implemented
+    [ImplementedAs=ensurePaintWorkletGlobalScope,CallWith=Document] static readonly attribute CSSPaintWorkletGlobalScope paintWorkletGlobalScope;
+};
index 6d110b4..6780030 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "MediaQueryParserContext.h"
 
+#include "CSSParserContext.h"
 #include "Document.h"
 #include "Page.h"
 
index d66ba03..8ee583e 100644 (file)
@@ -30,6 +30,7 @@
 
 namespace WebCore {
 
+struct CSSRegisteredCustomProperty;
 class CSSValue;
 class StyleResolver;
 struct CSSRegisteredCustomProperty;
index 0900fa5..4ec008e 100644 (file)
@@ -35,6 +35,7 @@
 #include "CDATASection.h"
 #include "CSSAnimationController.h"
 #include "CSSFontSelector.h"
+#include "CSSPaintWorkletGlobalScope.h"
 #include "CSSStyleDeclaration.h"
 #include "CSSStyleSheet.h"
 #include "CachedCSSStyleSheet.h"
@@ -8280,4 +8281,13 @@ void Document::frameWasDisconnectedFromOwner()
     detachFromFrame();
 }
 
+#if ENABLE(CSS_PAINTING_API)
+CSSPaintWorkletGlobalScope& Document::ensureCSSPaintWorkletGlobalScope()
+{
+    if (!m_CSSPaintWorkletGlobalScope)
+        m_CSSPaintWorkletGlobalScope = CSSPaintWorkletGlobalScope::create();
+    return *m_CSSPaintWorkletGlobalScope;
+}
+#endif
+
 } // namespace WebCore
index e42d5ac..cc0ade8 100644 (file)
@@ -88,6 +88,7 @@ class Attr;
 class CDATASection;
 class CSSCustomPropertyValue;
 class CSSFontSelector;
+class CSSPaintWorkletGlobalScope;
 class CSSStyleDeclaration;
 class CSSStyleSheet;
 class CachedCSSStyleSheet;
@@ -1502,6 +1503,10 @@ public:
     const CSSRegisteredCustomPropertySet& getCSSRegisteredCustomPropertySet() const { return m_CSSRegisteredPropertySet; }
     bool registerCSSProperty(CSSRegisteredCustomProperty&&);
 
+#if ENABLE(CSS_PAINTING_API)
+    CSSPaintWorkletGlobalScope& ensureCSSPaintWorkletGlobalScope();
+#endif
+
     void setAsRunningUserScripts() { m_isRunningUserScripts = true; }
     bool isRunningUserScripts() const { return m_isRunningUserScripts; }
 
@@ -2041,6 +2046,10 @@ private:
 
     CSSRegisteredCustomPropertySet m_CSSRegisteredPropertySet;
 
+#if ENABLE(CSS_PAINTING_API)
+    RefPtr<CSSPaintWorkletGlobalScope> m_CSSPaintWorkletGlobalScope;
+#endif
+
     bool m_isRunningUserScripts { false };
 };
 
index 765f61c..bd12783 100644 (file)
     {
         "name": "CSS Painting API Level 1",
         "status": {
-            "status": "Under Consideration"
+            "status": "Under Development"
         },
-        "url": "https://drafts.css-houdini.org/css-paint-api/",
+        "url": "https://drafts.css-houdini.org/css-paint-api-1/",
         "keywords": ["css", "houdini", "worklet"],
+        "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=190217",
         "category": "css"
     },
     {
index 4159c10..944b5de 100644 (file)
@@ -178,6 +178,11 @@ public:
     void setPointerEventsEnabled(bool isEnabled) { m_pointerEventsEnabled = isEnabled; }
     bool pointerEventsEnabled() const { return m_pointerEventsEnabled; }
 
+#if ENABLE(CSS_PAINTING_API)
+    void setCSSPaintingAPIEnabled(bool isEnabled) { m_CSSPaintingAPIEnabled = isEnabled; }
+    bool cssPaintingAPIEnabled() const { return m_CSSPaintingAPIEnabled; }
+#endif
+
 #if ENABLE(ATTACHMENT_ELEMENT)
     void setAttachmentElementEnabled(bool areEnabled) { m_isAttachmentElementEnabled = areEnabled; }
     bool attachmentElementEnabled() const { return m_isAttachmentElementEnabled; }
@@ -356,6 +361,10 @@ private:
     bool m_CSSCustomPropertiesAndValuesEnabled { false };
     bool m_pointerEventsEnabled { false };
 
+#if ENABLE(CSS_PAINTING_API)
+    bool m_CSSPaintingAPIEnabled { false };
+#endif
+
 #if ENABLE(ATTACHMENT_ELEMENT)
     bool m_isAttachmentElementEnabled { false };
 #endif
index 5df88b2..05a037c 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        * Configurations/FeatureDefines.xcconfig:
+        * Shared/WebPreferences.yaml:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2018-10-16  Philippe Normand  <pnormand@igalia.com>
 
         [GLib] Build error with RemoteInspector disabled
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 07ef06c..34dd273 100644 (file)
@@ -1312,6 +1312,15 @@ DarkModeCSSEnabled:
   category: experimental
   condition: ENABLE(DARK_MODE_CSS)
 
+CSSPaintingAPIEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "CSS Painting API"
+  humanReadableDescription: "Enable the CSS Painting API"
+  webcoreBinding: RuntimeEnabledFeatures
+  category: experimental
+  condition: ENABLE(CSS_PAINTING_API)
+
 # For internal features:
 # The type should be boolean.
 # You must provide a humanReadableName and humanReadableDescription for all debug features. They
index af58283..e2717a8 100644 (file)
@@ -256,6 +256,11 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
     if (preference == "CSSCustomPropertiesAndValuesEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setCSSCustomPropertiesAndValuesEnabled(enabled);
 
+#if ENABLE(CSS_PAINTING_API)
+    if (preference == "CSSPaintingAPIEnabled")
+        RuntimeEnabledFeatures::sharedFeatures().setCSSPaintingAPIEnabled(enabled);
+#endif
+
     // 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) \
index 0a6860b..b05e12d 100644 (file)
@@ -1,3 +1,12 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2018-10-16  Alex Christensen  <achristensen@webkit.org>
 
         Replace HistoryItem* with HistoryItem& where possible
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 9e93c71..dd59a83 100644 (file)
@@ -1,3 +1,12 @@
+2018-10-16  Justin Michaud  <justin_michaud@apple.com>
+
+        Implement feature flag and bindings for CSS Painting API
+        https://bugs.webkit.org/show_bug.cgi?id=190237
+
+        Reviewed by Ryosuke Niwa.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
 2018-10-16  Philippe Normand  <pnormand@igalia.com>
 
         Unreviewed, GTK Ubuntu LTS Jhbuild prospective build fix
index 74f9c72..dedc1ef 100644 (file)
@@ -86,6 +86,8 @@ ENABLE_CSS_IMAGE_ORIENTATION = ;
 
 ENABLE_CSS_IMAGE_RESOLUTION = ;
 
+ENABLE_CSS_PAINTING_API = ENABLE_CSS_PAINTING_API;
+
 ENABLE_CSS_SCROLL_SNAP = ENABLE_CSS_SCROLL_SNAP;
 
 ENABLE_CSS_SELECTORS_LEVEL4 = ENABLE_CSS_SELECTORS_LEVEL4;
@@ -376,4 +378,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET;
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);