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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 13726010: Rename context2d to context2D. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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:
Download patch
« no previous file with comments | « samples/sunflower/web/sunflower.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index f282d2cf8dbb44d12e9bf5d4de4085ad41bd6e2c..c6499621c69f3aa639671a25d10f101762848158 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -949,7 +949,7 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa
* Example usage:
*
* CanvasElement canvas = new CanvasElement();
- * var ctx = canvas.context2d
+ * var ctx = canvas.context2D
* ..fillStyle = "rgb(200,0,0)"
* ..fillRect(10, 10, 55, 50);
* var dataUrl = canvas.toDataURL("image/jpeg", 0.95);
@@ -974,7 +974,11 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa
@DocsEditable
String toDataUrl(String type, [num quality]) native;
- CanvasRenderingContext2D get context2d => getContext('2d');
+ /** An API for drawing on this canvas. */
+ CanvasRenderingContext2D get context2D => getContext('2d');
+
+ @deprecated
+ CanvasRenderingContext2D get context2d => this.context2D;
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@@ -1012,7 +1016,7 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
- * var ctx = canvas.context2d;
+ * var ctx = canvas.context2D;
* ctx.clearRect(0, 0, 600, 600);
* ctx.save();
* // Create radial gradient.
@@ -1062,7 +1066,7 @@ class CanvasGradient native "*CanvasGradient" {
* Example usage:
*
* var canvas = new CanvasElement(width: 600, height: 600);
- * var ctx = canvas.context2d;
+ * var ctx = canvas.context2D;
* var img = new ImageElement();
* // Image src needs to be loaded before pattern is applied.
* img.onLoad.listen((event) {
@@ -1485,7 +1489,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
* will allow, the image will be clipped to fit the available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
* img.width = 100;
* img.height = 100;
@@ -1543,7 +1547,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
* available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
*
* ctx.drawImage(img, 100, 100);
@@ -1578,7 +1582,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
* will allow, the image will be clipped to fit the available space.
*
* CanvasElement canvas = new CanvasElement(width: 600, height: 600);
- * CanvasRenderingContext2D ctx = canvas.context2d;
+ * CanvasRenderingContext2D ctx = canvas.context2D;
* ImageElement img = document.query('img');
* img.width = 100;
* img.height = 100;
« no previous file with comments | « samples/sunflower/web/sunflower.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698