Bug 190710 - [GTK][WPE] Enable CSS Painting API
Summary: [GTK][WPE] Enable CSS Painting API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
: 192435 (view as bug list)
Depends on:
Blocks: 190217
  Show dependency treegraph
 
Reported: 2018-10-18 07:53 PDT by Miguel Gomez
Modified: 2019-11-12 06:42 PST (History)
10 users (show)

See Also:


Attachments
Patch (6.25 KB, patch)
2019-11-11 14:40 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2018-10-18 07:53:17 PDT
fast/css-custom-paint/basic.html [ Failure ]

with this diff:

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/css-custom-paint/basic-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/css-custom-paint/basic-actual.txt
@@ -1,9 +1,9 @@
 
-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 
-PASS test that test div has paint() value 
+FAIL test that registerPaint runs undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL test that registerPaint runs without inputProperties undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL test that registerPaint runs with inputArguments undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL test that registerPaint runs with contextOptions undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL test that registerPaint runs with predefined class undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL test that registerPaint accepts only a string and a class constructor assert_throws: function "() => CSS.paintWorkletGlobalScope.registerPaint('test6', 'test')" threw object "TypeError: undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')" ("TypeError") expected object "[object Object]" ("InvalidModificationError")
+FAIL test that test div has paint() value assert_equals: expected "paint(my-paint)" but got "none"
 

and fast/css-custom-paint/registerPaintBindings.html [ Failure ]

with this diff

--- /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/css-custom-paint/registerPaintBindings-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-release-tests/build/layout-test-results/fast/css-custom-paint/registerPaintBindings-actual.txt
@@ -1,13 +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 
+FAIL registerPaint must be a method undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.__proto__')
+FAIL must get "prototype" property of the constructor undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL must rethrow an exception thrown while getting "inputProperties" property of the constructor assert_throws: function "function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-inputProperties0', proxy); }" threw object "TypeError: undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')" ("TypeError") expected object "[object Object]" ("expectedError")
+FAIL must rethrow an exception thrown while getting "prototype" property of the constructor assert_throws: function "function () { CSS.paintWorkletGlobalScope.registerPaint('test-rethrow-proto', proxy); }" threw object "TypeError: undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')" ("TypeError") expected object "[object Object]" ("expectedError")
 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> 
+FAIL must get paint callback of the constructor prototype undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')
+FAIL must rethrow an exception thrown while getting paint callback on the constructor prototype assert_throws: function "function () { CSS.paintWorkletGlobalScope.registerPaint('callbacks-throw', constructor); }" threw object "TypeError: undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')" ("TypeError") expected object "[object Object]" ("expectedError")
+FAIL must rethrow an exception thrown while converting paint callback value to Function callback type assert_array_equals: lengths differ, expected 1 got 0
+FAIL must rethrow an exception thrown while converting the value of inputArguments to sequence<DOMString> assert_array_equals: lengths differ, expected 2 got 0
+FAIL must rethrow an exception thrown while iterating over inputArguments to sequence<DOMString> assert_throws: function "function () { CSS.paintWorkletGlobalScope.registerPaint('sequence-throw2', constructor); }" threw object "TypeError: undefined is not an object (evaluating 'CSS.paintWorkletGlobalScope.registerPaint')" ("TypeError") expected object "[object Object]" ("SomeError")
 PASS must rethrow an exception thrown while retrieving Symbol.iterator on inputArguments
Comment 1 Claudio Saavedra 2019-01-07 07:55:34 PST
*** Bug 192435 has been marked as a duplicate of this bug. ***
Comment 2 Claudio Saavedra 2019-01-07 08:01:00 PST
I'm skipping the whole directory instead of marking individual failures since the feature is disabled (same for WPE). Let's revisit the tests once the feature is enabled in the ports (or by default).
Comment 3 Carlos Alberto Lopez Perez 2019-11-11 14:34:43 PST
Here are some resources/demos for CSS Painting API: 

https://developer.mozilla.org/en-US/docs/Web/API/CSS_Painting_API
https://bobrov.dev/css-paint-demos/

Most of the demos work on GTK/WPE once the feature is enabled and the layout test pass.

So I think its a good idea to enable this (as an experimental feature for now).
Comment 4 Carlos Alberto Lopez Perez 2019-11-11 14:40:43 PST
Created attachment 383301 [details]
Patch
Comment 5 Carlos Alberto Lopez Perez 2019-11-12 06:42:17 PST
Comment on attachment 383301 [details]
Patch

Clearing flags on attachment: 383301

Committed r252361: <https://trac.webkit.org/changeset/252361>
Comment 6 Carlos Alberto Lopez Perez 2019-11-12 06:42:22 PST
All reviewed patches have been landed.  Closing bug.