| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 [ | 27 [ |
| 28 CheckSecurity, | 28 CheckSecurity, |
| 29 EventTarget, | |
| 30 CustomToV8, | 29 CustomToV8, |
| 31 DoNotGenerateWrap, | 30 DoNotGenerateWrap, |
| 32 ImplementedAs=DOMWindow | 31 ImplementedAs=DOMWindow |
| 33 ] interface Window { | 32 ] interface Window : EventTarget { |
| 34 // DOM Level 0 | 33 // DOM Level 0 |
| 35 [Replaceable] readonly attribute Screen screen; | 34 [Replaceable] readonly attribute Screen screen; |
| 36 [Replaceable] readonly attribute History history; | 35 [Replaceable] readonly attribute History history; |
| 37 [Replaceable] readonly attribute BarProp locationbar; | 36 [Replaceable] readonly attribute BarProp locationbar; |
| 38 [Replaceable] readonly attribute BarProp menubar; | 37 [Replaceable] readonly attribute BarProp menubar; |
| 39 [Replaceable] readonly attribute BarProp personalbar; | 38 [Replaceable] readonly attribute BarProp personalbar; |
| 40 [Replaceable] readonly attribute BarProp scrollbars; | 39 [Replaceable] readonly attribute BarProp scrollbars; |
| 41 [Replaceable] readonly attribute BarProp statusbar; | 40 [Replaceable] readonly attribute BarProp statusbar; |
| 42 [Replaceable] readonly attribute BarProp toolbar; | 41 [Replaceable] readonly attribute BarProp toolbar; |
| 43 [Replaceable, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonl
y attribute Navigator navigator; | 42 [Replaceable, PerWorldBindings, ActivityLog=GetterForIsolatedWorlds] readonl
y attribute Navigator navigator; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // 90 is when rotated counter clockwise. | 153 // 90 is when rotated counter clockwise. |
| 155 [Conditional=ORIENTATION_EVENTS] readonly attribute long orientation; | 154 [Conditional=ORIENTATION_EVENTS] readonly attribute long orientation; |
| 156 | 155 |
| 157 [Replaceable] readonly attribute Console console; | 156 [Replaceable] readonly attribute Console console; |
| 158 | 157 |
| 159 // cross-document messaging | 158 // cross-document messaging |
| 160 [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScr
iptValue message, DOMString targetOrigin, optional Array messagePorts); | 159 [DoNotCheckSecurity, Custom, RaisesException] void postMessage(SerializedScr
iptValue message, DOMString targetOrigin, optional Array messagePorts); |
| 161 | 160 |
| 162 [Replaceable] readonly attribute Performance performance; | 161 [Replaceable] readonly attribute Performance performance; |
| 163 | 162 |
| 163 // Images |
| 164 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLImageElement image, ImageBitmapCallback callback); |
| 165 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLImageElement image, ImageBitmapCallback callback, long sx, long sy
, long sw, long sh); |
| 166 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLVideoElement video, ImageBitmapCallback callback); |
| 167 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLVideoElement video, ImageBitmapCallback callback, long sx, long sy
, long sw, long sh); |
| 168 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(CanvasRenderingContext2D context, ImageBitmapCallback callback); |
| 169 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(CanvasRenderingContext2D context, ImageBitmapCallback callback, long s
x, long sy, long sw, long sh); |
| 170 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLCanvasElement canvas, ImageBitmapCallback callback); |
| 171 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(HTMLCanvasElement canvas, ImageBitmapCallback callback, long sx, long
sy, long sw, long sh); |
| 172 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(ImageData data, ImageBitmapCallback callback); |
| 173 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(ImageData data, ImageBitmapCallback callback, long sx, long sy, long s
w, long sh); |
| 174 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(ImageBitmap bitmap, ImageBitmapCallback callback); |
| 175 [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createIm
ageBitmap(ImageBitmap bitmap, ImageBitmapCallback callback, long sx, long sy, lo
ng sw, long sh); |
| 176 |
| 164 [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(Reque
stAnimationFrameCallback callback); | 177 [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(Reque
stAnimationFrameCallback callback); |
| 165 void cancelAnimationFrame(long id); | 178 void cancelAnimationFrame(long id); |
| 166 [MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(R
equestAnimationFrameCallback callback); | 179 [MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(R
equestAnimationFrameCallback callback); |
| 167 [ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(long id
); | 180 [ImplementedAs=cancelAnimationFrame] void webkitCancelAnimationFrame(long id
); |
| 168 [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(
long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove
this when removing vendor prefix. | 181 [ImplementedAs=cancelAnimationFrame] void webkitCancelRequestAnimationFrame(
long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove
this when removing vendor prefix. |
| 169 | 182 |
| 170 // Base64 | |
| 171 [RaisesException] DOMString atob([TreatNullAs=NullString,Default=Undefined]
optional DOMString string); | |
| 172 [RaisesException] DOMString btoa([TreatNullAs=NullString,Default=Undefined]
optional DOMString string); | |
| 173 | |
| 174 [Replaceable] readonly attribute CSS CSS; | 183 [Replaceable] readonly attribute CSS CSS; |
| 175 | 184 |
| 176 // Events | 185 // Events |
| 177 attribute EventListener onabort; | 186 attribute EventListener onabort; |
| 178 attribute EventListener onbeforeunload; | 187 attribute EventListener onbeforeunload; |
| 179 attribute EventListener onblur; | 188 attribute EventListener onblur; |
| 180 attribute EventListener oncanplay; | 189 attribute EventListener oncanplay; |
| 181 attribute EventListener oncanplaythrough; | 190 attribute EventListener oncanplaythrough; |
| 182 attribute EventListener onchange; | 191 attribute EventListener onchange; |
| 183 attribute EventListener onclick; | 192 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onclick; |
| 184 attribute EventListener oncontextmenu; | 193 attribute EventListener oncontextmenu; |
| 185 attribute EventListener ondblclick; | 194 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondblclick; |
| 186 attribute EventListener ondrag; | 195 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondrag; |
| 187 attribute EventListener ondragend; | 196 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondragend; |
| 188 attribute EventListener ondragenter; | 197 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondragenter; |
| 189 attribute EventListener ondragleave; | 198 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondragleave; |
| 190 attribute EventListener ondragover; | 199 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondragover; |
| 191 attribute EventListener ondragstart; | 200 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondragstart; |
| 192 attribute EventListener ondrop; | 201 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner ondrop; |
| 193 attribute EventListener ondurationchange; | 202 attribute EventListener ondurationchange; |
| 194 attribute EventListener onemptied; | 203 attribute EventListener onemptied; |
| 195 attribute EventListener onended; | 204 attribute EventListener onended; |
| 196 attribute EventListener onerror; | 205 attribute EventListener onerror; |
| 197 attribute EventListener onfocus; | 206 attribute EventListener onfocus; |
| 198 attribute EventListener onhashchange; | 207 attribute EventListener onhashchange; |
| 199 attribute EventListener oninput; | 208 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner oninput; |
| 200 attribute EventListener oninvalid; | 209 attribute EventListener oninvalid; |
| 201 attribute EventListener onkeydown; | 210 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onkeydown; |
| 202 attribute EventListener onkeypress; | 211 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onkeypress; |
| 203 attribute EventListener onkeyup; | 212 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onkeyup; |
| 204 attribute EventListener onload; | 213 attribute EventListener onload; |
| 205 attribute EventListener onloadeddata; | 214 attribute EventListener onloadeddata; |
| 206 attribute EventListener onloadedmetadata; | 215 attribute EventListener onloadedmetadata; |
| 207 attribute EventListener onloadstart; | 216 attribute EventListener onloadstart; |
| 208 attribute EventListener onmessage; | 217 attribute EventListener onmessage; |
| 209 attribute EventListener onmousedown; | 218 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmousedown; |
| 210 attribute EventListener onmousemove; | 219 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmouseenter; |
| 211 attribute EventListener onmouseout; | 220 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmouseleave; |
| 212 attribute EventListener onmouseover; | 221 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmousemove; |
| 213 attribute EventListener onmouseup; | 222 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmouseout; |
| 214 attribute EventListener onmousewheel; | 223 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmouseover; |
| 224 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmouseup; |
| 225 [PerWorldBindings, ActivityLog=SetterForIsolatedWorlds] attribute EventListe
ner onmousewheel; |
| 215 attribute EventListener onoffline; | 226 attribute EventListener onoffline; |
| 216 attribute EventListener ononline; | 227 attribute EventListener ononline; |
| 217 attribute EventListener onpagehide; | 228 attribute EventListener onpagehide; |
| 218 attribute EventListener onpageshow; | 229 attribute EventListener onpageshow; |
| 219 attribute EventListener onpause; | 230 attribute EventListener onpause; |
| 220 attribute EventListener onplay; | 231 attribute EventListener onplay; |
| 221 attribute EventListener onplaying; | 232 attribute EventListener onplaying; |
| 222 attribute EventListener onpopstate; | 233 attribute EventListener onpopstate; |
| 223 attribute EventListener onprogress; | 234 attribute EventListener onprogress; |
| 224 attribute EventListener onratechange; | 235 attribute EventListener onratechange; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 254 attribute EventListener ontransitionend; | 265 attribute EventListener ontransitionend; |
| 255 [Conditional=ORIENTATION_EVENTS] attribute EventListener onorientationchange
; | 266 [Conditional=ORIENTATION_EVENTS] attribute EventListener onorientationchange
; |
| 256 [EnabledAtRuntime=touch] attribute EventListener ontouchstart; | 267 [EnabledAtRuntime=touch] attribute EventListener ontouchstart; |
| 257 [EnabledAtRuntime=touch] attribute EventListener ontouchmove; | 268 [EnabledAtRuntime=touch] attribute EventListener ontouchmove; |
| 258 [EnabledAtRuntime=touch] attribute EventListener ontouchend; | 269 [EnabledAtRuntime=touch] attribute EventListener ontouchend; |
| 259 [EnabledAtRuntime=touch] attribute EventListener ontouchcancel; | 270 [EnabledAtRuntime=touch] attribute EventListener ontouchcancel; |
| 260 | 271 |
| 261 [EnabledAtRuntime=deviceMotion] attribute EventListener ondevicemotion; | 272 [EnabledAtRuntime=deviceMotion] attribute EventListener ondevicemotion; |
| 262 [EnabledAtRuntime=deviceOrientation] attribute EventListener ondeviceorienta
tion; | 273 [EnabledAtRuntime=deviceOrientation] attribute EventListener ondeviceorienta
tion; |
| 263 | 274 |
| 264 // EventTarget interface | |
| 265 [Custom] void addEventListener(DOMString type, | |
| 266 EventListener listener, | |
| 267 optional boolean useCapture); | |
| 268 [Custom] void removeEventListener(DOMString type, | |
| 269 EventListener listener, | |
| 270 optional boolean useCapture); | |
| 271 [RaisesException] boolean dispatchEvent(Event evt); | |
| 272 | |
| 273 // Additional constructors. | 275 // Additional constructors. |
| 274 attribute TransitionEventConstructor WebKitTransitionEvent; | 276 attribute TransitionEventConstructor WebKitTransitionEvent; |
| 275 [CustomConstructor] attribute HTMLImageElementConstructorConstructor Image;
// Usable with new operator | 277 [CustomConstructor] attribute HTMLImageElementConstructorConstructor Image;
// Usable with new operator |
| 276 // Mozilla has a separate XMLDocument object for XML documents. | 278 // Mozilla has a separate XMLDocument object for XML documents. |
| 277 // We just use Document for this. | 279 // We just use Document for this. |
| 278 attribute DocumentConstructor XMLDocument; | 280 attribute DocumentConstructor XMLDocument; |
| 279 attribute URLConstructor webkitURL; // FIXME: deprecate this. | 281 attribute URLConstructor webkitURL; // FIXME: deprecate this. |
| 280 attribute MutationObserverConstructor WebKitMutationObserver; // FIXME: Add
metrics to determine when we can remove this. | 282 attribute MutationObserverConstructor WebKitMutationObserver; // FIXME: Add
metrics to determine when we can remove this. |
| 281 attribute IDBCursorConstructor webkitIDBCursor; | 283 attribute IDBCursorConstructor webkitIDBCursor; |
| 282 attribute IDBDatabaseConstructor webkitIDBDatabase; | 284 attribute IDBDatabaseConstructor webkitIDBDatabase; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 302 [Conditional=WEB_AUDIO] attribute PannerNodeConstructor webkitAudioPannerNod
e; | 304 [Conditional=WEB_AUDIO] attribute PannerNodeConstructor webkitAudioPannerNod
e; |
| 303 | 305 |
| 304 // window.toString() requires special handling in V8 | 306 // window.toString() requires special handling in V8 |
| 305 [DoNotCheckSignature, DoNotCheckSecurity, Custom, NotEnumerable] DOMString t
oString(); | 307 [DoNotCheckSignature, DoNotCheckSecurity, Custom, NotEnumerable] DOMString t
oString(); |
| 306 | 308 |
| 307 [ImplementedAs=anonymousIndexedGetter, NotEnumerable] getter Window(unsigned
long index); | 309 [ImplementedAs=anonymousIndexedGetter, NotEnumerable] getter Window(unsigned
long index); |
| 308 [Custom, NotEnumerable] getter Window (DOMString name); | 310 [Custom, NotEnumerable] getter Window (DOMString name); |
| 309 }; | 311 }; |
| 310 | 312 |
| 311 Window implements WindowTimers; | 313 Window implements WindowTimers; |
| 312 | 314 Window implements WindowBase64; |
| OLD | NEW |