| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> | 3 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 [Custom] callback CustomElementConstructor = Element (); | 21 [Custom] callback CustomElementConstructor = Element (); |
| 22 | 22 |
| 23 // https://html.spec.whatwg.org/#the-document-object | 23 // https://html.spec.whatwg.org/#the-document-object |
| 24 enum DocumentReadyState { "loading", "interactive", "complete" }; | 24 enum DocumentReadyState { "loading", "interactive", "complete" }; |
| 25 | 25 |
| 26 | 26 |
| 27 // https://w3c.github.io/page-visibility/#visibility-states-and-the-visibilityst
ate-enum | 27 // https://w3c.github.io/page-visibility/#visibility-states-and-the-visibilityst
ate-enum |
| 28 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; | 28 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; |
| 29 | 29 |
| 30 // https://mikewest.github.io/cors-rfc1918/#feature-detect | 30 // https://wicg.github.io/cors-rfc1918/#feature-detect |
| 31 enum AddressSpace { "local", "private", "public" }; | 31 enum AddressSpace { "local", "private", "public" }; |
| 32 | 32 |
| 33 typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; | 33 typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement; |
| 34 | 34 |
| 35 // https://dom.spec.whatwg.org/#interface-document | 35 // https://dom.spec.whatwg.org/#interface-document |
| 36 | 36 |
| 37 // FIXME: Document should have a constructor. crbug.com/238234 | 37 // FIXME: Document should have a constructor. crbug.com/238234 |
| 38 interface Document : Node { | 38 interface Document : Node { |
| 39 [SameObject] readonly attribute DOMImplementation implementation; | 39 [SameObject] readonly attribute DOMImplementation implementation; |
| 40 readonly attribute DOMString URL; | 40 readonly attribute DOMString URL; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // https://html.spec.whatwg.org/#Document-partial | 135 // https://html.spec.whatwg.org/#Document-partial |
| 136 | 136 |
| 137 // FIXME: *Color are on HTMLDocument. | 137 // FIXME: *Color are on HTMLDocument. |
| 138 | 138 |
| 139 [Measure] readonly attribute HTMLCollection anchors; | 139 [Measure] readonly attribute HTMLCollection anchors; |
| 140 [Measure] readonly attribute HTMLCollection applets; | 140 [Measure] readonly attribute HTMLCollection applets; |
| 141 | 141 |
| 142 // FIXME: clear(), captureEvents(), releaseEvents() and all are on HTMLDocum
ent. | 142 // FIXME: clear(), captureEvents(), releaseEvents() and all are on HTMLDocum
ent. |
| 143 | 143 |
| 144 // CSS Object Model (CSSOM) | 144 // CSS Object Model (CSSOM) |
| 145 // http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface | 145 // https://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface |
| 146 attribute DOMString? selectedStylesheetSet; | 146 attribute DOMString? selectedStylesheetSet; |
| 147 readonly attribute DOMString? preferredStylesheetSet; | 147 readonly attribute DOMString? preferredStylesheetSet; |
| 148 | 148 |
| 149 readonly attribute Element? scrollingElement; | 149 readonly attribute Element? scrollingElement; |
| 150 | 150 |
| 151 // Pointer Lock | 151 // Pointer Lock |
| 152 // https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions
-to-the-document-interface | 152 // https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions
-to-the-document-interface |
| 153 attribute EventHandler onpointerlockchange; | 153 attribute EventHandler onpointerlockchange; |
| 154 attribute EventHandler onpointerlockerror; | 154 attribute EventHandler onpointerlockerror; |
| 155 [MeasureAs=DocumentExitPointerLock] void exitPointerLock(); | 155 [MeasureAs=DocumentExitPointerLock] void exitPointerLock(); |
| 156 | 156 |
| 157 // Touch Events | 157 // Touch Events |
| 158 // http://rawgit.com/w3c/touch-events/v1-errata/touchevents.html#extensions-
to-the-document-interface | 158 // https://w3c.github.io/touch-events/#extensions-to-the-document-interface |
| 159 // FIXME: The arguments should not be optional. | 159 // FIXME: The arguments should not be optional. |
| 160 [RuntimeEnabled=TouchEventAPI, Measure, LegacyInterfaceTypeChecking, Custom=
CallPrologue] | 160 [RuntimeEnabled=TouchEventAPI, Measure, LegacyInterfaceTypeChecking, Custom=
CallPrologue] |
| 161 Touch createTouch([Default=Undefined] optional Window window, | 161 Touch createTouch([Default=Undefined] optional Window window, |
| 162 [Default=Undefined] optional EventTarget target, | 162 [Default=Undefined] optional EventTarget target, |
| 163 [Default=Undefined] optional long identifier, | 163 [Default=Undefined] optional long identifier, |
| 164 [Default=Undefined] optional unrestricted double pageX, | 164 [Default=Undefined] optional unrestricted double pageX, |
| 165 [Default=Undefined] optional unrestricted double pageY, | 165 [Default=Undefined] optional unrestricted double pageY, |
| 166 [Default=Undefined] optional unrestricted double screenX, | 166 [Default=Undefined] optional unrestricted double screenX, |
| 167 [Default=Undefined] optional unrestricted double screenY, | 167 [Default=Undefined] optional unrestricted double screenY, |
| 168 [Default=Undefined] optional unrestricted double radiusX, | 168 [Default=Undefined] optional unrestricted double radiusX, |
| 169 [Default=Undefined] optional unrestricted double radiusY, | 169 [Default=Undefined] optional unrestricted double radiusY, |
| 170 [Default=Undefined] optional unrestricted float rotationAn
gle, | 170 [Default=Undefined] optional unrestricted float rotationAn
gle, |
| 171 [Default=Undefined] optional unrestricted float force); | 171 [Default=Undefined] optional unrestricted float force); |
| 172 [RuntimeEnabled=TouchEventAPI] TouchList createTouchList(Touch... touches); | 172 [RuntimeEnabled=TouchEventAPI] TouchList createTouchList(Touch... touches); |
| 173 | 173 |
| 174 // Custom Elements | 174 // Custom Elements |
| 175 // http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-in
terface-to-register | 175 // https://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-i
nterface-to-register |
| 176 // FIXME: The registerElement return type should be Function. | 176 // FIXME: The registerElement return type should be Function. |
| 177 [CallWith=ScriptState, CustomElementCallbacks, RaisesException, MeasureAs=Do
cumentRegisterElement] CustomElementConstructor registerElement(DOMString type,
optional ElementRegistrationOptions options); | 177 [CallWith=ScriptState, CustomElementCallbacks, RaisesException, MeasureAs=Do
cumentRegisterElement] CustomElementConstructor registerElement(DOMString type,
optional ElementRegistrationOptions options); |
| 178 // http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-in
terface-to-instantiate | 178 // https://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-i
nterface-to-instantiate |
| 179 // FIXME: The typeExtension arguments should not be nullable. | 179 // FIXME: The typeExtension arguments should not be nullable. |
| 180 [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createEl
ement(DOMString localName, (DOMString or Dictionary)? options); | 180 [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createEl
ement(DOMString localName, (DOMString or Dictionary)? options); |
| 181 [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString?
namespaceURI, DOMString qualifiedName, (DOMString or Dictionary)? options); | 181 [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString?
namespaceURI, DOMString qualifiedName, (DOMString or Dictionary)? options); |
| 182 | 182 |
| 183 // Page Visibility | 183 // Page Visibility |
| 184 // http://www.w3.org/TR/page-visibility/#sec-document-interface | 184 // https://www.w3.org/TR/page-visibility/#sec-document-interface |
| 185 readonly attribute boolean hidden; | 185 readonly attribute boolean hidden; |
| 186 readonly attribute VisibilityState visibilityState; | 186 readonly attribute VisibilityState visibilityState; |
| 187 | 187 |
| 188 // CORS and RFC1918 | 188 // CORS and RFC1918 |
| 189 // https://mikewest.github.io/cors-rfc1918/#feature-detect | 189 // https://wicg.github.io/cors-rfc1918/#feature-detect |
| 190 [RuntimeEnabled=CorsRFC1918, ImplementedAs=addressSpaceForBindings] readonly
attribute AddressSpace addressSpace; | 190 [RuntimeEnabled=CorsRFC1918, ImplementedAs=addressSpaceForBindings] readonly
attribute AddressSpace addressSpace; |
| 191 | 191 |
| 192 // Non-standard APIs | 192 // Non-standard APIs |
| 193 [MeasureAs=DocumentCaretRangeFromPoint] Range caretRangeFromPoint([Default=U
ndefined] optional long x, [Default=Undefined] optional long y); | 193 [MeasureAs=DocumentCaretRangeFromPoint] Range caretRangeFromPoint([Default=U
ndefined] optional long x, [Default=Undefined] optional long y); |
| 194 | 194 |
| 195 // Deprecated prefixed page visibility API. | 195 // Deprecated prefixed page visibility API. |
| 196 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting | 196 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting |
| 197 // document in the console. It's possible http://crbug.com/43394 will resolv
e this. | 197 // document in the console. It's possible https://crbug.com/43394 will resol
ve this. |
| 198 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; | 198 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; |
| 199 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; | 199 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; |
| 200 | 200 |
| 201 // Event handler attributes | 201 // Event handler attributes |
| 202 attribute EventHandler onbeforecopy; | 202 attribute EventHandler onbeforecopy; |
| 203 attribute EventHandler onbeforecut; | 203 attribute EventHandler onbeforecut; |
| 204 attribute EventHandler onbeforepaste; | 204 attribute EventHandler onbeforepaste; |
| 205 attribute EventHandler oncopy; | 205 attribute EventHandler oncopy; |
| 206 attribute EventHandler oncut; | 206 attribute EventHandler oncut; |
| 207 attribute EventHandler onpaste; | 207 attribute EventHandler onpaste; |
| 208 attribute EventHandler onsearch; | 208 attribute EventHandler onsearch; |
| 209 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; | 209 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; |
| 210 attribute EventHandler onselectionchange; | 210 attribute EventHandler onselectionchange; |
| 211 attribute EventHandler onselectstart; | 211 attribute EventHandler onselectstart; |
| 212 attribute EventHandler onwheel; | 212 attribute EventHandler onwheel; |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 Document implements GlobalEventHandlers; | 215 Document implements GlobalEventHandlers; |
| 216 Document implements ParentNode; | 216 Document implements ParentNode; |
| 217 Document implements NonElementParentNode; | 217 Document implements NonElementParentNode; |
| 218 Document implements DocumentOrShadowRoot; | 218 Document implements DocumentOrShadowRoot; |
| OLD | NEW |