mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 02:31:41 +00:00
servo: Merge #17763 - Placed worklets implementation behind a pref (from asajeffrey:script-worklets-pref); r=jdm
<!-- Please describe your changes on the following line: --> At the moment, worklets are always exposed, even though their spec is still a draft. This PR hides them behind a pref. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17680. - [X] These changes do not require tests because the existing worklet tests do the job. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 92eeec297bb14f08873aecc04ca3734a37c0478f --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : d99773ba42509e1186b63fcd82826b0d479b9453
This commit is contained in:
parent
77f151c7c2
commit
4681c3056c
@ -4,7 +4,7 @@
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#cssstylevalue
|
||||
// NOTE: should this be exposed to Window?
|
||||
[Exposed=(Worklet)]
|
||||
[Pref="dom.worklet.enabled", Exposed=(Worklet)]
|
||||
interface CSSStyleValue {
|
||||
stringifier;
|
||||
// static CSSStyleValue? parse(DOMString property, DOMString cssText);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api/#paintrenderingcontext2d
|
||||
[Exposed=PaintWorklet]
|
||||
[Pref="dom.worklet.enabled", Exposed=PaintWorklet]
|
||||
interface PaintRenderingContext2D {
|
||||
};
|
||||
PaintRenderingContext2D implements CanvasState;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api/#paintsize
|
||||
[Exposed=PaintWorklet]
|
||||
[Pref="dom.worklet.enabled", Exposed=PaintWorklet]
|
||||
interface PaintSize {
|
||||
readonly attribute double width;
|
||||
readonly attribute double height;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope
|
||||
[Global=(Worklet,PaintWorklet), Exposed=PaintWorklet]
|
||||
[Global=(Worklet,PaintWorklet), Pref="dom.worklet.enabled", Exposed=PaintWorklet]
|
||||
interface PaintWorkletGlobalScope : WorkletGlobalScope {
|
||||
[Throws] void registerPaint(DOMString name, VoidFunction paintCtor);
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#stylepropertymapreadonly
|
||||
// NOTE: should this be exposed to Window?
|
||||
[Exposed=(Worklet)]
|
||||
[Pref="dom.worklet.enabled", Exposed=(Worklet)]
|
||||
interface StylePropertyMapReadOnly {
|
||||
CSSStyleValue? get(DOMString property);
|
||||
// sequence<CSSStyleValue> getAll(DOMString property);
|
||||
|
@ -5,7 +5,7 @@
|
||||
// This interface is entirely internal to Servo, and should not be accessible to
|
||||
// web pages.
|
||||
|
||||
[Global=(Worklet,TestWorklet), Exposed=TestWorklet]
|
||||
[Global=(Worklet,TestWorklet), Pref="dom.worklet.enabled", Exposed=TestWorklet]
|
||||
interface TestWorkletGlobalScope : WorkletGlobalScope {
|
||||
void registerKeyValue(DOMString key, DOMString value);
|
||||
};
|
||||
|
@ -206,5 +206,5 @@ partial interface Window {
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
||||
partial interface Window {
|
||||
[SameObject] readonly attribute Worklet paintWorklet;
|
||||
[SameObject, Pref="dom.worklet.enabled"] readonly attribute Worklet paintWorklet;
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://drafts.css-houdini.org/worklets/#worklet
|
||||
[Exposed=(Window)]
|
||||
[Pref="dom.worklet.enabled", Exposed=(Window)]
|
||||
interface Worklet {
|
||||
[NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options);
|
||||
};
|
||||
|
@ -5,6 +5,6 @@
|
||||
// https://drafts.css-houdini.org/worklets/#workletglobalscope
|
||||
// TODO: The spec IDL doesn't make this a subclass of EventTarget
|
||||
// https://github.com/whatwg/html/issues/2611
|
||||
[Exposed=Worklet]
|
||||
[Pref="dom.worklet.enabled", Exposed=Worklet]
|
||||
interface WorkletGlobalScope: GlobalScope {
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user