Bug 1151940 part 1. Make some readonly properties defined on Window by CSSOM-view replaceable. r=smaug

This commit is contained in:
Boris Zbarsky 2015-04-08 22:50:45 -04:00
parent 293095378e
commit bffd1522ed

View File

@ -160,8 +160,10 @@ dictionary ScrollToOptions : ScrollOptions {
partial interface Window {
//[Throws,NewObject] MediaQueryList matchMedia(DOMString query);
[Throws,NewObject] MediaQueryList? matchMedia(DOMString query);
//[SameObject]
[Throws] readonly attribute Screen screen;
// Per spec, screen is SameObject, but we don't actually guarantee that given
// nsGlobalWindow::Cleanup. :(
//[SameObject, Replaceable, Throws] readonly attribute Screen screen;
[Replaceable, Throws] readonly attribute Screen screen;
// browsing context
//[Throws] void moveTo(double x, double y);
@ -180,10 +182,6 @@ partial interface Window {
[Throws] attribute long innerHeight;
// viewport scrolling
//[Throws] readonly attribute double scrollX;
//[Throws] readonly attribute double pageXOffset;
//[Throws] readonly attribute double scrollY;
//[Throws] readonly attribute double pageYOffset;
void scroll(unrestricted double x, unrestricted double y);
void scroll(optional ScrollToOptions options);
void scrollTo(unrestricted double x, unrestricted double y);
@ -195,10 +193,16 @@ partial interface Window {
// mozScrollSnap is deprecated, to be replaced by a web accessible API, such
// as an extension to the ScrollOptions dictionary. See bug 1137937.
[ChromeOnly] void mozScrollSnap();
// The four properties below are double per spec at the moment, but whether
// that will continue is unclear.
//[Replaceable, Throws] readonly attribute double scrollX;
//[Replaceable, Throws] readonly attribute double pageXOffset;
//[Replaceable, Throws] readonly attribute double scrollY;
//[Replaceable, Throws] readonly attribute double pageYOffset;
[Replaceable, Throws] readonly attribute long scrollX;
[Throws] readonly attribute long pageXOffset;
[Replaceable, Throws] readonly attribute long pageXOffset;
[Replaceable, Throws] readonly attribute long scrollY;
[Throws] readonly attribute long pageYOffset;
[Replaceable, Throws] readonly attribute long pageYOffset;
// client
//[Throws] readonly attribute double screenX;
@ -303,7 +307,7 @@ partial interface Window {
[Throws] readonly attribute float mozInnerScreenX;
[Throws] readonly attribute float mozInnerScreenY;
[Throws] readonly attribute float devicePixelRatio;
[Replaceable, Throws] readonly attribute float devicePixelRatio;
/* The maximum offset that the window can be scrolled to
(i.e., the document width/height minus the scrollport width/height) */