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

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

Issue 11846003: Adding supported checks for getCssCanvasContext. (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:async'; 3 import 'dart:async';
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:indexed_db'; 6 import 'dart:indexed_db';
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:json' as json; 8 import 'dart:json' as json;
9 import 'dart:math'; 9 import 'dart:math';
10 import 'dart:svg' as svg; 10 import 'dart:svg' as svg;
(...skipping 10533 matching lines...) Expand 10 before | Expand all | Expand 10 after
10544 /** @domName Document.caretRangeFromPoint */ 10544 /** @domName Document.caretRangeFromPoint */
10545 Range caretRangeFromPoint(int x, int y) { 10545 Range caretRangeFromPoint(int x, int y) {
10546 return document.$dom_caretRangeFromPoint(x, y); 10546 return document.$dom_caretRangeFromPoint(x, y);
10547 } 10547 }
10548 10548
10549 /** @domName Document.elementFromPoint */ 10549 /** @domName Document.elementFromPoint */
10550 Element elementFromPoint(int x, int y) { 10550 Element elementFromPoint(int x, int y) {
10551 return document.$dom_elementFromPoint(x, y); 10551 return document.$dom_elementFromPoint(x, y);
10552 } 10552 }
10553 10553
10554 /** @domName Document.getCSSCanvasContext */ 10554 /**
10555 * Checks if the getCssCanvasContext API is supported on the current platform.
10556 *
10557 * See also:
10558 *
10559 * * [getCssCanvasContext]
10560 */
10561 static bool get supportsCssCanvasContext =>
10562 JS('bool', '!!(document.getCSSCanvasContext)');
10563
10564
10565 /**
10566 * Gets a CanvasRenderingContext which can be used as the CSS background of an
10567 * element.
10568 *
10569 * CSS:
10570 *
10571 * background: -webkit-canvas(backgroundCanvas)
10572 *
10573 * Generate the canvas:
10574 *
10575 * var context = document.getCssCanvasContext('2d', 'backgroundCanvas',
10576 * 100, 100);
10577 * context.fillStyle = 'red';
10578 * context.fillRect(0, 0, 100, 100);
10579 *
10580 * See also:
10581 *
10582 * * [supportsCssCanvasContext]
10583 * * [CanvasElement.getContext]
10584 */
10585 @SupportedBrowser(SupportedBrowser.CHROME)
10586 @SupportedBrowser(SupportedBrowser.SAFARI)
10587 @Experimental()
10555 CanvasRenderingContext getCssCanvasContext(String contextId, String name, 10588 CanvasRenderingContext getCssCanvasContext(String contextId, String name,
10556 int width, int height) { 10589 int width, int height) {
10557 return document.$dom_getCssCanvasContext(contextId, name, width, height); 10590 return document.$dom_getCssCanvasContext(contextId, name, width, height);
10558 } 10591 }
10559 10592
10560 /** @domName Document.head */ 10593 /** @domName Document.head */
10561 HeadElement get head => document.$dom_head; 10594 HeadElement get head => document.$dom_head;
10562 10595
10563 /** @domName Document.lastModified */ 10596 /** @domName Document.lastModified */
10564 String get lastModified => document.$dom_lastModified; 10597 String get lastModified => document.$dom_lastModified;
(...skipping 16393 matching lines...) Expand 10 before | Expand all | Expand 10 after
26958 _position = nextPosition; 26991 _position = nextPosition;
26959 return true; 26992 return true;
26960 } 26993 }
26961 _current = null; 26994 _current = null;
26962 _position = _array.length; 26995 _position = _array.length;
26963 return false; 26996 return false;
26964 } 26997 }
26965 26998
26966 T get current => _current; 26999 T get current => _current;
26967 } 27000 }
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