Title: [201384] trunk/Source/WebCore
Revision
201384
Author
[email protected]
Date
2016-05-25 09:01:12 -0700 (Wed, 25 May 2016)

Log Message

Addressing post-review comments on r200971.

Reviewed by Darin Adler.

* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201383 => 201384)


--- trunk/Source/WebCore/ChangeLog	2016-05-25 15:23:36 UTC (rev 201383)
+++ trunk/Source/WebCore/ChangeLog	2016-05-25 16:01:12 UTC (rev 201384)
@@ -1,3 +1,12 @@
+2016-05-25  Zalan Bujtas  <[email protected]>
+
+        Addressing post-review comments on r200971.
+
+        Reviewed by Darin Adler.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::hitTestResultAtPoint):
+
 2016-05-25  Manuel Rego Casasnovas  <[email protected]>
 
         [css-grid] Simplify grid track sizes parsing

Modified: trunk/Source/WebCore/page/EventHandler.cpp (201383 => 201384)


--- trunk/Source/WebCore/page/EventHandler.cpp	2016-05-25 15:23:36 UTC (rev 201383)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2016-05-25 16:01:12 UTC (rev 201384)
@@ -1135,14 +1135,14 @@
 
     unsigned nonNegativePaddingWidth = std::max<LayoutUnit>(0, padding.width()).toUnsigned();
     unsigned nonNegativePaddingHeight = std::max<LayoutUnit>(0, padding.height()).toUnsigned();
+    // We should always start hit testing a clean tree.
+    if (m_frame.document())
+        m_frame.document()->updateLayoutIgnorePendingStylesheets();
     HitTestResult result(point, nonNegativePaddingHeight, nonNegativePaddingWidth, nonNegativePaddingHeight, nonNegativePaddingWidth);
-
     RenderView* renderView = m_frame.contentRenderer();
     if (!renderView)
         return result;
-    
-    // We should always start hittesting a clean tree.
-    renderView->document().updateLayoutIgnorePendingStylesheets();
+
     // hitTestResultAtPoint is specifically used to hitTest into all frames, thus it always allows child frame content.
     HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent);
     renderView->hitTest(request, result);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to