Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.idl

Issue 2572003003: NOT FOR SUBMIT: use counters for jdm@
Patch Set: Merge branch 'jdm-usecounters' into jdm-merge Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 29
30 // https://wicg.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, Measure] readonly attribute DOMImplementation implementation;
40 readonly attribute DOMString URL; 40 readonly attribute DOMString URL;
41 // FIXME: documentURI should not be nullable. 41 // FIXME: documentURI should not be nullable.
42 [ImplementedAs=url] readonly attribute DOMString? documentURI; 42 [ImplementedAs=url] readonly attribute DOMString? documentURI;
43 readonly attribute DOMString origin; 43 [Measure] readonly attribute DOMString origin;
44 [RuntimeEnabled=suborigins] readonly attribute DOMString suborigin; 44 [RuntimeEnabled=suborigins, Measure] readonly attribute DOMString suborigin;
45 readonly attribute DOMString compatMode; 45 readonly attribute DOMString compatMode;
46 46
47 readonly attribute DOMString characterSet; 47 readonly attribute DOMString characterSet;
48 [ImplementedAs=characterSet] readonly attribute DOMString charset; // legacy alias of .characterSet 48 [ImplementedAs=characterSet] readonly attribute DOMString charset; // legacy alias of .characterSet
49 [ImplementedAs=characterSet] readonly attribute DOMString inputEncoding; // legacy alias of .characterSet 49 [ImplementedAs=characterSet] readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
50 readonly attribute DOMString contentType; 50 readonly attribute DOMString contentType;
51 51
52 readonly attribute DocumentType? doctype; 52 readonly attribute DocumentType? doctype;
53 readonly attribute Element? documentElement; 53 readonly attribute Element? documentElement;
54 HTMLCollection getElementsByTagName(DOMString localName); 54 HTMLCollection getElementsByTagName(DOMString localName);
55 HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString loc alName); 55 HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString loc alName);
56 HTMLCollection getElementsByClassName(DOMString classNames); 56 HTMLCollection getElementsByClassName(DOMString classNames);
57 57
58 [NewObject, DoNotTestNewObject, CustomElementCallbacks, PerWorldBindings, Ra isesException] Element createElement(DOMString localName); 58 [NewObject, DoNotTestNewObject, CustomElementCallbacks, PerWorldBindings, Ra isesException] Element createElement(DOMString localName);
59 [NewObject, DoNotTestNewObject, CustomElementCallbacks, RaisesException] Ele ment createElementNS(DOMString? namespaceURI, DOMString qualifiedName); 59 [NewObject, DoNotTestNewObject, CustomElementCallbacks, RaisesException] Ele ment createElementNS(DOMString? namespaceURI, DOMString qualifiedName);
60 [NewObject] DocumentFragment createDocumentFragment(); 60 [NewObject] DocumentFragment createDocumentFragment();
61 [NewObject] Text createTextNode(DOMString data); 61 [NewObject] Text createTextNode(DOMString data);
62 [NewObject, RaisesException] CDATASection createCDATASection(DOMString data) ; 62 [Measure, NewObject, RaisesException] CDATASection createCDATASection(DOMStr ing data);
63 [NewObject] Comment createComment(DOMString data); 63 [NewObject] Comment createComment(DOMString data);
64 [NewObject, RaisesException] ProcessingInstruction createProcessingInstructi on(DOMString target, DOMString data); 64 [NewObject, RaisesException] ProcessingInstruction createProcessingInstructi on(DOMString target, DOMString data);
65 65
66 [NewObject, DoNotTestNewObject, CEReactions, CustomElementCallbacks, RaisesE xception] Node importNode(Node node, optional boolean deep = false); 66 [NewObject, DoNotTestNewObject, CEReactions, CustomElementCallbacks, RaisesE xception] Node importNode(Node node, optional boolean deep = false);
67 [RaisesException, CEReactions, CustomElementCallbacks] Node adoptNode(Node n ode); 67 [RaisesException, CEReactions, CustomElementCallbacks] Node adoptNode(Node n ode);
68 68
69 [NewObject, RaisesException, MeasureAs=DocumentCreateAttribute] Attr createA ttribute(DOMString localName); 69 [NewObject, RaisesException, MeasureAs=DocumentCreateAttribute] Attr createA ttribute(DOMString localName);
70 [NewObject, RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr creat eAttributeNS(DOMString? namespaceURI, DOMString qualifiedName); 70 [NewObject, RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr creat eAttributeNS(DOMString? namespaceURI, DOMString qualifiedName);
71 71
72 [NewObject, RaisesException, CallWith=ExecutionContext] Event createEvent(DO MString eventType); 72 [NewObject, RaisesException, CallWith=ExecutionContext] Event createEvent(DO MString eventType);
73 73
74 [NewObject] Range createRange(); 74 [NewObject] Range createRange();
75 75
76 // NodeFilter.SHOW_ALL = 0xFFFFFFFF 76 // NodeFilter.SHOW_ALL = 0xFFFFFFFF
77 [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned lon g whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); 77 [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned lon g whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
78 [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long wh atToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); 78 [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long wh atToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
79 79
80 // NonDocumentRootScroller (https://github.com/bokand/NonDocumentRootScrolle r) 80 // NonDocumentRootScroller (https://github.com/bokand/NonDocumentRootScrolle r)
81 [RaisesException=Setter, RuntimeEnabled=SetRootScroller, Measure] attribute Element? rootScroller; 81 [Measure, RaisesException=Setter, RuntimeEnabled=SetRootScroller, Measure] a ttribute Element? rootScroller;
82 82
83 // FIXME: xmlEncoding/xmlVersion/xmlStandalone have been removed from the sp ec. 83 // FIXME: xmlEncoding/xmlVersion/xmlStandalone have been removed from the sp ec.
84 [MeasureAs=DocumentXMLEncoding] readonly attribute DOMString? xmlEncoding; 84 [MeasureAs=DocumentXMLEncoding] readonly attribute DOMString? xmlEncoding;
85 [RaisesException=Setter, MeasureAs=DocumentXMLVersion] attribute DOMString? xmlVersion; 85 [RaisesException=Setter, MeasureAs=DocumentXMLVersion] attribute DOMString? xmlVersion;
86 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean xmlStandalone; 86 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean xmlStandalone;
87 87
88 // HTML 88 // HTML
89 // https://html.spec.whatwg.org/#the-document-object 89 // https://html.spec.whatwg.org/#the-document-object
90 90
91 // resource metadata management 91 // resource metadata management
92 92
93 [PutForwards=href, Unforgeable] readonly attribute Location? location; 93 [PutForwards=href, Unforgeable] readonly attribute Location? location;
94 [RaisesException=Setter] attribute DOMString domain; 94 [Measure, RaisesException=Setter] attribute DOMString domain;
95 readonly attribute DOMString referrer; 95 readonly attribute DOMString referrer;
96 [RaisesException] attribute DOMString cookie; 96 [RaisesException] attribute DOMString cookie;
97 readonly attribute DOMString lastModified; 97 readonly attribute DOMString lastModified;
98 readonly attribute DocumentReadyState readyState; 98 readonly attribute DocumentReadyState readyState;
99 99
100 // DOM tree accessors 100 // DOM tree accessors
101 [CEReactions, CustomElementCallbacks] attribute DOMString title; 101 [CEReactions, CustomElementCallbacks] attribute DOMString title;
102 [CEReactions, CustomElementCallbacks] attribute DOMString dir; 102 [Measure, CEReactions, CustomElementCallbacks] attribute DOMString dir;
103 [CEReactions, RaisesException=Setter, CustomElementCallbacks, PerWorldBindin gs] attribute HTMLElement? body; 103 [CEReactions, RaisesException=Setter, CustomElementCallbacks, PerWorldBindin gs] attribute HTMLElement? body;
104 readonly attribute HTMLHeadElement? head; 104 readonly attribute HTMLHeadElement? head;
105 [SameObject, Measure] readonly attribute HTMLCollection images; 105 [SameObject, Measure] readonly attribute HTMLCollection images;
106 [SameObject, Measure] readonly attribute HTMLCollection embeds; 106 [SameObject, Measure] readonly attribute HTMLCollection embeds;
107 [SameObject, ImplementedAs=embeds, Measure] readonly attribute HTMLCollectio n plugins; 107 [SameObject, ImplementedAs=embeds, Measure] readonly attribute HTMLCollectio n plugins;
108 [SameObject, Measure] readonly attribute HTMLCollection links; 108 [SameObject, Measure] readonly attribute HTMLCollection links;
109 [SameObject, Measure] readonly attribute HTMLCollection forms; 109 [SameObject, Measure] readonly attribute HTMLCollection forms;
110 [SameObject, Measure] readonly attribute HTMLCollection scripts; 110 [SameObject, Measure] readonly attribute HTMLCollection scripts;
111 [PerWorldBindings] NodeList getElementsByName(DOMString elementName); 111 [PerWorldBindings] NodeList getElementsByName(DOMString elementName);
112 [ImplementedAs=currentScriptForBinding] readonly attribute HTMLOrSVGScriptEl ement? currentScript; 112 [ImplementedAs=currentScriptForBinding] readonly attribute HTMLOrSVGScriptEl ement? currentScript;
113 113
114 // dynamic markup insertion 114 // dynamic markup insertion
115 // FIXME: There are two open() methods in the spec. 115 // FIXME: There are two open() methods in the spec.
116 [Custom, CEReactions, CustomElementCallbacks, RaisesException, MeasureAs=Doc umentOpen] void open(); 116 [Custom, CEReactions, CustomElementCallbacks, RaisesException, MeasureAs=Doc umentOpen] void open();
117 [CEReactions, RaisesException] void close(); 117 [Measure, CEReactions, RaisesException] void close();
118 [CallWith=EnteredWindow, CEReactions, CustomElementCallbacks, RaisesExceptio n] void write(DOMString... text); 118 [Measure, CallWith=EnteredWindow, CEReactions, CustomElementCallbacks, Raise sException] void write(DOMString... text);
119 [CallWith=EnteredWindow, CEReactions, CustomElementCallbacks, RaisesExceptio n] void writeln(DOMString... text); 119 [Measure, CallWith=EnteredWindow, CEReactions, CustomElementCallbacks, Raise sException] void writeln(DOMString... text);
120 120
121 // user interaction 121 // user interaction
122 [ImplementedAs=domWindow] readonly attribute Window? defaultView; 122 [ImplementedAs=domWindow] readonly attribute Window? defaultView;
123 boolean hasFocus(); 123 boolean hasFocus();
124 [CEReactions, CustomElementCallbacks, MeasureAs=DocumentDesignMode] attribut e DOMString designMode; 124 [CEReactions, CustomElementCallbacks, MeasureAs=DocumentDesignMode] attribut e DOMString designMode;
125 [CEReactions, CustomElementCallbacks, RaisesException] boolean execCommand(D OMString commandId, optional boolean showUI = false, optional DOMString value = ""); 125 [Measure, CEReactions, CustomElementCallbacks, RaisesException] boolean exec Command(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
126 [RaisesException] boolean queryCommandEnabled(DOMString commandId); 126 [MeasureAs=DocumentQuery, RaisesException] boolean queryCommandEnabled(DOMSt ring commandId);
127 [RaisesException] boolean queryCommandIndeterm(DOMString commandId); 127 [MeasureAs=DocumentQuery, RaisesException] boolean queryCommandIndeterm(DOMS tring commandId);
128 [RaisesException] boolean queryCommandState(DOMString commandId); 128 [MeasureAs=DocumentQuery, RaisesException] boolean queryCommandState(DOMStri ng commandId);
129 [RaisesException] boolean queryCommandSupported(DOMString commandId); 129 [MeasureAs=DocumentQuery, RaisesException] boolean queryCommandSupported(DOM String commandId);
130 [RaisesException] DOMString queryCommandValue(DOMString commandId); 130 [MeasureAs=DocumentQuery, RaisesException] DOMString queryCommandValue(DOMSt ring commandId);
131 131
132 [LenientThis] attribute EventHandler onreadystatechange; 132 [LenientThis] attribute EventHandler onreadystatechange;
133 133
134 // HTML obsolete features 134 // HTML obsolete features
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 // https://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 [Measure] attribute DOMString? selectedStylesheetSet;
147 readonly attribute DOMString? preferredStylesheetSet; 147 [Measure] readonly attribute DOMString? preferredStylesheetSet;
148 148
149 readonly attribute Element? scrollingElement; 149 [Measure] readonly attribute Element? scrollingElement;
150 150
151 // Pointer Lock 151 // Pointer Lock
152 // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface 152 // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
153 attribute EventHandler onpointerlockchange; 153 [Measure] attribute EventHandler onpointerlockchange;
154 attribute EventHandler onpointerlockerror; 154 [Measure] attribute EventHandler onpointerlockerror;
155 [MeasureAs=DocumentExitPointerLock] void exitPointerLock(); 155 [MeasureAs=DocumentExitPointerLock] void exitPointerLock();
156 156
157 // Touch Events 157 // Touch Events
158 // https://w3c.github.io/touch-events/#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=TouchEventFeatureDetection, Measure, LegacyInterfaceTypeChec king, Custom=CallPrologue] 160 [RuntimeEnabled=TouchEventFeatureDetection, Measure, LegacyInterfaceTypeChec king, 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,
(...skipping 10 matching lines...) Expand all
175 // https://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-i nterface-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 // https://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-i nterface-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 // https://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 [Measure] readonly attribute boolean hidden;
186 readonly attribute VisibilityState visibilityState; 186 [Measure] readonly attribute VisibilityState visibilityState;
187 187
188 // CORS and RFC1918 188 // CORS and RFC1918
189 // https://wicg.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 [Measure, 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 https://crbug.com/43394 will resol ve 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 [Measure] attribute EventHandler onbeforecopy;
203 attribute EventHandler onbeforecut; 203 [Measure] attribute EventHandler onbeforecut;
204 attribute EventHandler onbeforepaste; 204 [Measure] attribute EventHandler onbeforepaste;
205 attribute EventHandler oncopy; 205 [Measure] attribute EventHandler oncopy;
206 attribute EventHandler oncut; 206 [Measure] attribute EventHandler oncut;
207 attribute EventHandler onpaste; 207 [Measure] attribute EventHandler onpaste;
208 attribute EventHandler onsearch; 208 [Measure] attribute EventHandler onsearch;
209 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa ndler onsecuritypolicyviolation; 209 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures, Measure] attribut e EventHandler onsecuritypolicyviolation;
210 attribute EventHandler onselectionchange; 210 [Measure] attribute EventHandler onselectionchange;
211 attribute EventHandler onselectstart; 211 [Measure] attribute EventHandler onselectstart;
212 attribute EventHandler onwheel; 212 [Measure] 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;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMMatrixReadOnly.idl ('k') | third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698