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

Unified Diff: tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate

Issue 27983005: Make getLineDash return [] instead of null if it has not yet been set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
index 103038464be745acfac9f9401d789eddaaaf07ad..d7e4bc4712b0914a9ac8237d55b418182c711d98 100644
--- a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
@@ -261,7 +261,18 @@ $if DART2JS
void set lineDashOffset(num value) => JS('void',
'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : '
'#.webkitLineDashOffset = #', this, this, value, this, value);
+
+ @DomName('CanvasRenderingContext2D.getLineDash')
+ List<num> getLineDash() => _getLineDash();
$else
+ @DomName('CanvasRenderingContext2D.getLineDash')
+ List<num> getLineDash() {
+ var result = _getLineDash();
+ if (result == null) {
+ result = [];
+ }
+ return result;
+ }
// TODO(amouravski): Add Dartium native methods for drawImage once we figure
// out how to not break native bindings.
$endif
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698