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

Unified Diff: tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate

Issue 15431003: Cleanup of various DOM dart2js and dart_analyzer warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/src/dart2js_Conversions.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
diff --git a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
index 9792bf15e2afb5690a4e710af609ed93625d90c3..d4e304ded5bbcb66415aa1185e43926a8164da0f 100644
--- a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -64,13 +64,12 @@ $!MEMBERS
return new Point(x, y);
} else {
// Firefox does not support offsetX.
- var target = this.target;
- if (!(target is Element)) {
+ if (!(this.target is Element)) {
throw new UnsupportedError(
'offsetX is only supported on elements');
}
- return (this.client -
- this.target.getBoundingClientRect().topLeft).toInt();
+ Element target = this.target;
+ return (this.client - target.getBoundingClientRect().topLeft).toInt();
}
}
« no previous file with comments | « tools/dom/src/dart2js_Conversions.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698