| 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, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; | 23 typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext; |
| 24 | 24 |
| 25 // http://www.w3.org/TR/page-visibility/#VisibilityState | 25 // http://www.w3.org/TR/page-visibility/#VisibilityState |
| 26 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; | 26 enum VisibilityState { "hidden", "visible", "prerender", "unloaded" }; |
| 27 | 27 |
| 28 // https://dom.spec.whatwg.org/#interface-document | 28 // https://dom.spec.whatwg.org/#interface-document |
| 29 | 29 |
| 30 // FIXME: Document should have a constructor. | 30 // FIXME: Document should have a constructor. |
| 31 interface Document : Node { | 31 interface Document : Node { |
| 32 readonly attribute DOMImplementation implementation; | 32 [SameObject] readonly attribute DOMImplementation implementation; |
| 33 readonly attribute DOMString URL; | 33 readonly attribute DOMString URL; |
| 34 // FIXME: documentURI should not be nullable. | 34 // FIXME: documentURI should not be nullable. |
| 35 [ImplementedAs=url] readonly attribute DOMString? documentURI; | 35 [ImplementedAs=url] readonly attribute DOMString? documentURI; |
| 36 readonly attribute DOMString origin; | 36 readonly attribute DOMString origin; |
| 37 readonly attribute DOMString compatMode; | 37 readonly attribute DOMString compatMode; |
| 38 // FIXME: characterSet should not be nullable. | 38 // FIXME: characterSet should not be nullable. |
| 39 readonly attribute DOMString? characterSet; | 39 readonly attribute DOMString? characterSet; |
| 40 // FIXME: inputEncoding should not be nullable. | 40 // FIXME: inputEncoding should not be nullable. |
| 41 [MeasureAs=DocumentInputEncoding, ImplementedAs=characterSet] readonly attri
bute DOMString? inputEncoding; // legacy alias of .characterSet | 41 [MeasureAs=DocumentInputEncoding, ImplementedAs=characterSet] readonly attri
bute DOMString? inputEncoding; // legacy alias of .characterSet |
| 42 readonly attribute DOMString contentType; | 42 readonly attribute DOMString contentType; |
| 43 | 43 |
| 44 readonly attribute DocumentType? doctype; | 44 readonly attribute DocumentType? doctype; |
| 45 readonly attribute Element? documentElement; | 45 readonly attribute Element? documentElement; |
| 46 HTMLCollection getElementsByTagName(DOMString localName); | 46 HTMLCollection getElementsByTagName(DOMString localName); |
| 47 HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString loc
alName); | 47 HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString loc
alName); |
| 48 HTMLCollection getElementsByClassName(DOMString classNames); | 48 HTMLCollection getElementsByClassName(DOMString classNames); |
| 49 | 49 |
| 50 [CustomElementCallbacks, PerWorldBindings, RaisesException] Element createEl
ement(DOMString localName); | 50 [NewObject, CustomElementCallbacks, PerWorldBindings, RaisesException] Eleme
nt createElement(DOMString localName); |
| 51 [CustomElementCallbacks, RaisesException] Element createElementNS(DOMString?
namespaceURI, DOMString qualifiedName); | 51 [NewObject, CustomElementCallbacks, RaisesException] Element createElementNS
(DOMString? namespaceURI, DOMString qualifiedName); |
| 52 DocumentFragment createDocumentFragment(); | 52 [NewObject] DocumentFragment createDocumentFragment(); |
| 53 Text createTextNode(DOMString data); | 53 [NewObject] Text createTextNode(DOMString data); |
| 54 Comment createComment(DOMString data); | 54 [NewObject] Comment createComment(DOMString data); |
| 55 [RaisesException] ProcessingInstruction createProcessingInstruction(DOMStrin
g target, DOMString data); | 55 [NewObject, RaisesException] ProcessingInstruction createProcessingInstructi
on(DOMString target, DOMString data); |
| 56 | 56 |
| 57 [CustomElementCallbacks, RaisesException, TypeChecking=Interface] Node impor
tNode(Node node, optional boolean deep = false); | 57 [NewObject, CustomElementCallbacks, RaisesException, TypeChecking=Interface]
Node importNode(Node node, optional boolean deep = false); |
| 58 [RaisesException, CustomElementCallbacks, TypeChecking=Interface] Node adopt
Node(Node node); | 58 [RaisesException, CustomElementCallbacks, TypeChecking=Interface] Node adopt
Node(Node node); |
| 59 | 59 |
| 60 [RaisesException, MeasureAs=DocumentCreateAttribute] Attr createAttribute(DO
MString localName); | 60 [NewObject, RaisesException, MeasureAs=DocumentCreateAttribute] Attr createA
ttribute(DOMString localName); |
| 61 // FIXME: qualifiedName should not be nullable. | 61 // FIXME: qualifiedName should not be nullable. |
| 62 [RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr createAttributeN
S(DOMString? namespaceURI, DOMString? qualifiedName); | 62 [NewObject, RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr creat
eAttributeNS(DOMString? namespaceURI, DOMString? qualifiedName); |
| 63 | 63 |
| 64 [RaisesException] Event createEvent(DOMString eventType); | 64 [NewObject, RaisesException] Event createEvent(DOMString eventType); |
| 65 | 65 |
| 66 Range createRange(); | 66 [NewObject] Range createRange(); |
| 67 | 67 |
| 68 // NodeFilter.SHOW_ALL = 0xFFFFFFFF | 68 // NodeFilter.SHOW_ALL = 0xFFFFFFFF |
| 69 [RaisesException, TypeChecking=Interface] NodeIterator createNodeIterator(No
de root, | 69 [NewObject, RaisesException, TypeChecking=Interface] NodeIterator createNode
Iterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional Nod
eFilter? filter = null); |
| 70 op
tional unsigned long whatToShow = 0xFFFFFFFF, | 70 [NewObject, RaisesException, TypeChecking=Interface] TreeWalker createTreeWa
lker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFil
ter? filter = null); |
| 71 op
tional NodeFilter? filter = null); | |
| 72 [RaisesException, TypeChecking=Interface] TreeWalker createTreeWalker(Node r
oot, | |
| 73 option
al unsigned long whatToShow = 0xFFFFFFFF, | |
| 74 option
al NodeFilter? filter = null); | |
| 75 | 71 |
| 76 // FIXME: CDATASection has been removed from the spec. crbug.com/437205 | 72 // FIXME: CDATASection has been removed from the spec. crbug.com/437205 |
| 77 [RaisesException, MeasureAs=DocumentCreateCDATASection] CDATASection createC
DATASection(DOMString data); | 73 [RaisesException, MeasureAs=DocumentCreateCDATASection] CDATASection createC
DATASection(DOMString data); |
| 78 | 74 |
| 79 // FIXME: xmlEncoding/xmlVersion/xmlStandalone have been removed from the sp
ec. | 75 // FIXME: xmlEncoding/xmlVersion/xmlStandalone have been removed from the sp
ec. |
| 80 [MeasureAs=DocumentXMLEncoding] readonly attribute DOMString? xmlEncoding; | 76 [MeasureAs=DocumentXMLEncoding] readonly attribute DOMString? xmlEncoding; |
| 81 [RaisesException=Setter, MeasureAs=DocumentXMLVersion] attribute DOMString?
xmlVersion; | 77 [RaisesException=Setter, MeasureAs=DocumentXMLVersion] attribute DOMString?
xmlVersion; |
| 82 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean
xmlStandalone; | 78 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean
xmlStandalone; |
| 83 | 79 |
| 84 // HTML | 80 // HTML |
| (...skipping 10 matching lines...) Expand all Loading... |
| 95 // FIXME: readyState should use the enum DocumentReadyState. | 91 // FIXME: readyState should use the enum DocumentReadyState. |
| 96 // FIXME: readyState should not have [TreatReturnedNullStringAs=Undefined]. | 92 // FIXME: readyState should not have [TreatReturnedNullStringAs=Undefined]. |
| 97 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString readyStat
e; | 93 [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString readyStat
e; |
| 98 | 94 |
| 99 // DOM tree accessors | 95 // DOM tree accessors |
| 100 // FIXME: title and dir should not have [TreatNullAs=NullString]. | 96 // FIXME: title and dir should not have [TreatNullAs=NullString]. |
| 101 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString title; | 97 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString title; |
| 102 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString dir; | 98 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMString dir; |
| 103 [RaisesException=Setter, CustomElementCallbacks, PerWorldBindings, TypeCheck
ing=Interface, ExposeJSAccessors] attribute HTMLElement? body; | 99 [RaisesException=Setter, CustomElementCallbacks, PerWorldBindings, TypeCheck
ing=Interface, ExposeJSAccessors] attribute HTMLElement? body; |
| 104 readonly attribute HTMLHeadElement? head; | 100 readonly attribute HTMLHeadElement? head; |
| 105 readonly attribute HTMLCollection images; | 101 [SameObject] readonly attribute HTMLCollection images; |
| 106 readonly attribute HTMLCollection embeds; | 102 [SameObject] readonly attribute HTMLCollection embeds; |
| 107 [ImplementedAs=embeds] readonly attribute HTMLCollection plugins; | 103 [SameObject, ImplementedAs=embeds] readonly attribute HTMLCollection plugins
; |
| 108 readonly attribute HTMLCollection links; | 104 [SameObject] readonly attribute HTMLCollection links; |
| 109 readonly attribute HTMLCollection forms; | 105 [SameObject] readonly attribute HTMLCollection forms; |
| 110 readonly attribute HTMLCollection scripts; | 106 [SameObject] readonly attribute HTMLCollection scripts; |
| 111 [PerWorldBindings] NodeList getElementsByName(DOMString elementName); | 107 [PerWorldBindings] NodeList getElementsByName(DOMString elementName); |
| 112 readonly attribute HTMLScriptElement? currentScript; | 108 readonly attribute HTMLScriptElement? currentScript; |
| 113 | 109 |
| 114 // dynamic markup insertion | 110 // dynamic markup insertion |
| 115 // FIXME: open(), close(), write() and writeln() are on HTMLDocument. | 111 // FIXME: open(), close(), write() and writeln() are on HTMLDocument. |
| 116 | 112 |
| 117 // user interaction | 113 // user interaction |
| 118 [ImplementedAs=domWindow] readonly attribute Window? defaultView; | 114 [ImplementedAs=domWindow] readonly attribute Window? defaultView; |
| 119 readonly attribute Element? activeElement; | 115 readonly attribute Element? activeElement; |
| 120 boolean hasFocus(); | 116 boolean hasFocus(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 136 | 132 |
| 137 // FIXME: *Color are on HTMLDocument. | 133 // FIXME: *Color are on HTMLDocument. |
| 138 | 134 |
| 139 readonly attribute HTMLCollection anchors; | 135 readonly attribute HTMLCollection anchors; |
| 140 readonly attribute HTMLCollection applets; | 136 readonly attribute HTMLCollection applets; |
| 141 | 137 |
| 142 // FIXME: clear(), captureEvents(), releaseEvents() and all are on HTMLDocum
ent. | 138 // FIXME: clear(), captureEvents(), releaseEvents() and all are on HTMLDocum
ent. |
| 143 | 139 |
| 144 // CSS Object Model (CSSOM) | 140 // CSS Object Model (CSSOM) |
| 145 // http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface | 141 // http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface |
| 146 readonly attribute StyleSheetList styleSheets; | 142 [SameObject] readonly attribute StyleSheetList styleSheets; |
| 147 attribute DOMString? selectedStylesheetSet; | 143 attribute DOMString? selectedStylesheetSet; |
| 148 readonly attribute DOMString? preferredStylesheetSet; | 144 readonly attribute DOMString? preferredStylesheetSet; |
| 149 | 145 |
| 150 // CSSOM View Module | 146 // CSSOM View Module |
| 151 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-document-interface | 147 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-document-interface |
| 152 // FIXME: The x and y arguments should be of type double. | 148 // FIXME: The x and y arguments should be of type double. |
| 153 Element? elementFromPoint(long x, long y); | 149 Element? elementFromPoint(long x, long y); |
| 154 sequence<Element> elementsFromPoint(long x, long y); | 150 sequence<Element> elementsFromPoint(long x, long y); |
| 155 | 151 |
| 156 // Selection API | 152 // Selection API |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 attribute EventHandler onsearch; | 220 attribute EventHandler onsearch; |
| 225 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; | 221 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; |
| 226 attribute EventHandler onselectionchange; | 222 attribute EventHandler onselectionchange; |
| 227 attribute EventHandler onselectstart; | 223 attribute EventHandler onselectstart; |
| 228 attribute EventHandler onwheel; | 224 attribute EventHandler onwheel; |
| 229 }; | 225 }; |
| 230 | 226 |
| 231 Document implements GlobalEventHandlers; | 227 Document implements GlobalEventHandlers; |
| 232 Document implements ParentNode; | 228 Document implements ParentNode; |
| 233 Document implements NonElementParentNode; | 229 Document implements NonElementParentNode; |
| OLD | NEW |