Commit 6c22af8f authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Reorganize members of window.idl and worker_global_scope.idl

- Consolidate 'origin' and 'queueMicrotask'
- Move 'customElements' to the top section
- Move requestAnimationFrame() and cancelAnimationFrame() to their own section
- Move requestIdleCCallback() and cacelIdleCallback() to their own section
- Update comments

This CL has no behavior changes.

Change-Id: I4472c1582933a53703510ab33d35f4f1a0824541
Reviewed-on: https://chromium-review.googlesource.com/1256391Reviewed-by: default avatarFergal Daly <fergal@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595792}
parent 0074bc43
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
[Affects=Nothing, Unforgeable, CrossOrigin] readonly attribute Window window; [Affects=Nothing, Unforgeable, CrossOrigin] readonly attribute Window window;
[Replaceable, CrossOrigin] readonly attribute Window self; [Replaceable, CrossOrigin] readonly attribute Window self;
[Affects=Nothing, Unforgeable, CachedAccessor] readonly attribute Document document; [Affects=Nothing, Unforgeable, CachedAccessor] readonly attribute Document document;
[Replaceable] readonly attribute DOMString origin;
attribute DOMString name; attribute DOMString name;
[Affects=Nothing, PutForwards=href, Unforgeable, CrossOrigin=(Getter,Setter), Custom=Getter] readonly attribute Location location; [Affects=Nothing, PutForwards=href, Unforgeable, CrossOrigin=(Getter,Setter), Custom=Getter] readonly attribute Location location;
[CallWith=ScriptState] readonly attribute CustomElementRegistry customElements;
[Affects=Nothing] readonly attribute History history; [Affects=Nothing] readonly attribute History history;
[Replaceable, MeasureAs=BarPropLocationbar] readonly attribute BarProp locationbar; [Replaceable, MeasureAs=BarPropLocationbar] readonly attribute BarProp locationbar;
[Replaceable, MeasureAs=BarPropMenubar] readonly attribute BarProp menubar; [Replaceable, MeasureAs=BarPropMenubar] readonly attribute BarProp menubar;
...@@ -94,22 +94,19 @@ ...@@ -94,22 +94,19 @@
[Measure, CallWith=ScriptState] DOMString? prompt(optional DOMString message = "", optional DOMString defaultValue = ""); [Measure, CallWith=ScriptState] DOMString? prompt(optional DOMString message = "", optional DOMString defaultValue = "");
[Measure, CallWith=ScriptState] void print(); [Measure, CallWith=ScriptState] void print();
[MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(FrameRequestCallback callback);
void cancelAnimationFrame(long handle);
[Measure] long requestIdleCallback(IdleRequestCallback callback, optional IdleRequestOptions options);
void cancelIdleCallback(long handle);
[CrossOrigin, CallWith=CurrentWindow, RaisesException] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); [CrossOrigin, CallWith=CurrentWindow, RaisesException] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
[CrossOrigin, CallWith=CurrentWindow, RaisesException, RuntimeEnabled=PostMessageOptions] void postMessage(any message, optional WindowPostMessageOptions options); [CrossOrigin, CallWith=CurrentWindow, RaisesException, RuntimeEnabled=PostMessageOptions] void postMessage(any message, optional WindowPostMessageOptions options);
// WindowOrWorkerGlobalScope mixin
// https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin // https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin
[Replaceable] readonly attribute DOMString origin;
void queueMicrotask(VoidFunction callback); void queueMicrotask(VoidFunction callback);
// Custom elements // AnimationFrameProvider mixin
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-api // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
[CallWith=ScriptState] readonly attribute CustomElementRegistry customElements; [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(FrameRequestCallback callback);
void cancelAnimationFrame(long handle);
// HTML obsolete features // HTML obsolete features
// https://html.spec.whatwg.org/#Window-partial // https://html.spec.whatwg.org/#Window-partial
...@@ -118,6 +115,11 @@ ...@@ -118,6 +115,11 @@
[Replaceable, SameObject] readonly attribute External external; [Replaceable, SameObject] readonly attribute External external;
// Cooperative Scheduling of Background Tasks
// https://www.w3.org/TR/requestidlecallback/#window_extensions
[Measure] long requestIdleCallback(IdleRequestCallback callback, optional IdleRequestOptions options);
void cancelIdleCallback(long handle);
// CSS Object Model (CSSOM) // CSS Object Model (CSSOM)
// https://drafts.csswg.org/cssom/#extensions-to-the-window-interface // https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
[Affects=Nothing, NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt); [Affects=Nothing, NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString? pseudoElt);
......
...@@ -63,17 +63,20 @@ ...@@ -63,17 +63,20 @@
// https://w3c.github.io/webappsec-secure-contexts/#dom-windoworworkerglobalscope-issecurecontext // https://w3c.github.io/webappsec-secure-contexts/#dom-windoworworkerglobalscope-issecurecontext
[ImplementedAs=isSecureContextForBindings] readonly attribute boolean isSecureContext; [ImplementedAs=isSecureContextForBindings] readonly attribute boolean isSecureContext;
// WindowOrWorkerGlobalScope mixin
// https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin // https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin
[Replaceable] readonly attribute DOMString origin; [Replaceable] readonly attribute DOMString origin;
// https://html.spec.whatwg.org/#windoworworkerglobalscope-mixin
void queueMicrotask(VoidFunction callback); void queueMicrotask(VoidFunction callback);
// TODO(fserb): temporarly until we can enable the interface below. // AnimationFrameProvider mixin
[RuntimeEnabled=OffscreenCanvasText] readonly attribute FontFaceSet fonts; // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames
[RuntimeEnabled=OffscreenCanvas, RaisesException] long requestAnimationFrame(FrameRequestCallback callback); [RuntimeEnabled=OffscreenCanvas, RaisesException] long requestAnimationFrame(FrameRequestCallback callback);
[RuntimeEnabled=OffscreenCanvas] void cancelAnimationFrame(long handle); [RuntimeEnabled=OffscreenCanvas] void cancelAnimationFrame(long handle);
// FontFaceSource
// https://drafts.csswg.org/css-font-loading-3/#font-face-source
// TODO(fserb): temporarly until we can enable the interface below.
[RuntimeEnabled=OffscreenCanvasText] readonly attribute FontFaceSet fonts;
}; };
WorkerGlobalScope implements WindowBase64; WorkerGlobalScope implements WindowBase64;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment