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

Unified Diff: Source/core/testing/Internals.cpp

Issue 15425005: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: touch adjustment in window.internals also needs layout 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 | « Source/core/page/EventHandler.cpp ('k') | Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 06278c1366ac3fb808f5ae2d3ebb4685e55d9bad..e87247ee31b9f77cd1f71cf26e90b68b558f03d0 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1074,6 +1074,8 @@ PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestClickableNode(long x,
return 0;
}
+ document->updateLayout();
+
IntSize radius(width / 2, height / 2);
IntPoint point(x + radius.width(), y + radius.height());
@@ -1094,6 +1096,8 @@ Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width
return 0;
}
+ document->updateLayout();
+
IntSize radius(width / 2, height / 2);
IntPoint point(x + radius.width(), y + radius.height());
@@ -1110,6 +1114,8 @@ PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestContextMenuNode(long
return 0;
}
+ document->updateLayout();
+
IntSize radius(width / 2, height / 2);
IntPoint point(x + radius.width(), y + radius.height());
@@ -1130,6 +1136,8 @@ Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long wid
return 0;
}
+ document->updateLayout();
+
IntSize radius(width / 2, height / 2);
IntPoint point(x + radius.width(), y + radius.height());
@@ -1146,6 +1154,8 @@ PassRefPtr<ClientRect> Internals::bestZoomableAreaForTouchPoint(long x, long y,
return 0;
}
+ document->updateLayout();
+
IntSize radius(width / 2, height / 2);
IntPoint point(x + radius.width(), y + radius.height());
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698