OLD | NEW |
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 abstract class CanvasRenderingContext { | 7 abstract class CanvasRenderingContext { |
8 CanvasElement get canvas; | 8 CanvasElement get canvas; |
9 } | 9 } |
10 | 10 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 num get lineDashOffset => JS('num', | 273 num get lineDashOffset => JS('num', |
274 '#.lineDashOffset || #.webkitLineDashOffset', this, this); | 274 '#.lineDashOffset || #.webkitLineDashOffset', this, this); |
275 | 275 |
276 @SupportedBrowser(SupportedBrowser.CHROME) | 276 @SupportedBrowser(SupportedBrowser.CHROME) |
277 @SupportedBrowser(SupportedBrowser.SAFARI) | 277 @SupportedBrowser(SupportedBrowser.SAFARI) |
278 @SupportedBrowser(SupportedBrowser.IE, '11') | 278 @SupportedBrowser(SupportedBrowser.IE, '11') |
279 @Unstable() | 279 @Unstable() |
280 @DomName('CanvasRenderingContext2D.lineDashOffset') | 280 @DomName('CanvasRenderingContext2D.lineDashOffset') |
281 // TODO(14316): Firefox has this functionality with mozDashOffset, but it | 281 // TODO(14316): Firefox has this functionality with mozDashOffset, but it |
282 // needs to be polyfilled. | 282 // needs to be polyfilled. |
283 set lineDashOffset(num value) { | 283 void set lineDashOffset(num value) { |
284 JS('void', | 284 JS('void', |
285 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : ' | 285 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : ' |
286 '#.webkitLineDashOffset = #', this, this, value, this, value); | 286 '#.webkitLineDashOffset = #', this, this, value, this, value); |
287 } | 287 } |
288 $else | 288 $else |
289 // TODO(amouravski): Add Dartium native methods for drawImage once we figure | 289 // TODO(amouravski): Add Dartium native methods for drawImage once we figure |
290 // out how to not break native bindings. | 290 // out how to not break native bindings. |
291 $endif | 291 $endif |
292 | 292 |
293 @SupportedBrowser(SupportedBrowser.CHROME) | 293 @SupportedBrowser(SupportedBrowser.CHROME) |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 JS('void', '#.fill(#)', this, winding); | 360 JS('void', '#.fill(#)', this, winding); |
361 } | 361 } |
362 $endif | 362 $endif |
363 | 363 |
364 /** Deprecated always returns 1.0 */ | 364 /** Deprecated always returns 1.0 */ |
365 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') | 365 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') |
366 @Experimental() | 366 @Experimental() |
367 @deprecated | 367 @deprecated |
368 double get backingStorePixelRatio => 1.0; | 368 double get backingStorePixelRatio => 1.0; |
369 } | 369 } |
OLD | NEW |