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

Unified Diff: sky/sdk/lib/framework/app.dart

Issue 1160853003: Make app.dart not spew exceptions on mouse hover (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/app.dart
diff --git a/sky/sdk/lib/framework/app.dart b/sky/sdk/lib/framework/app.dart
index 6250fe40d2b9a65b866ae9f2238783a552da1331..7ba95e71b70a99936c8bd32f643220f4b9978992 100644
--- a/sky/sdk/lib/framework/app.dart
+++ b/sky/sdk/lib/framework/app.dart
@@ -14,7 +14,7 @@ class AppView {
_renderView = new RenderView(child: root);
_renderView.attach();
_renderView.layout(newWidth: sky.view.width, newHeight: sky.view.height);
-
+
sky.view.scheduleFrame();
}
@@ -51,6 +51,11 @@ class AppView {
break;
case 'pointermove':
result = _hitTestResultForPointer[event.pointer];
+ // In the case of mouse hover we won't already have a cached down.
+ if (result == null) {
+ result = new HitTestResult();
+ _renderView.hitTest(result, x: event.x, y: event.y);
+ }
break;
}
assert(result != null);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698