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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 14859016: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a test and check didFirstLayout() instead of shouldScheduleLayout(). And don't force layouts wh… 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
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 7a90e841992d601f43985b89201f2a152bfe3283..8ba54c8ea9ef2da14b8a56e4ef912f1f4c8ee0ec 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -939,7 +939,7 @@ HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, HitTe
HitTestResult result(point, padding.height(), padding.width(), padding.height(), padding.width());
- if (!m_frame->contentRenderer())
+ if (!m_frame->contentRenderer() || !m_frame || !m_frame->view()->didFirstLayout())
jamesr 2013/05/14 03:03:44 no need to null-check m_frame just after dereferen
cbiesinger 2013/05/14 18:09:56 Whoops, that was supposed to check m_frame->view()
return result;
// hitTestResultAtPoint is specifically used to hitTest into all frames, thus it always allows child frame content.

Powered by Google App Engine
This is Rietveld 408576698