| 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 dec8d31cfa4a78be2888e0b4a785225a6a517ef3..baa088935bfb718de1f1f219e10d3d939b2520fd 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -1383,9 +1383,10 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @Creates('ImageData|=Object')
|
| _getImageData_1(sx, sy, sw, sh) native;
|
|
|
| + @JSName('getLineDash')
|
| @DomName('CanvasRenderingContext2D.getLineDash')
|
| @DocsEditable()
|
| - List<num> getLineDash() native;
|
| + List<num> _getLineDash() native;
|
|
|
| @DomName('CanvasRenderingContext2D.isPointInPath')
|
| @DocsEditable()
|
| @@ -1455,10 +1456,6 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @DocsEditable()
|
| void scale(num sx, num sy) native;
|
|
|
| - @DomName('CanvasRenderingContext2D.setLineDash')
|
| - @DocsEditable()
|
| - void setLineDash(List<num> dash) native;
|
| -
|
| @DomName('CanvasRenderingContext2D.setTransform')
|
| @DocsEditable()
|
| void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
|
| @@ -1738,15 +1735,58 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| num sourceX, num sourceY, num sourceWidth, num sourceHeight,
|
| num destX, num destY, num destWidth, num destHeight) native;
|
|
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @SupportedBrowser(SupportedBrowser.IE, '11')
|
| + @Unstable()
|
| @DomName('CanvasRenderingContext2D.lineDashOffset')
|
| + // TODO(14316): Firefox has this functionality with mozDashOffset, but it
|
| + // needs to be polyfilled.
|
| num get lineDashOffset => JS('num',
|
| '#.lineDashOffset || #.webkitLineDashOffset', this, this);
|
|
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @SupportedBrowser(SupportedBrowser.IE, '11')
|
| + @Unstable()
|
| @DomName('CanvasRenderingContext2D.lineDashOffset')
|
| + // TODO(14316): Firefox has this functionality with mozDashOffset, but it
|
| + // needs to be polyfilled.
|
| void set lineDashOffset(num value) => JS('void',
|
| 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : '
|
| '#.webkitLineDashOffset = #', this, this, value, this, value);
|
|
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @SupportedBrowser(SupportedBrowser.IE, '11')
|
| + @Unstable()
|
| + @DomName('CanvasRenderingContext2D.getLineDash')
|
| + List<num> getLineDash() {
|
| + // TODO(14316): Firefox has this functionality with mozDash, but it's a bit
|
| + // different.
|
| + if (JS('bool', '!!#.getLineDash', this)) {
|
| + return JS('List<num>', '#.getLineDash()', this);
|
| + } else if (JS('bool', '!!#.webkitLineDash', this)) {
|
| + return JS('List<num>', '#.webkitLineDash', this);
|
| + }
|
| + }
|
| +
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.SAFARI)
|
| + @SupportedBrowser(SupportedBrowser.IE, '11')
|
| + @Unstable()
|
| + @DomName('CanvasRenderingContext2D.setLineDash')
|
| + void setLineDash(List<num> dash) {
|
| + // TODO(14316): Firefox has this functionality with mozDash, but it's a bit
|
| + // different.
|
| + if (JS('bool', '!!#.setLineDash', this)) {
|
| + JS('void', '#.setLineDash(#)', this, dash);
|
| + } else if (JS('bool', '!!#.webkitLineDash', this)) {
|
| + JS('void', '#.webkitLineDash = #', this, dash);
|
| + }
|
| + }
|
| +
|
| +
|
| /**
|
| * Draws text to the canvas.
|
| *
|
|
|