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

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

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

Powered by Google App Engine
This is Rietveld 408576698