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

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 493843003: Round Touch attributes back to int for backwards compatibility (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 4 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 | « sdk/lib/_blink/dartium/_blink_dartium.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 f447a34e420ad3492e7f21e048f1263edafdc538..4ac855c642c81af887beeb41bc399543d843d443 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -26177,7 +26177,7 @@ class Touch extends Interceptor {
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
- final int radiusX;
+ final int _webkitRadiusX;
@JSName('webkitRadiusY')
@DomName('Touch.webkitRadiusY')
@@ -26185,7 +26185,7 @@ class Touch extends Interceptor {
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@Experimental()
- final int radiusY;
+ final int _webkitRadiusY;
@JSName('webkitRotationAngle')
@DomName('Touch.webkitRotationAngle')
@@ -26196,17 +26196,43 @@ class Touch extends Interceptor {
final double rotationAngle;
+// As of Chrome 37, these all changed from long to double. This code
+// preserves backwards compatability for the time being.
+ int get __clientX => JS('num', '#.clientX', this).round();
+ int get __clientY => JS('num', '#.clientY', this).round();
+ int get __screenX => JS('num', '#.screenX', this).round();
+ int get __screenY => JS('num', '#.screenY', this).round();
+ int get __pageX => JS('num', '#.pageX', this).round();
+ int get __pageY => JS('num', '#.pageY', this).round();
+ int get __webkitRadiusX => JS('num', '#.webkitRadiusX', this).round();
+ int get __webkitRadiusY => JS('num', '#.webkitRadiusY', this).round();
+
@DomName('Touch.clientX')
@DomName('Touch.clientY')
- Point get client => new Point(_clientX, _clientY);
+ Point get client => new Point(__clientX, __clientY);
@DomName('Touch.pageX')
@DomName('Touch.pageY')
- Point get page => new Point(_pageX, _pageY);
+ Point get page => new Point(__pageX, __pageY);
@DomName('Touch.screenX')
@DomName('Touch.screenY')
- Point get screen => new Point(_screenX, _screenY);
+ Point get screen => new Point(__screenX, __screenY);
+
+ @DomName('Touch.webkitRadiusX')
+ @DocsEditable()
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.SAFARI)
+ @Experimental()
+ int get radiusX => __webkitRadiusX;
+
+ @DomName('Touch.webkitRadiusY')
+ @DocsEditable()
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.SAFARI)
+ @Experimental()
+ int get radiusY => __webkitRadiusY;
+
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698