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

Unified Diff: lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate

Issue 11094082: Convert legacy 'native code' to JS-forms in dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 8 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
Index: lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
diff --git a/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate b/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
index 1af66662b25e7058a93496d8345c1f4cbd6e957c..5d0485c56dc228e32d5812baebace6d97435748d 100644
--- a/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/lib/html/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -6,8 +6,8 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
int get offsetX {
- if (JS('bool', '!!this.offsetX')) {
- return this._offsetX;
+ if (JS('bool', '!!#.offsetX', this)) {
+ return JS('int', '#.offsetX', this);
} else {
// Firefox does not support offsetX.
var target = this.target;
@@ -20,19 +20,16 @@ $!MEMBERS
}
int get offsetY {
- if (JS('bool', '!!this.offsetY')) {
- return this._offsetY;
+ if (JS('bool', '!!#.offsetY', this)) {
+ return JS('int', '#.offsetY', this);
} else {
// Firefox does not support offsetY.
var target = this.target;
if (!(target is Element)) {
throw const UnsupportedOperationException(
- 'offsetX is only supported on elements');
+ 'offsetY is only supported on elements');
}
return this.clientY - this.target.getBoundingClientRect().top;
}
}
-
- int get _offsetX() native 'return this.offsetX';
- int get _offsetY() native 'return this.offsetY';
}

Powered by Google App Engine
This is Rietveld 408576698