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

Side by Side Diff: tools/dom/src/dart2js_CssClassSet.dart

Issue 1894713002: Strong html (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 4 years, 8 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
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/src/dart2js_DOMImplementation.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 html; 5 part of html;
6 6
7 /** 7 /**
8 * A set (union) of the CSS classes that are present in a set of elements. 8 * A set (union) of the CSS classes that are present in a set of elements.
9 * Implemented separately from _ElementCssClassSet for performance. 9 * Implemented separately from _ElementCssClassSet for performance.
10 */ 10 */
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 bool toggle(String value, [bool shouldAdd]) { 115 bool toggle(String value, [bool shouldAdd]) {
116 return _toggle(_element, value, shouldAdd); 116 return _toggle(_element, value, shouldAdd);
117 } 117 }
118 118
119 void addAll(Iterable<String> iterable) { 119 void addAll(Iterable<String> iterable) {
120 _addAll(_element, iterable); 120 _addAll(_element, iterable);
121 } 121 }
122 122
123 void removeAll(Iterable<String> iterable) { 123 void removeAll(Iterable<Object> iterable) {
124 _removeAll(_element, iterable); 124 _removeAll(_element, iterable);
125 } 125 }
126 126
127 void retainAll(Iterable<String> iterable) { 127 void retainAll(Iterable<Object> iterable) {
128 _removeWhere(_element, iterable.toSet().contains, false); 128 _removeWhere(_element, iterable.toSet().contains, false);
129 } 129 }
130 130
131 void removeWhere(bool test(String name)) { 131 void removeWhere(bool test(String name)) {
132 _removeWhere(_element, test, true); 132 _removeWhere(_element, test, true);
133 } 133 }
134 134
135 void retainWhere(bool test(String name)) { 135 void retainWhere(bool test(String name)) {
136 _removeWhere(_element, test, false); 136 _removeWhere(_element, test, false);
137 } 137 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 static bool _classListToggle1(DomTokenList list, String value) { 250 static bool _classListToggle1(DomTokenList list, String value) {
251 return JS('bool', '#.toggle(#)', list, value); 251 return JS('bool', '#.toggle(#)', list, value);
252 } 252 }
253 253
254 static bool _classListToggle2( 254 static bool _classListToggle2(
255 DomTokenList list, String value, bool shouldAdd) { 255 DomTokenList list, String value, bool shouldAdd) {
256 return JS('bool', '#.toggle(#, #)', list, value, shouldAdd); 256 return JS('bool', '#.toggle(#, #)', list, value, shouldAdd);
257 } 257 }
258 } 258 }
OLDNEW
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/src/dart2js_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698