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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11691005: Revert "Filling in supported platforms for InputElement types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.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 library html; 1 library html;
2 2
3 import 'dart:collection'; 3 import 'dart:collection';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 import 'dart:indexed_db'; 5 import 'dart:indexed_db';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 import 'dart:json'; 7 import 'dart:json';
8 import 'dart:svg' as svg; 8 import 'dart:svg' as svg;
9 import 'dart:web_audio' as web_audio; 9 import 'dart:web_audio' as web_audio;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 11142 matching lines...) Expand 10 before | Expand all | Expand 10 after
11153 /// @domName HTMLInputElement.stepDown 11153 /// @domName HTMLInputElement.stepDown
11154 void stepDown([int n]); 11154 void stepDown([int n]);
11155 11155
11156 /// @domName HTMLInputElement.stepUp 11156 /// @domName HTMLInputElement.stepUp
11157 void stepUp([int n]); 11157 void stepUp([int n]);
11158 } 11158 }
11159 11159
11160 /** 11160 /**
11161 * A date and time (year, month, day, hour, minute, second, fraction of a 11161 * A date and time (year, month, day, hour, minute, second, fraction of a
11162 * second) with the time zone set to UTC. 11162 * second) with the time zone set to UTC.
11163 *
11164 * Use [supported] to check if this is supported on the current platform.
11165 */ 11163 */
11166 @SupportedBrowser(SupportedBrowser.CHROME, '25')
11167 @Experimental()
11168 abstract class DateTimeInputElement implements RangeInputElementBase { 11164 abstract class DateTimeInputElement implements RangeInputElementBase {
11169 factory DateTimeInputElement() => new InputElement(type: 'datetime'); 11165 factory DateTimeInputElement() => new InputElement(type: 'datetime');
11170 11166
11171 /// @domName HTMLInputElement.valueAsDate 11167 /// @domName HTMLInputElement.valueAsDate
11172 Date valueAsDate; 11168 Date valueAsDate;
11173 11169
11174 /// @domName HTMLInputElement.readOnly 11170 /// @domName HTMLInputElement.readOnly
11175 bool readOnly; 11171 bool readOnly;
11176 11172
11177 /// @domName HTMLInputElement.required 11173 /// @domName HTMLInputElement.required
11178 bool required; 11174 bool required;
11179
11180 /// Returns true if this input type is supported on the current platform.
11181 static bool get supported() {
11182 return (new InputElement(type: 'datetime')).type == 'datetime';
11183 }
11184 } 11175 }
11185 11176
11186 /** 11177 /**
11187 * A date (year, month, day) with no time zone. 11178 * A date (year, month, day) with no time zone.
11188 *
11189 * Use [supported] to check if this is supported on the current platform.
11190 */ 11179 */
11191 @SupportedBrowser(SupportedBrowser.CHROME, '25')
11192 @Experimental()
11193 abstract class DateInputElement implements RangeInputElementBase { 11180 abstract class DateInputElement implements RangeInputElementBase {
11194 factory DateInputElement() => new InputElement(type: 'date'); 11181 factory DateInputElement() => new InputElement(type: 'date');
11195 11182
11196 /// @domName HTMLInputElement.valueAsDate 11183 /// @domName HTMLInputElement.valueAsDate
11197 Date valueAsDate; 11184 Date valueAsDate;
11198 11185
11199 /// @domName HTMLInputElement.readOnly 11186 /// @domName HTMLInputElement.readOnly
11200 bool readOnly; 11187 bool readOnly;
11201 11188
11202 /// @domName HTMLInputElement.required 11189 /// @domName HTMLInputElement.required
11203 bool required; 11190 bool required;
11204
11205 /// Returns true if this input type is supported on the current platform.
11206 static bool get supported() {
11207 return (new InputElement(type: 'date')).type == 'date';
11208 }
11209 } 11191 }
11210 11192
11211 /** 11193 /**
11212 * A date consisting of a year and a month with no time zone. 11194 * A date consisting of a year and a month with no time zone.
11213 *
11214 * Use [supported] to check if this is supported on the current platform.
11215 */ 11195 */
11216 @SupportedBrowser(SupportedBrowser.CHROME, '25')
11217 @Experimental()
11218 abstract class MonthInputElement implements RangeInputElementBase { 11196 abstract class MonthInputElement implements RangeInputElementBase {
11219 factory MonthInputElement() => new InputElement(type: 'month'); 11197 factory MonthInputElement() => new InputElement(type: 'month');
11220 11198
11221 /// @domName HTMLInputElement.valueAsDate 11199 /// @domName HTMLInputElement.valueAsDate
11222 Date valueAsDate; 11200 Date valueAsDate;
11223 11201
11224 /// @domName HTMLInputElement.readOnly 11202 /// @domName HTMLInputElement.readOnly
11225 bool readOnly; 11203 bool readOnly;
11226 11204
11227 /// @domName HTMLInputElement.required 11205 /// @domName HTMLInputElement.required
11228 bool required; 11206 bool required;
11229
11230 /// Returns true if this input type is supported on the current platform.
11231 static bool get supported() {
11232 return (new InputElement(type: 'month')).type == 'month';
11233 }
11234 } 11207 }
11235 11208
11236 /** 11209 /**
11237 * A date consisting of a week-year number and a week number with no time zone. 11210 * A date consisting of a week-year number and a week number with no time zone.
11238 *
11239 * Use [supported] to check if this is supported on the current platform.
11240 */ 11211 */
11241 @SupportedBrowser(SupportedBrowser.CHROME, '25')
11242 @Experimental()
11243 abstract class WeekInputElement implements RangeInputElementBase { 11212 abstract class WeekInputElement implements RangeInputElementBase {
11244 factory WeekInputElement() => new InputElement(type: 'week'); 11213 factory WeekInputElement() => new InputElement(type: 'week');
11245 11214
11246 /// @domName HTMLInputElement.valueAsDate 11215 /// @domName HTMLInputElement.valueAsDate
11247 Date valueAsDate; 11216 Date valueAsDate;
11248 11217
11249 /// @domName HTMLInputElement.readOnly 11218 /// @domName HTMLInputElement.readOnly
11250 bool readOnly; 11219 bool readOnly;
11251 11220
11252 /// @domName HTMLInputElement.required 11221 /// @domName HTMLInputElement.required
11253 bool required; 11222 bool required;
11254
11255 /// Returns true if this input type is supported on the current platform.
11256 static bool get supported() {
11257 return (new InputElement(type: 'week')).type == 'week';
11258 }
11259 } 11223 }
11260 11224
11261 /** 11225 /**
11262 * A time (hour, minute, seconds, fractional seconds) with no time zone. 11226 * A time (hour, minute, seconds, fractional seconds) with no time zone.
11263 *
11264 * Use [supported] to check if this is supported on the current platform.
11265 */ 11227 */
11266 @SupportedBrowser(SupportedBrowser.CHROME)
11267 @Experimental()
11268 abstract class TimeInputElement implements RangeInputElementBase { 11228 abstract class TimeInputElement implements RangeInputElementBase {
11269 factory TimeInputElement() => new InputElement(type: 'time'); 11229 factory TimeInputElement() => new InputElement(type: 'time');
11270 11230
11271 /// @domName HTMLInputElement.valueAsDate 11231 /// @domName HTMLInputElement.valueAsDate
11272 Date valueAsDate; 11232 Date valueAsDate;
11273 11233
11274 /// @domName HTMLInputElement.readOnly 11234 /// @domName HTMLInputElement.readOnly
11275 bool readOnly; 11235 bool readOnly;
11276 11236
11277 /// @domName HTMLInputElement.required 11237 /// @domName HTMLInputElement.required
11278 bool required; 11238 bool required;
11279
11280 /// Returns true if this input type is supported on the current platform.
11281 static bool get supported() {
11282 return (new InputElement(type: 'time')).type == 'time';
11283 }
11284 } 11239 }
11285 11240
11286 /** 11241 /**
11287 * A date and time (year, month, day, hour, minute, second, fraction of a 11242 * A date and time (year, month, day, hour, minute, second, fraction of a
11288 * second) with no time zone. 11243 * second) with no time zone.
11289 *
11290 * Use [supported] to check if this is supported on the current platform.
11291 */ 11244 */
11292 @SupportedBrowser(SupportedBrowser.CHROME, '25')
11293 @Experimental()
11294 abstract class LocalDateTimeInputElement implements RangeInputElementBase { 11245 abstract class LocalDateTimeInputElement implements RangeInputElementBase {
11295 factory LocalDateTimeInputElement() => 11246 factory LocalDateTimeInputElement() =>
11296 new InputElement(type: 'datetime-local'); 11247 new InputElement(type: 'datetime-local');
11297 11248
11298 /// @domName HTMLInputElement.readOnly 11249 /// @domName HTMLInputElement.readOnly
11299 bool readOnly; 11250 bool readOnly;
11300 11251
11301 /// @domName HTMLInputElement.required 11252 /// @domName HTMLInputElement.required
11302 bool required; 11253 bool required;
11303
11304 /// Returns true if this input type is supported on the current platform.
11305 static bool get supported() {
11306 return (new InputElement(type: 'datetime-local')).type == 'datetime-local';
11307 }
11308 } 11254 }
11309 11255
11310 /** 11256 /**
11311 * A numeric editor control. 11257 * A numeric editor control.
11312 */ 11258 */
11313 @SupportedBrowser(SupportedBrowser.CHROME)
11314 @SupportedBrowser(SupportedBrowser.IE)
11315 @SupportedBrowser(SupportedBrowser.SAFARI)
11316 @Experimental()
11317 abstract class NumberInputElement implements RangeInputElementBase { 11259 abstract class NumberInputElement implements RangeInputElementBase {
11318 factory NumberInputElement() => new InputElement(type: 'number'); 11260 factory NumberInputElement() => new InputElement(type: 'number');
11319 11261
11320 /// @domName HTMLInputElement.placeholder 11262 /// @domName HTMLInputElement.placeholder
11321 String placeholder; 11263 String placeholder;
11322 11264
11323 /// @domName HTMLInputElement.readOnly 11265 /// @domName HTMLInputElement.readOnly
11324 bool readOnly; 11266 bool readOnly;
11325 11267
11326 /// @domName HTMLInputElement.required 11268 /// @domName HTMLInputElement.required
11327 bool required; 11269 bool required;
11328
11329 /// Returns true if this input type is supported on the current platform.
11330 static bool get supported() {
11331 return (new InputElement(type: 'number')).type == 'number';
11332 }
11333 } 11270 }
11334 11271
11335 /** 11272 /**
11336 * Similar to [NumberInputElement] but the browser may provide more optimal 11273 * Similar to [NumberInputElement] but the browser may provide more optimal
11337 * styling (such as a slider control). 11274 * styling (such as a slider control).
11338 *
11339 * Use [supported] to check if this is supported on the current platform.
11340 */ 11275 */
11341 @SupportedBrowser(SupportedBrowser.CHROME)
11342 @SupportedBrowser(SupportedBrowser.IE, '10')
11343 @Experimental()
11344 abstract class RangeInputElement implements RangeInputElementBase { 11276 abstract class RangeInputElement implements RangeInputElementBase {
11345 factory RangeInputElement() => new InputElement(type: 'range'); 11277 factory RangeInputElement() => new InputElement(type: 'range');
11346
11347 /// Returns true if this input type is supported on the current platform.
11348 static bool get supported() {
11349 return (new InputElement(type: 'range')).type == 'range';
11350 }
11351 } 11278 }
11352 11279
11353 /** 11280 /**
11354 * A boolean editor control. 11281 * A boolean editor control.
11355 * 11282 *
11356 * Note that if [indeterminate] is set then this control is in a third 11283 * Note that if [indeterminate] is set then this control is in a third
11357 * indeterminate state. 11284 * indeterminate state.
11358 */ 11285 */
11359 abstract class CheckboxInputElement implements InputElementBase { 11286 abstract class CheckboxInputElement implements InputElementBase {
11360 factory CheckboxInputElement() => new InputElement(type: 'checkbox'); 11287 factory CheckboxInputElement() => new InputElement(type: 'checkbox');
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
13305 @SupportedBrowser(SupportedBrowser.FIREFOX) 13232 @SupportedBrowser(SupportedBrowser.FIREFOX)
13306 @SupportedBrowser(SupportedBrowser.SAFARI) 13233 @SupportedBrowser(SupportedBrowser.SAFARI)
13307 @Experimental() 13234 @Experimental()
13308 class MutationObserver native "*MutationObserver" { 13235 class MutationObserver native "*MutationObserver" {
13309 13236
13310 ///@docsEditable true 13237 ///@docsEditable true
13311 factory MutationObserver(MutationCallback callback) => MutationObserver._creat e(callback); 13238 factory MutationObserver(MutationCallback callback) => MutationObserver._creat e(callback);
13312 static MutationObserver _create(MutationCallback callback) { 13239 static MutationObserver _create(MutationCallback callback) {
13313 // Dummy statement to mark types as instantiated. 13240 // Dummy statement to mark types as instantiated.
13314 JS('MutationObserver|MutationRecord', '0'); 13241 JS('MutationObserver|MutationRecord', '0');
13315
13316 return JS('MutationObserver', 13242 return JS('MutationObserver',
13317 'new(window.MutationObserver||window.WebKitMutationObserver||' 13243 'new(window.MutationObserver||window.WebKitMutationObserver||'
13318 'window.MozMutationObserver)(#)', 13244 'window.MozMutationObserver)(#)',
13319 convertDartClosureToJS(callback, 2)); 13245 convertDartClosureToJS(callback, 2));
13320 } 13246 }
13321 13247
13322 /// @domName MutationObserver.disconnect; @docsEditable true 13248 /// @domName MutationObserver.disconnect; @docsEditable true
13323 void disconnect() native; 13249 void disconnect() native;
13324 13250
13325 /// @domName MutationObserver._observe; @docsEditable true 13251 /// @domName MutationObserver._observe; @docsEditable true
(...skipping 12006 matching lines...) Expand 10 before | Expand all | Expand 10 after
25332 T next() { 25258 T next() {
25333 if (!hasNext) { 25259 if (!hasNext) {
25334 throw new StateError("No more elements"); 25260 throw new StateError("No more elements");
25335 } 25261 }
25336 return _array[_pos++]; 25262 return _array[_pos++];
25337 } 25263 }
25338 25264
25339 final List<T> _array; 25265 final List<T> _array;
25340 int _pos; 25266 int _pos;
25341 } 25267 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698