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

Side by Side Diff: tools/dom/templates/html/impl/impl_Document.darttemplate

Issue 2978213002: Removed DARTIUM codegen for IDLS (sdk/lib/dartium) (Closed)
Patch Set: Update generated darttemplate Created 3 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 @DocsEditable() 7 @DocsEditable()
8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node
9 { 9 {
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * semantics will be changing in the future. 42 * semantics will be changing in the future.
43 */ 43 */
44 @deprecated 44 @deprecated
45 @Experimental() 45 @Experimental()
46 @DomName('Document.querySelectorAll') 46 @DomName('Document.querySelectorAll')
47 ElementList<Element /*=T*/> queryAll/*<T extends Element>*/(String relativeSel ectors) => 47 ElementList<Element /*=T*/> queryAll/*<T extends Element>*/(String relativeSel ectors) =>
48 querySelectorAll(relativeSelectors); 48 querySelectorAll(relativeSelectors);
49 49
50 /// Checks if [registerElement] is supported on the current platform. 50 /// Checks if [registerElement] is supported on the current platform.
51 bool get supportsRegisterElement { 51 bool get supportsRegisterElement {
52 $if DART2JS
53 return JS('bool', '("registerElement" in #)', this); 52 return JS('bool', '("registerElement" in #)', this);
54 $else
55 return true;
56 $endif
57 } 53 }
58 54
59 /// *Deprecated*: use [supportsRegisterElement] instead. 55 /// *Deprecated*: use [supportsRegisterElement] instead.
60 @deprecated 56 @deprecated
61 bool get supportsRegister => supportsRegisterElement; 57 bool get supportsRegister => supportsRegisterElement;
62 58
63 @DomName('Document.createElement') 59 @DomName('Document.createElement')
64 Element createElement(String tagName, [String typeExtension]) { 60 Element createElement(String tagName, [String typeExtension]) {
65 $if DART2JS
66 return (typeExtension == null) 61 return (typeExtension == null)
67 ? _createElement_2(tagName) 62 ? _createElement_2(tagName)
68 : _createElement(tagName, typeExtension); 63 : _createElement(tagName, typeExtension);
69 $else
70 return (typeExtension == null) ?
71 _blink.BlinkDocument.instance.createElement_Callback_1_(this, tagName) :
72 _blink.BlinkDocument.instance.createElement_Callback_2_(this, tagName, typ eExtension);
73 $endif
74 } 64 }
75 65
76 $if DART2JS
77 // The two-argument version of this is automatically generated, but we need to 66 // The two-argument version of this is automatically generated, but we need to
78 // omit the typeExtension if it's null on Firefox or we get an is="null" attri bute. 67 // omit the typeExtension if it's null on Firefox or we get an is="null" attri bute.
79 @DomName('Document.createElement') 68 @DomName('Document.createElement')
80 _createElement_2(String tagName) => 69 _createElement_2(String tagName) =>
81 JS('Element', '#.createElement(#)', this, tagName); 70 JS('Element', '#.createElement(#)', this, tagName);
82 71
83 // The three-argument version of this is automatically generated, but we need to 72 // The three-argument version of this is automatically generated, but we need to
84 // omit the typeExtension if it's null on Firefox or we get an is="null" attri bute. 73 // omit the typeExtension if it's null on Firefox or we get an is="null" attri bute.
85 @DomName('Document.createElementNS') 74 @DomName('Document.createElementNS')
86 _createElementNS_2(String namespaceURI, String qualifiedName) => 75 _createElementNS_2(String namespaceURI, String qualifiedName) =>
87 JS('Element', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName ); 76 JS('Element', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName );
88 77
89 $endif
90 @DomName('Document.createElementNS') 78 @DomName('Document.createElementNS')
91 @DocsEditable() 79 @DocsEditable()
92 Element createElementNS(String namespaceURI, String qualifiedName, [String typ eExtension]) { 80 Element createElementNS(String namespaceURI, String qualifiedName, [String typ eExtension]) {
93 $if DART2JS
94 return (typeExtension == null) 81 return (typeExtension == null)
95 ? _createElementNS_2(namespaceURI, qualifiedName) 82 ? _createElementNS_2(namespaceURI, qualifiedName)
96 : _createElementNS(namespaceURI, qualifiedName, typeExtension); 83 : _createElementNS(namespaceURI, qualifiedName, typeExtension);
97 $else
98 return (typeExtension == null) ?
99 _blink.BlinkDocument.instance.createElementNS_Callback_2_(this, namespaceU RI, qualifiedName) :
100 _blink.BlinkDocument.instance.createElementNS_Callback_3_(this, namespaceU RI, qualifiedName, typeExtension);
101 $endif
102 } 84 }
103 85
104 $if DART2JS
105 @DomName('Document.createNodeIterator') 86 @DomName('Document.createNodeIterator')
106 NodeIterator _createNodeIterator(Node root, 87 NodeIterator _createNodeIterator(Node root,
107 [int whatToShow, NodeFilter filter]) 88 [int whatToShow, NodeFilter filter])
108 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', 89 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)',
109 this, root, whatToShow, filter); 90 this, root, whatToShow, filter);
110 91
111 @DomName('Document.createTreeWalker') 92 @DomName('Document.createTreeWalker')
112 TreeWalker _createTreeWalker(Node root, 93 TreeWalker _createTreeWalker(Node root,
113 [int whatToShow, NodeFilter filter]) 94 [int whatToShow, NodeFilter filter])
114 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', 95 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)',
115 this, root, whatToShow, filter); 96 this, root, whatToShow, filter);
116 $endif
117 97
118 @DomName('Document.visibilityState') 98 @DomName('Document.visibilityState')
119 @SupportedBrowser(SupportedBrowser.CHROME) 99 @SupportedBrowser(SupportedBrowser.CHROME)
120 @SupportedBrowser(SupportedBrowser.FIREFOX) 100 @SupportedBrowser(SupportedBrowser.FIREFOX)
121 @SupportedBrowser(SupportedBrowser.IE, '10') 101 @SupportedBrowser(SupportedBrowser.IE, '10')
122 @Experimental() 102 @Experimental()
123 $if DART2JS
124 String get visibilityState => JS('String', 103 String get visibilityState => JS('String',
125 '(#.visibilityState || #.mozVisibilityState || #.msVisibilityState ||' 104 '(#.visibilityState || #.mozVisibilityState || #.msVisibilityState ||'
126 '#.webkitVisibilityState)', this, this, this, this); 105 '#.webkitVisibilityState)', this, this, this, this);
127 $else
128 String get visibilityState => _visibilityState;
129 $endif
130 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698