| 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 callback CustomElementConstructor = Element (); | 21 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 // http://www.w3.org/TR/page-visibility/#VisibilityState | 26 // http://www.w3.org/TR/page-visibility/#VisibilityState |
| 27 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; | 27 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; |
| 28 | 28 |
| 29 // https://mikewest.github.io/cors-rfc1918/#feature-detect |
| 30 enum AddressSpace { "local", "private", "public" }; |
| 31 |
| 29 // https://dom.spec.whatwg.org/#interface-document | 32 // https://dom.spec.whatwg.org/#interface-document |
| 30 | 33 |
| 31 // FIXME: Document should have a constructor. crbug.com/238234 | 34 // FIXME: Document should have a constructor. crbug.com/238234 |
| 32 interface Document : Node { | 35 interface Document : Node { |
| 33 [SameObject] readonly attribute DOMImplementation implementation; | 36 [SameObject] readonly attribute DOMImplementation implementation; |
| 34 readonly attribute DOMString URL; | 37 readonly attribute DOMString URL; |
| 35 // FIXME: documentURI should not be nullable. | 38 // FIXME: documentURI should not be nullable. |
| 36 [ImplementedAs=url] readonly attribute DOMString? documentURI; | 39 [ImplementedAs=url] readonly attribute DOMString? documentURI; |
| 37 readonly attribute DOMString origin; | 40 readonly attribute DOMString origin; |
| 38 [RuntimeEnabled=suborigins] readonly attribute DOMString suborigin; | 41 [RuntimeEnabled=suborigins] readonly attribute DOMString suborigin; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-in
terface-to-instantiate | 190 // http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-in
terface-to-instantiate |
| 188 // FIXME: The typeExtension arguments should not be nullable. | 191 // FIXME: The typeExtension arguments should not be nullable. |
| 189 [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createEl
ement(DOMString localName, DOMString? typeExtension); | 192 [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createEl
ement(DOMString localName, DOMString? typeExtension); |
| 190 [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString?
namespaceURI, DOMString qualifiedName, DOMString? typeExtension); | 193 [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString?
namespaceURI, DOMString qualifiedName, DOMString? typeExtension); |
| 191 | 194 |
| 192 // Page Visibility | 195 // Page Visibility |
| 193 // http://www.w3.org/TR/page-visibility/#sec-document-interface | 196 // http://www.w3.org/TR/page-visibility/#sec-document-interface |
| 194 readonly attribute boolean hidden; | 197 readonly attribute boolean hidden; |
| 195 readonly attribute VisibilityState visibilityState; | 198 readonly attribute VisibilityState visibilityState; |
| 196 | 199 |
| 200 // CORS and RFC1918 |
| 201 // https://mikewest.github.io/cors-rfc1918/#feature-detect |
| 202 [RuntimeEnabled=CorsRFC1918, ImplementedAs=addressSpaceForBindings] readonly
attribute AddressSpace addressSpace; |
| 203 |
| 197 // Non-standard APIs | 204 // Non-standard APIs |
| 198 [MeasureAs=DocumentCaretRangeFromPoint] Range caretRangeFromPoint([Default=U
ndefined] optional long x, [Default=Undefined] optional long y); | 205 [MeasureAs=DocumentCaretRangeFromPoint] Range caretRangeFromPoint([Default=U
ndefined] optional long x, [Default=Undefined] optional long y); |
| 199 | 206 |
| 200 // Deprecated prefixed page visibility API. | 207 // Deprecated prefixed page visibility API. |
| 201 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting | 208 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting |
| 202 // document in the console. It's possible http://crbug.com/43394 will resolv
e this. | 209 // document in the console. It's possible http://crbug.com/43394 will resolv
e this. |
| 203 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; | 210 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; |
| 204 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; | 211 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; |
| 205 | 212 |
| 206 // Event handler attributes | 213 // Event handler attributes |
| 207 attribute EventHandler onbeforecopy; | 214 attribute EventHandler onbeforecopy; |
| 208 attribute EventHandler onbeforecut; | 215 attribute EventHandler onbeforecut; |
| 209 attribute EventHandler onbeforepaste; | 216 attribute EventHandler onbeforepaste; |
| 210 attribute EventHandler oncopy; | 217 attribute EventHandler oncopy; |
| 211 attribute EventHandler oncut; | 218 attribute EventHandler oncut; |
| 212 attribute EventHandler onpaste; | 219 attribute EventHandler onpaste; |
| 213 attribute EventHandler onsearch; | 220 attribute EventHandler onsearch; |
| 214 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; | 221 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; |
| 215 attribute EventHandler onselectionchange; | 222 attribute EventHandler onselectionchange; |
| 216 attribute EventHandler onselectstart; | 223 attribute EventHandler onselectstart; |
| 217 attribute EventHandler onwheel; | 224 attribute EventHandler onwheel; |
| 218 }; | 225 }; |
| 219 | 226 |
| 220 Document implements GlobalEventHandlers; | 227 Document implements GlobalEventHandlers; |
| 221 Document implements ParentNode; | 228 Document implements ParentNode; |
| 222 Document implements NonElementParentNode; | 229 Document implements NonElementParentNode; |
| OLD | NEW |