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

Unified Diff: sky/framework/components/ink_splash.dart

Issue 1117143003: [Effen] Port fn.dart from the legacy sky.Node backend to the RenderNode backend, which is currently… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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: sky/framework/components/ink_splash.dart
diff --git a/sky/framework/components/ink_splash.dart b/sky/framework/components/ink_splash.dart
index 0d147ad59ea55c0ae082f568b4c0ee4092e05360..2e9a1e5aea7eb1d51ba1ce601a473fc7a18d1c8a 100644
--- a/sky/framework/components/ink_splash.dart
+++ b/sky/framework/components/ink_splash.dart
@@ -8,16 +8,16 @@ import '../fn.dart';
import '../theme/view-configuration.dart' as config;
import 'dart:async';
import 'dart:math' as math;
-import 'dart:sky' as sky;
+import '../layout.dart';
const double _kSplashConfirmedDuration = 350.0;
const double _kSplashUnconfirmedDuration = config.kDefaultLongPressTimeout;
const double _kSplashAbortDuration = 100.0;
const double _kSplashInitialDelay = 0.0; // we could delay initially in case the user scrolls
-double _getSplashTargetSize(sky.ClientRect rect, double x, double y) {
- return 2.0 * math.max(math.max(x - rect.left, rect.right - x),
- math.max(y - rect.top, rect.bottom - y));
+double _getSplashTargetSize(Rect rect, double x, double y) {
+ return 2.0 * math.max(math.max(x - rect.x, rect.x + rect.width - x),
+ math.max(y - rect.y, rect.y + rect.height - y));
}
class SplashController {
@@ -56,10 +56,10 @@ class SplashController {
_size.stop();
}
- SplashController(sky.ClientRect rect, double x, double y,
+ SplashController(Rect rect, double x, double y,
{ this.pointer, Function onDone })
- : _offsetX = x - rect.left,
- _offsetY = y - rect.top,
+ : _offsetX = x - rect.x,
+ _offsetY = y - rect.y,
_targetSize = _getSplashTargetSize(rect, x, y) {
_styleStream = _size.onValueChanged.map((p) {

Powered by Google App Engine
This is Rietveld 408576698