Chromium Code Reviews| 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 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 CustomPutFunction, | 35 CustomPutFunction, |
| 36 EventTarget, | 36 EventTarget, |
| 37 ExtendsDOMGlobalObject, | 37 ExtendsDOMGlobalObject, |
| 38 JSGenerateToNativeObject, | 38 JSGenerateToNativeObject, |
| 39 ReplaceableConstructor, | 39 ReplaceableConstructor, |
| 40 JSLegacyParent=JSDOMWindowBase, | 40 JSLegacyParent=JSDOMWindowBase, |
| 41 V8CustomToJSObject, | 41 V8CustomToJSObject, |
| 42 InterfaceName=Window | 42 InterfaceName=Window |
| 43 ] interface DOMWindow { | 43 ] interface DOMWindow { |
| 44 // DOM Level 0 | 44 // DOM Level 0 |
| 45 attribute [Replaceable] Screen screen; | 45 [Replaceable] readonly attribute Screen screen; |
| 46 attribute [Replaceable, DoNotCheckSecurityOnGetter] History history; | 46 [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute History history ; |
| 47 attribute [Replaceable] BarInfo locationbar; | 47 [Replaceable] readonly attribute BarInfo locationbar; |
| 48 attribute [Replaceable] BarInfo menubar; | 48 [Replaceable] readonly attribute BarInfo menubar; |
| 49 attribute [Replaceable] BarInfo personalbar; | 49 [Replaceable] readonly attribute BarInfo personalbar; |
| 50 attribute [Replaceable] BarInfo scrollbars; | 50 [Replaceable] readonly attribute BarInfo scrollbars; |
| 51 attribute [Replaceable] BarInfo statusbar; | 51 [Replaceable] readonly attribute BarInfo statusbar; |
| 52 attribute [Replaceable] BarInfo toolbar; | 52 [Replaceable] readonly attribute BarInfo toolbar; |
| 53 attribute [Replaceable] Navigator navigator; | 53 [Replaceable] readonly attribute Navigator navigator; |
| 54 attribute [Replaceable] Navigator clientInformation; | 54 [Replaceable] readonly attribute Navigator clientInformation; |
| 55 readonly attribute Crypto crypto; | 55 readonly attribute Crypto crypto; |
| 56 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP | 56 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP |
| 57 attribute [DoNotCheckSecurity, CustomSetter, V8Unforgeable] Location locatio n; | 57 attribute [DoNotCheckSecurity, CustomSetter, V8Unforgeable] Location locatio n; |
| 58 #endif | 58 #endif |
| 59 attribute [Replaceable, CustomGetter, V8CustomSetter] Event event; | 59 [Replaceable, CustomGetter, V8CustomSetter] readonly attribute Event event; |
| 60 | 60 |
| 61 DOMSelection getSelection(); | 61 DOMSelection getSelection(); |
| 62 | 62 |
| 63 readonly attribute [CheckSecurityForNode] Element frameElement; | 63 readonly attribute [CheckSecurityForNode] Element frameElement; |
| 64 | 64 |
| 65 [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void focus(); | 65 [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void focus(); |
| 66 [DoNotCheckSecurity] void blur(); | 66 [DoNotCheckSecurity] void blur(); |
| 67 [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void close(); | 67 [DoNotCheckSecurity, CallWith=ScriptExecutionContext] void close(); |
| 68 | 68 |
| 69 void print(); | 69 void print(); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 83 in [TreatNullAs=NullString, Trea tUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString defaultValue); | 83 in [TreatNullAs=NullString, Trea tUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString defaultValue); |
| 84 | 84 |
| 85 boolean find(in [Optional=DefaultIsUndefined] DOMString string, | 85 boolean find(in [Optional=DefaultIsUndefined] DOMString string, |
| 86 in [Optional=DefaultIsUndefined] boolean caseSensitive, | 86 in [Optional=DefaultIsUndefined] boolean caseSensitive, |
| 87 in [Optional=DefaultIsUndefined] boolean backwards, | 87 in [Optional=DefaultIsUndefined] boolean backwards, |
| 88 in [Optional=DefaultIsUndefined] boolean wrap, | 88 in [Optional=DefaultIsUndefined] boolean wrap, |
| 89 in [Optional=DefaultIsUndefined] boolean wholeWord, | 89 in [Optional=DefaultIsUndefined] boolean wholeWord, |
| 90 in [Optional=DefaultIsUndefined] boolean searchInFrames, | 90 in [Optional=DefaultIsUndefined] boolean searchInFrames, |
| 91 in [Optional=DefaultIsUndefined] boolean showDialog); | 91 in [Optional=DefaultIsUndefined] boolean showDialog); |
| 92 | 92 |
| 93 attribute [Replaceable] boolean offscreenBuffering; | 93 [Replaceable] readonly attribute boolean offscreenBuffering; |
|
Emily Fortuna
2012/11/01 16:32:26
nit: extra space between attribute and boolean.
Anton Muhin
2012/11/01 16:45:08
Those brought verbatim from WebKit, I don't think
| |
| 94 | 94 |
| 95 attribute [Replaceable] long outerHeight; | 95 [Replaceable] readonly attribute long outerHeight; |
| 96 attribute [Replaceable] long outerWidth; | 96 [Replaceable] readonly attribute long outerWidth; |
| 97 attribute [Replaceable] long innerHeight; | 97 [Replaceable] readonly attribute long innerHeight; |
| 98 attribute [Replaceable] long innerWidth; | 98 [Replaceable] readonly attribute long innerWidth; |
| 99 attribute [Replaceable] long screenX; | 99 [Replaceable] readonly attribute long screenX; |
| 100 attribute [Replaceable] long screenY; | 100 [Replaceable] readonly attribute long screenY; |
| 101 attribute [Replaceable] long screenLeft; | 101 [Replaceable] readonly attribute long screenLeft; |
| 102 attribute [Replaceable] long screenTop; | 102 [Replaceable] readonly attribute long screenTop; |
| 103 attribute [Replaceable] long scrollX; | 103 [Replaceable] readonly attribute long scrollX; |
| 104 attribute [Replaceable] long scrollY; | 104 [Replaceable] readonly attribute long scrollY; |
| 105 readonly attribute long pageXOffset; | 105 readonly attribute long pageXOffset; |
| 106 readonly attribute long pageYOffset; | 106 readonly attribute long pageYOffset; |
| 107 | 107 |
| 108 void scrollBy(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultI sUndefined] long y); | 108 void scrollBy(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultI sUndefined] long y); |
| 109 void scrollTo(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultI sUndefined] long y); | 109 void scrollTo(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultI sUndefined] long y); |
| 110 void scroll(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultIsU ndefined] long y); | 110 void scroll(in [Optional=DefaultIsUndefined] long x, in [Optional=DefaultIsU ndefined] long y); |
| 111 void moveBy(in [Optional=DefaultIsUndefined] float x, in [Optional=DefaultIs Undefined] float y); // FIXME: this should take longs not floats. | 111 void moveBy(in [Optional=DefaultIsUndefined] float x, in [Optional=DefaultIs Undefined] float y); // FIXME: this should take longs not floats. |
| 112 void moveTo(in [Optional=DefaultIsUndefined] float x, in [Optional=DefaultIs Undefined] float y); // FIXME: this should take longs not floats. | 112 void moveTo(in [Optional=DefaultIsUndefined] float x, in [Optional=DefaultIs Undefined] float y); // FIXME: this should take longs not floats. |
| 113 void resizeBy(in [Optional=DefaultIsUndefined] float x, in [Optional=Default IsUndefined] float y); // FIXME: this should take longs not floats. | 113 void resizeBy(in [Optional=DefaultIsUndefined] float x, in [Optional=Default IsUndefined] float y); // FIXME: this should take longs not floats. |
| 114 void resizeTo(in [Optional=DefaultIsUndefined] float width, in [Optional=Def aultIsUndefined] float height); // FIXME: this should take longs not floats. | 114 void resizeTo(in [Optional=DefaultIsUndefined] float width, in [Optional=Def aultIsUndefined] float height); // FIXME: this should take longs not floats. |
| 115 | 115 |
| 116 readonly attribute [DoNotCheckSecurity] boolean closed; | 116 readonly attribute [DoNotCheckSecurity] boolean closed; |
| 117 | 117 |
| 118 attribute [Replaceable, DoNotCheckSecurityOnGetter] unsigned long length; | 118 [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute unsigned long l ength; |
| 119 | 119 |
| 120 attribute DOMString name; | 120 attribute DOMString name; |
| 121 | 121 |
| 122 attribute DOMString status; | 122 attribute DOMString status; |
| 123 attribute DOMString defaultStatus; | 123 attribute DOMString defaultStatus; |
| 124 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT | 124 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT |
| 125 // This attribute is an alias of defaultStatus and is necessary for legacy u ses. | 125 // This attribute is an alias of defaultStatus and is necessary for legacy u ses. |
| 126 attribute DOMString defaultstatus; | 126 attribute DOMString defaultstatus; |
| 127 #endif | 127 #endif |
| 128 | 128 |
| 129 // Self referential attributes | 129 // Self referential attributes |
| 130 attribute [Replaceable, DoNotCheckSecurityOnGetter] DOMWindow self; | 130 [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute DOMWindow self; |
| 131 readonly attribute [DoNotCheckSecurity, V8Unforgeable] DOMWindow window; | 131 [DoNotCheckSecurity, V8Unforgeable] readonly attribute DOMWindow window; |
| 132 attribute [Replaceable, DoNotCheckSecurityOnGetter] DOMWindow frames; | 132 [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute DOMWindow fram es; |
|
Emily Fortuna
2012/11/01 16:32:26
extra space here
| |
| 133 | 133 |
| 134 attribute [Replaceable, DoNotCheckSecurityOnGetter, V8CustomSetter] DOMWindo w opener; | 134 [Replaceable, DoNotCheckSecurityOnGetter, V8CustomSetter] readonly attribute DOMWindow opener; |
| 135 attribute [Replaceable, DoNotCheckSecurityOnGetter] DOMWindow parent; | 135 [Replaceable, DoNotCheckSecurityOnGetter] readonly attribute DOMWindow paren t; |
| 136 readonly attribute [DoNotCheckSecurityOnGetter, V8Unforgeable] DOMWindow top ; | 136 [DoNotCheckSecurityOnGetter, V8Unforgeable] readonly attribute DOMWindow top ; |
| 137 | 137 |
| 138 // DOM Level 2 AbstractView Interface | 138 // DOM Level 2 AbstractView Interface |
| 139 readonly attribute Document document; | 139 readonly attribute Document document; |
| 140 | 140 |
| 141 // CSSOM View Module | 141 // CSSOM View Module |
| 142 MediaQueryList matchMedia(in DOMString query); | 142 MediaQueryList matchMedia(in DOMString query); |
| 143 | 143 |
| 144 // styleMedia has been removed from the CSSOM View specification. | 144 // styleMedia has been removed from the CSSOM View specification. |
| 145 readonly attribute StyleMedia styleMedia; | 145 readonly attribute StyleMedia styleMedia; |
| 146 | 146 |
| 147 // DOM Level 2 Style Interface | 147 // DOM Level 2 Style Interface |
| 148 CSSStyleDeclaration getComputedStyle(in [Optional=DefaultIsUndefined] Elemen t element, | 148 CSSStyleDeclaration getComputedStyle(in [Optional=DefaultIsUndefined] Elemen t element, |
| 149 in [TreatNullAs=NullString, TreatUndefi nedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement); | 149 in [TreatNullAs=NullString, TreatUndefi nedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement); |
| 150 | 150 |
| 151 // WebKit extensions | 151 // WebKit extensions |
| 152 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT | 152 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT |
| 153 CSSRuleList getMatchedCSSRules(in [Optional=DefaultIsUndefined] Element elem ent, | 153 CSSRuleList getMatchedCSSRules(in [Optional=DefaultIsUndefined] Element elem ent, |
| 154 in [TreatNullAs=NullString, TreatUndefinedAs= NullString,Optional=DefaultIsUndefined] DOMString pseudoElement); | 154 in [TreatNullAs=NullString, TreatUndefinedAs= NullString,Optional=DefaultIsUndefined] DOMString pseudoElement); |
| 155 #endif | 155 #endif |
| 156 | 156 |
| 157 attribute [Replaceable] double devicePixelRatio; | 157 [Replaceable] readonly attribute double devicePixelRatio; |
| 158 | 158 |
| 159 WebKitPoint webkitConvertPointFromPageToNode(in [Optional=DefaultIsUndefined ] Node node, | 159 WebKitPoint webkitConvertPointFromPageToNode(in [Optional=DefaultIsUndefined ] Node node, |
| 160 in [Optional=DefaultIsUndefined ] WebKitPoint p); | 160 in [Optional=DefaultIsUndefined ] WebKitPoint p); |
| 161 WebKitPoint webkitConvertPointFromNodeToPage(in [Optional=DefaultIsUndefined ] Node node, | 161 WebKitPoint webkitConvertPointFromNodeToPage(in [Optional=DefaultIsUndefined ] Node node, |
| 162 in [Optional=DefaultIsUndefined ] WebKitPoint p); | 162 in [Optional=DefaultIsUndefined ] WebKitPoint p); |
| 163 | 163 |
| 164 readonly attribute [V8EnabledAtRuntime] DOMApplicationCache applicationCache ; | 164 readonly attribute [V8EnabledAtRuntime] DOMApplicationCache applicationCache ; |
| 165 | 165 |
| 166 readonly attribute [V8EnabledAtRuntime] Storage sessionStorage | 166 readonly attribute [V8EnabledAtRuntime] Storage sessionStorage |
| 167 getter raises(DOMException); | 167 getter raises(DOMException); |
| 168 readonly attribute [V8EnabledAtRuntime] Storage localStorage | 168 readonly attribute [V8EnabledAtRuntime] Storage localStorage |
| 169 getter raises(DOMException); | 169 getter raises(DOMException); |
| 170 | 170 |
| 171 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS | 171 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS |
| 172 // This is the interface orientation in degrees. Some examples are: | 172 // This is the interface orientation in degrees. Some examples are: |
| 173 // 0 is straight up; -90 is when the device is rotated 90 clockwise; | 173 // 0 is straight up; -90 is when the device is rotated 90 clockwise; |
| 174 // 90 is when rotated counter clockwise. | 174 // 90 is when rotated counter clockwise. |
| 175 readonly attribute long orientation; | 175 readonly attribute long orientation; |
| 176 #endif | 176 #endif |
| 177 | 177 |
| 178 attribute [Replaceable] Console console; | 178 [Replaceable] readonly attribute Console console; |
| 179 | 179 |
| 180 // cross-document messaging | 180 // cross-document messaging |
| 181 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT | 181 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT |
| 182 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in DOMString targetOrigin) | 182 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in DOMString targetOrigin) |
| 183 raises(DOMException); | 183 raises(DOMException); |
| 184 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in DOMString targetOrigin, in Array messagePorts) | 184 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in DOMString targetOrigin, in Array messagePorts) |
| 185 raises(DOMException); | 185 raises(DOMException); |
| 186 | 186 |
| 187 #if defined(ENABLE_LEGACY_VENDOR_PREFIXES) && ENABLE_LEGACY_VENDOR_PREFIXES | 187 #if defined(ENABLE_LEGACY_VENDOR_PREFIXES) && ENABLE_LEGACY_VENDOR_PREFIXES |
| 188 [DoNotCheckSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in DOMString targetOrigin) | 188 [DoNotCheckSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in DOMString targetOrigin) |
| 189 raises(DOMException); | 189 raises(DOMException); |
| 190 [DoNotCheckSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in DOMString targetOrigin, in Array transferList) | 190 [DoNotCheckSecurity, Custom] void webkitPostMessage(in SerializedScriptValue message, in DOMString targetOrigin, in Array transferList) |
| 191 raises(DOMException); | 191 raises(DOMException); |
| 192 #endif // defined(ENABLE_LEGACY_VENDOR_PREFIXES) && ENABLE_LEGACY_VENDOR_PREFIXE S | 192 #endif // defined(ENABLE_LEGACY_VENDOR_PREFIXES) && ENABLE_LEGACY_VENDOR_PREFIXE S |
| 193 | 193 |
| 194 #else | 194 #else |
| 195 // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port. | 195 // There's no good way to expose an array via the ObjC bindings, so for now just allow passing in a single port. |
| 196 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in [Optional] MessagePort messagePort, in DOMString targetOrigin) | 196 [DoNotCheckSecurity, Custom] void postMessage(in SerializedScriptValue messa ge, in [Optional] MessagePort messagePort, in DOMString targetOrigin) |
| 197 raises(DOMException); | 197 raises(DOMException); |
| 198 #endif | 198 #endif |
| 199 | 199 |
| 200 #if defined(ENABLE_WEB_TIMING) && ENABLE_WEB_TIMING | 200 #if defined(ENABLE_WEB_TIMING) && ENABLE_WEB_TIMING |
| 201 attribute [Replaceable] Performance performance; | 201 [Replaceable] readonly attribute Performance performance; |
| 202 #endif | 202 #endif |
| 203 | 203 |
| 204 // Timers | 204 // Timers |
| 205 [Custom] long setTimeout(in [Optional=DefaultIsUndefined] TimeoutHandler han dler, | 205 [Custom] long setTimeout(in [Optional=DefaultIsUndefined] TimeoutHandler han dler, |
| 206 in [Optional=DefaultIsUndefined] long timeout); | 206 in [Optional=DefaultIsUndefined] long timeout); |
| 207 // [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, argu ments...); | 207 // [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, argu ments...); |
| 208 // [Custom] long setTimeout(in DOMString code, in long timeout); | 208 // [Custom] long setTimeout(in DOMString code, in long timeout); |
| 209 void clearTimeout(in [Optional=DefaultIsUndefined] long handle); | 209 void clearTimeout(in [Optional=DefaultIsUndefined] long handle); |
| 210 [Custom] long setInterval(in TimeoutHandler handler, in long timeout); | 210 [Custom] long setInterval(in TimeoutHandler handler, in long timeout); |
| 211 // [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arg uments...); | 211 // [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arg uments...); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 [Conditional=MEDIA_SOURCE, V8EnabledAtRuntime=mediaSource] attribute SourceB ufferListConstructor WebKitSourceBufferList; | 791 [Conditional=MEDIA_SOURCE, V8EnabledAtRuntime=mediaSource] attribute SourceB ufferListConstructor WebKitSourceBufferList; |
| 792 | 792 |
| 793 #endif // defined(LANGUAGE_JAVASCRIPT) | 793 #endif // defined(LANGUAGE_JAVASCRIPT) |
| 794 | 794 |
| 795 #if defined(V8_BINDING) && V8_BINDING | 795 #if defined(V8_BINDING) && V8_BINDING |
| 796 // window.toString() requires special handling in V8 | 796 // window.toString() requires special handling in V8 |
| 797 [V8DoNotCheckSignature, DoNotCheckSecurity, Custom, NotEnumerable] DOMString toString(); | 797 [V8DoNotCheckSignature, DoNotCheckSecurity, Custom, NotEnumerable] DOMString toString(); |
| 798 #endif // defined(V8_BINDING) | 798 #endif // defined(V8_BINDING) |
| 799 }; | 799 }; |
| 800 | 800 |
| OLD | NEW |