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

Side by Side Diff: Source/core/dom/Element.idl

Issue 361883004: Replace many [TreatReturnedNullStringAs=Null] with nullable DOMString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
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 [ 21 [
22 SpecialWrapFor=HTMLElement|SVGElement, 22 SpecialWrapFor=HTMLElement|SVGElement,
23 ] interface Element : Node { 23 ] interface Element : Node {
24 24
25 // DOM Level 1 Core 25 // DOM Level 1 Core
26 26
27 [TreatReturnedNullStringAs=Null] readonly attribute DOMString tagName; 27 readonly attribute DOMString? tagName;
28 28
29 [TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name); 29 DOMString? getAttribute(DOMString name);
30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value); 30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value);
31 [CustomElementCallbacks] void removeAttribute(DOMString name); 31 [CustomElementCallbacks] void removeAttribute(DOMString name);
32 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined ] optional DOMString name); // Removed from DOM4. 32 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined ] optional DOMString name); // Removed from DOM4.
33 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined] optional Attr newAttr); // Removed fr om DOM4. 33 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined] optional Attr newAttr); // Removed fr om DOM4.
34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo de] Attr removeAttributeNode([Default=Undefined] optional Attr oldAttr); // Remo ved from DOM4. 34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo de] Attr removeAttributeNode([Default=Undefined] optional Attr oldAttr); // Remo ved from DOM4.
35 HTMLCollection getElementsByTagName(DOMString name); 35 HTMLCollection getElementsByTagName(DOMString name);
36 36
37 [PerWorldBindings, ImplementedAs=attributesForBindings] readonly attribute N amedNodeMap attributes; 37 [PerWorldBindings, ImplementedAs=attributesForBindings] readonly attribute N amedNodeMap attributes;
38 [MeasureAs=HasAttributes] boolean hasAttributes(); 38 [MeasureAs=HasAttributes] boolean hasAttributes();
39 39
40 // DOM Level 2 Core 40 // DOM Level 2 Core
41 41
42 [TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullS tring] DOMString namespaceURI, DOMString localName); 42 DOMString? getAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, D OMString localName);
43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value); 43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value);
44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM String namespaceURI, DOMString localName); 44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM String namespaceURI, DOMString localName);
45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam espaceURI, DOMString localName); 45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam espaceURI, DOMString localName);
46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N ullString, Default=Undefined] optional DOMString namespaceURI, 46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N ullString, Default=Undefined] optional DOMString namespaceURI,
47 [Default=Undef ined] optional DOMString localName); // Removed from DOM4. 47 [Default=Undef ined] optional DOMString localName); // Removed from DOM4.
48 [RaisesException, CustomElementCallbacks, DeprecateAs=ElementSetAttributeNod eNS] Attr setAttributeNodeNS([Default=Undefined] optional Attr newAttr); // Remo ved from DOM4. 48 [RaisesException, CustomElementCallbacks, DeprecateAs=ElementSetAttributeNod eNS] Attr setAttributeNodeNS([Default=Undefined] optional Attr newAttr); // Remo ved from DOM4.
49 boolean hasAttribute(DOMString name); 49 boolean hasAttribute(DOMString name);
50 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS tring localName); 50 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS tring localName);
51 51
52 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; 52 [PerWorldBindings] readonly attribute CSSStyleDeclaration style;
53 53
54 // DOM4 54 // DOM4
55 [Reflect] attribute DOMString id; 55 [Reflect] attribute DOMString id;
56 [TreatReturnedNullStringAs=Null] readonly attribute DOMString namespaceURI; 56 readonly attribute DOMString? namespaceURI;
57 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, RaisesException=Set ter] attribute DOMString prefix; 57 [RaisesException=Setter] attribute DOMString? prefix;
58 [TreatReturnedNullStringAs=Null] readonly attribute DOMString localName; 58 readonly attribute DOMString? localName;
59 59
60 [RaisesException] boolean matches(DOMString selectors); 60 [RaisesException] boolean matches(DOMString selectors);
61 61
62 // Common extensions 62 // Common extensions
63 63
64 readonly attribute long offsetLeft; 64 readonly attribute long offsetLeft;
65 readonly attribute long offsetTop; 65 readonly attribute long offsetTop;
66 readonly attribute long offsetWidth; 66 readonly attribute long offsetWidth;
67 readonly attribute long offsetHeight; 67 readonly attribute long offsetHeight;
68 [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute Element offsetParent; 68 [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute Element offsetParent;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; 139 [RuntimeEnabled=Touch] attribute EventHandler ontouchend;
140 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; 140 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove;
141 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; 141 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart;
142 attribute EventHandler onwebkitfullscreenchange; 142 attribute EventHandler onwebkitfullscreenchange;
143 attribute EventHandler onwebkitfullscreenerror; 143 attribute EventHandler onwebkitfullscreenerror;
144 attribute EventHandler onwheel; 144 attribute EventHandler onwheel;
145 }; 145 };
146 146
147 Element implements ParentNode; 147 Element implements ParentNode;
148 Element implements ChildNode; 148 Element implements ChildNode;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698