| Index: Source/core/frame/Window.idl
|
| diff --git a/Source/core/frame/Window.idl b/Source/core/frame/Window.idl
|
| index 24ea5ba274e24dc0363f127fc64ea9c58ee4cf67..294d143f8a949c2295e6c42008ea31259cf0b219 100644
|
| --- a/Source/core/frame/Window.idl
|
| +++ b/Source/core/frame/Window.idl
|
| @@ -24,8 +24,8 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -// HTML 5 draft spec:
|
| -// http://www.w3.org/html/wg/drafts/html/master/browsers.html#window
|
| +// https://html.spec.whatwg.org/#the-window-object
|
| +
|
| // FIXME: explain all uses of [DoNotCheckSecurity]
|
| [
|
| CheckSecurity=Frame,
|
| @@ -33,8 +33,12 @@
|
| ImplementedAs=DOMWindow,
|
| PrimaryGlobal,
|
| ] interface Window : EventTarget {
|
| - // DOM Level 0
|
| - readonly attribute Screen screen;
|
| + // the current browsing context
|
| + [DoNotCheckSecurity, Unforgeable] readonly attribute Window window;
|
| + [Replaceable, DoNotCheckSecurity] readonly attribute Window self;
|
| + readonly attribute Document document;
|
| + attribute DOMString name;
|
| + [DoNotCheckSecurity, PutForwards=href, Unforgeable] readonly attribute Location location;
|
| readonly attribute History history;
|
| [Replaceable, MeasureAs=BarPropLocationbar] readonly attribute BarProp locationbar;
|
| [Replaceable, MeasureAs=BarPropMenubar] readonly attribute BarProp menubar;
|
| @@ -42,123 +46,125 @@
|
| [Replaceable, MeasureAs=BarPropScrollbars] readonly attribute BarProp scrollbars;
|
| [Replaceable, MeasureAs=BarPropStatusbar] readonly attribute BarProp statusbar;
|
| [Replaceable, MeasureAs=BarPropToolbar] readonly attribute BarProp toolbar;
|
| - [LogActivity=GetterOnly] readonly attribute Navigator navigator;
|
| - [Replaceable] readonly attribute Navigator clientInformation;
|
| - [DoNotCheckSecurity, PutForwards=href, Unforgeable] readonly attribute Location location;
|
| - [Custom, MeasureAs=WindowEvent, NotEnumerable] attribute Event event;
|
| -
|
| - Selection getSelection();
|
| -
|
| - [CheckSecurity=Node, Custom=Getter] readonly attribute Element frameElement;
|
| -
|
| - [DoNotCheckSecurity, CallWith=ExecutionContext] void focus();
|
| - [DoNotCheckSecurity] void blur();
|
| + attribute DOMString status;
|
| [DoNotCheckSecurity, CallWith=ExecutionContext] void close();
|
| -
|
| - void print();
|
| + [DoNotCheckSecurity] readonly attribute boolean closed;
|
| void stop();
|
| + [DoNotCheckSecurity, CallWith=ExecutionContext] void focus();
|
| + [DoNotCheckSecurity] void blur();
|
|
|
| + // other browsing contexts
|
| + [Replaceable, DoNotCheckSecurity] readonly attribute Window frames;
|
| + [Replaceable, DoNotCheckSecurity] readonly attribute unsigned long length;
|
| + [DoNotCheckSecurity, Unforgeable] readonly attribute Window top;
|
| + [DoNotCheckSecurity, Custom=Setter] attribute Window opener;
|
| + [Replaceable, DoNotCheckSecurity] readonly attribute Window parent;
|
| + [CheckSecurity=Node, Custom=Getter] readonly attribute Element frameElement;
|
| [Custom] Window open(DOMString url,
|
| DOMString name,
|
| optional DOMString options);
|
| + [NotEnumerable, DoNotCheckSecurity] getter Window (unsigned long index);
|
| + [Custom, NotEnumerable, DoNotCheckSecurity] getter Window (DOMString name);
|
| +
|
| + // the user agent
|
| + [LogActivity=GetterOnly] readonly attribute Navigator navigator;
|
| + [RuntimeEnabled=ApplicationCache, LogActivity=GetterOnly] readonly attribute ApplicationCache applicationCache;
|
|
|
| + // user prompts
|
| void alert();
|
| void alert(DOMString message);
|
| boolean confirm(optional DOMString message = "");
|
| DOMString? prompt(optional DOMString message = "",
|
| optional DOMString defaultValue = "");
|
| + void print();
|
|
|
| - boolean find([Default=Undefined] optional DOMString string,
|
| - [Default=Undefined] optional boolean caseSensitive,
|
| - [Default=Undefined] optional boolean backwards,
|
| - [Default=Undefined] optional boolean wrap,
|
| - [Default=Undefined] optional boolean wholeWord,
|
| - [Default=Undefined] optional boolean searchInFrames,
|
| - [Default=Undefined] optional boolean showDialog);
|
| + [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(RequestAnimationFrameCallback callback);
|
| + void cancelAnimationFrame(long id);
|
|
|
| - [Replaceable, MeasureAs=WindowOffscreenBuffering, NotEnumerable] readonly attribute boolean offscreenBuffering;
|
| + [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, optional sequence<Transferable> transfer);
|
|
|
| - [Replaceable] readonly attribute long outerHeight;
|
| - [Replaceable] readonly attribute long outerWidth;
|
| - [Replaceable] readonly attribute long innerHeight;
|
| + // HTML obsolete features
|
| + // https://html.spec.whatwg.org/#Window-partial
|
| + [MeasureAs=WindowCaptureEvents] void captureEvents();
|
| + [MeasureAs=WindowReleaseEvents] void releaseEvents();
|
| +
|
| + // CSS Object Model (CSSOM)
|
| + // http://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface
|
| + [TypeChecking=Interface] CSSStyleDeclaration getComputedStyle(Element element, optional DOMString? pseudoElt = null);
|
| + // http://dev.w3.org/csswg/cssom/#utility-apis
|
| + [Replaceable] readonly attribute CSS CSS;
|
| +
|
| + // CSSOM View Module
|
| + // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface
|
| + MediaQueryList matchMedia(DOMString query);
|
| + readonly attribute Screen screen;
|
| +
|
| + // browsing context
|
| + void moveTo(optional long x, optional long y); // FIXME: Arguments should not be optional, or should have defaults.
|
| + void moveBy(optional long x, optional long y);
|
| + void resizeTo(optional long width, optional long height); // FIXME: Arguments should not be optional, or should have defaults.
|
| + void resizeBy(optional long x, optional long y);
|
| +
|
| + // viewport
|
| [Replaceable] readonly attribute long innerWidth;
|
| - [Replaceable] readonly attribute long screenX;
|
| - [Replaceable] readonly attribute long screenY;
|
| - [Replaceable] readonly attribute long screenLeft;
|
| - [Replaceable] readonly attribute long screenTop;
|
| + [Replaceable] readonly attribute long innerHeight;
|
| +
|
| + // viewport scrolling
|
| [Replaceable] readonly attribute double scrollX;
|
| - [Replaceable] readonly attribute double scrollY;
|
| readonly attribute double pageXOffset;
|
| + [Replaceable] readonly attribute double scrollY;
|
| readonly attribute double pageYOffset;
|
| -
|
| - void scrollBy(unrestricted double x, unrestricted double y);
|
| - [RuntimeEnabled=CSSOMSmoothScroll] void scrollBy([Default=Undefined] optional ScrollToOptions scrollToOptions);
|
| - void scrollTo(unrestricted double x, unrestricted double y);
|
| - [RuntimeEnabled=CSSOMSmoothScroll] void scrollTo([Default=Undefined] optional ScrollToOptions scrollToOptions);
|
| - void scroll(unrestricted double x, unrestricted double y);
|
| [RuntimeEnabled=CSSOMSmoothScroll] void scroll([Default=Undefined] optional ScrollToOptions scrollOptions);
|
| - void moveBy(optional long x, optional long y);
|
| - void moveTo(optional long x, optional long y); // FIXME: Arguments should not be optional, or should have defaults.
|
| - void resizeBy(optional long x, optional long y);
|
| - void resizeTo(optional long width, optional long height); // FIXME: Arguments should not be optional, or should have defaults.
|
| + void scroll(unrestricted double x, unrestricted double y);
|
| + [RuntimeEnabled=CSSOMSmoothScroll] void scrollTo([Default=Undefined] optional ScrollToOptions scrollToOptions);
|
| + void scrollTo(unrestricted double x, unrestricted double y);
|
| + [RuntimeEnabled=CSSOMSmoothScroll] void scrollBy([Default=Undefined] optional ScrollToOptions scrollToOptions);
|
| + void scrollBy(unrestricted double x, unrestricted double y);
|
|
|
| - [DoNotCheckSecurity] readonly attribute boolean closed;
|
| + // client
|
| + [Replaceable] readonly attribute long screenX;
|
| + [Replaceable] readonly attribute long screenY;
|
| + [Replaceable] readonly attribute long outerWidth;
|
| + [Replaceable] readonly attribute long outerHeight;
|
| + [Replaceable] readonly attribute double devicePixelRatio;
|
|
|
| - [Replaceable, DoNotCheckSecurity] readonly attribute unsigned long length;
|
| + // Selection API
|
| + // http://w3c.github.io/selection-api/#extensions-to-window-interface
|
| + Selection getSelection();
|
|
|
| - attribute DOMString name;
|
| + // Console API (non-standard but widely implemented in some form)
|
| + // https://developer.chrome.com/devtools/docs/console-api
|
| + [Replaceable] readonly attribute Console console;
|
|
|
| - attribute DOMString status;
|
| + // Non-standard APIs
|
| + [Replaceable] readonly attribute Navigator clientInformation;
|
| + [Custom, MeasureAs=WindowEvent, NotEnumerable] attribute Event event;
|
| + boolean find([Default=Undefined] optional DOMString string,
|
| + [Default=Undefined] optional boolean caseSensitive,
|
| + [Default=Undefined] optional boolean backwards,
|
| + [Default=Undefined] optional boolean wrap,
|
| + [Default=Undefined] optional boolean wholeWord,
|
| + [Default=Undefined] optional boolean searchInFrames,
|
| + [Default=Undefined] optional boolean showDialog);
|
| + [Replaceable, MeasureAs=WindowOffscreenBuffering, NotEnumerable] readonly attribute boolean offscreenBuffering;
|
| + [Replaceable] readonly attribute long screenLeft;
|
| + [Replaceable] readonly attribute long screenTop;
|
| [MeasureAs=WindowDefaultStatus] attribute DOMString defaultStatus;
|
| - // This attribute is an alias of defaultStatus and is necessary for legacy uses.
|
| [ImplementedAs=defaultStatus, MeasureAs=WindowDefaultstatus] attribute DOMString defaultstatus;
|
| -
|
| - // Self referential attributes
|
| - [Replaceable, DoNotCheckSecurity] readonly attribute Window self;
|
| - [DoNotCheckSecurity, Unforgeable] readonly attribute Window window;
|
| - [Replaceable, DoNotCheckSecurity] readonly attribute Window frames;
|
| -
|
| - [DoNotCheckSecurity, Custom=Setter] attribute Window opener;
|
| - [Replaceable, DoNotCheckSecurity] readonly attribute Window parent;
|
| - [DoNotCheckSecurity, Unforgeable] readonly attribute Window top;
|
| -
|
| - // DOM Level 2 AbstractView Interface
|
| - readonly attribute Document document;
|
| -
|
| - // CSSOM View Module
|
| - MediaQueryList matchMedia(DOMString query);
|
| -
|
| - // styleMedia has been removed from the CSSOM View specification.
|
| [MeasureAs=StyleMedia] readonly attribute StyleMedia styleMedia;
|
| -
|
| - // DOM Level 2 Style Interface
|
| - [TypeChecking=Interface] CSSStyleDeclaration getComputedStyle(Element element, optional DOMString? pseudoElt = null);
|
| -
|
| - // WebKit extensions
|
| [DeprecateAs=GetMatchedCSSRules] CSSRuleList getMatchedCSSRules([Default=Undefined] optional Element element,
|
| [TreatUndefinedAs=NullString, Default=Undefined] optional DOMString? pseudoElement);
|
| -
|
| - [Replaceable] readonly attribute double devicePixelRatio;
|
| -
|
| - [RuntimeEnabled=ApplicationCache, LogActivity=GetterOnly] readonly attribute ApplicationCache applicationCache;
|
| -
|
| // This is the interface orientation in degrees. Some examples are:
|
| // 0 is straight up; -90 is when the device is rotated 90 clockwise;
|
| // 90 is when rotated counter clockwise.
|
| [RuntimeEnabled=OrientationEvent, MeasureAs=WindowOrientation] readonly attribute long orientation;
|
| -
|
| - [Replaceable] readonly attribute Console console;
|
| -
|
| - // cross-document messaging
|
| - [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScriptValue message, DOMString targetOrigin, optional sequence<Transferable> transfer);
|
| -
|
| - [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(RequestAnimationFrameCallback callback);
|
| - void cancelAnimationFrame(long id);
|
| [DeprecateAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
|
| [DeprecateAs=PrefixedCancelAnimationFrame, ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(long id);
|
| [DeprecateAs=PrefixedCancelRequestAnimationFrame, ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(long id);
|
| -
|
| - [Replaceable] readonly attribute CSS CSS;
|
| + [MeasureAs=PrefixedTransitionEventConstructor] attribute TransitionEventConstructor WebKitTransitionEvent;
|
| + [RuntimeEnabled=CSSAnimationUnprefixed] attribute WebKitAnimationEventConstructor AnimationEvent;
|
| + [DeprecateAs=PrefixedWindowURL] attribute URLConstructor webkitURL;
|
| + [MeasureAs=PrefixedMutationObserverConstructor] attribute MutationObserverConstructor WebKitMutationObserver;
|
|
|
| // Event handler attributes
|
| [RuntimeEnabled=CSSAnimationUnprefixed] attribute EventHandler onanimationend;
|
| @@ -177,20 +183,8 @@
|
| attribute EventHandler onwebkittransitionend;
|
| attribute EventHandler onwheel;
|
|
|
| - [MeasureAs=WindowCaptureEvents] void captureEvents();
|
| - [MeasureAs=WindowReleaseEvents] void releaseEvents();
|
| -
|
| - // Additional constructors.
|
| - [MeasureAs=PrefixedTransitionEventConstructor] attribute TransitionEventConstructor WebKitTransitionEvent;
|
| - [RuntimeEnabled=CSSAnimationUnprefixed] attribute WebKitAnimationEventConstructor AnimationEvent;
|
| - [DeprecateAs=PrefixedWindowURL] attribute URLConstructor webkitURL;
|
| - [MeasureAs=PrefixedMutationObserverConstructor] attribute MutationObserverConstructor WebKitMutationObserver;
|
| -
|
| // window.toString() requires special handling in V8
|
| [DoNotCheckSignature, DoNotCheckSecurity, Custom, NotEnumerable] stringifier;
|
| -
|
| - [NotEnumerable, DoNotCheckSecurity] getter Window (unsigned long index);
|
| - [Custom, NotEnumerable, DoNotCheckSecurity] getter Window (DOMString name);
|
| };
|
|
|
| // http://www.whatwg.org/specs/web-apps/current-work/#transferable-objects
|
|
|