Implement PaintWorklets for Houdini API

RESOLVED FIXED in Firefox 53

Status

()

Core
DOM
RESOLVED FIXED
10 months ago
a month ago

People

(Reporter: kechen, Assigned: baku)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 months ago
Spec: https://www.w3.org/TR/2016/WD-css-paint-api-1-20160607/#paint-worklet
(Reporter)

Updated

10 months ago
Depends on: 1290021
(Reporter)

Updated

10 months ago
Depends on: 1318573
No longer depends on: 1290021
(Assignee)

Comment 1

10 months ago
Created attachment 8819269 [details] [diff] [review]
01_paintWorklet.patch

I assign this bug to myself.
This first implementation introduces the paintWorkletGlobalScope.
Assignee: nobody → amarchesini
Attachment #8819269 - Flags: review?(bugs)
(In reply to Kevin Chen[:kechen] (UTC + 8) from comment #0)
> Spec: https://www.w3.org/TR/2016/WD-css-paint-api-1-20160607/#paint-worklet

Never ever use /TR/ specs. TR stands for Trash. Some people may say "Technical report", but "Trash" is more correct in practice. TR specs are almost always outdated.
Comment on attachment 8819269 [details] [diff] [review]
01_paintWorklet.patch

It is a bit unclear to me why we want to add more than just one worklet before we have sorted out what the setup will look like. More code to update once we finally get the proper setup.
But fine.

>+ * The origin of this IDL file is
>+ * https://www.w3.org/TR/2016/WD-css-paint-api-1-20160607/#paintworkletglobalscope
Hmm, not sure we want to have a link to a TR spec.

>+++ b/dom/webidl/Window.webidl
>@@ -10,16 +10,17 @@
>  * http://dev.w3.org/csswg/cssom/
>  * http://dev.w3.org/csswg/cssom-view/
>  * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
>  * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
>  * https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
>  * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
>  * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object
>  * https://w3c.github.io/requestidlecallback/
>+ * https://www.w3.org/TR/2016/WD-css-paint-api-1-20160607/#paint-worklet
Same here.
https://drafts.css-houdini.org/css-paint-api-1/ is the one we all should be looking at

> 
>+// https://www.w3.org/TR/2016/WD-css-paint-api-1-20160607/#paint-worklet
>+partial interface Window {
and here


>+++ b/dom/worklet/tests/worklet_paintWorklet.js
>@@ -0,0 +1,3 @@
>+// This should work for real... at some point.
>+registerPaint("sure!", () => {});
>+console.log("So far so good");
Could you somewhere here test also that the global is the right global.
Maybe something like
this instanceof PaintWorkletGlobalScope
Attachment #8819269 - Flags: review?(bugs) → review+
(Assignee)

Comment 4

10 months ago
The real implementation will happen in follow up bugs.

Comment 5

10 months ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d12e6223b584
PaintWorkletGlobalScope, r=smaug

Comment 6

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d12e6223b584
Status: NEW → RESOLVED
Last Resolved: 10 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
(Reporter)

Updated

9 months ago
No longer depends on: 1318573
You need to log in before you can comment on or make changes to this bug.