Changeset 172969 in webkit


Ignore:
Timestamp:
Aug 26, 2014 12:00:29 PM (10 years ago)
Author:
Simon Fraser
Message:

Ensure that layout is up-to-date before hit testing
https://bugs.webkit.org/show_bug.cgi?id=136242
rdar://problem/17435564

Reviewed by Tim Horton.

Various code paths can call into RenderView::hitTest() but fail to
ensure that layout is up-to-date. This is a conservative change that
fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
including WebPage::acceptsFirstMouse() and WebFrame::hitTest().

This change is not general enough that we can ASSERT(!needsLayout())
in RenderView::hitTest() yet.

  • page/EventHandler.cpp:

(WebCore::EventHandler::hitTestResultAtPoint):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r172965 r172969  
     12014-08-26  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Ensure that layout is up-to-date before hit testing
     4        https://bugs.webkit.org/show_bug.cgi?id=136242
     5        rdar://problem/17435564
     6
     7        Reviewed by Tim Horton.
     8       
     9        Various code paths can call into RenderView::hitTest() but fail to
     10        ensure that layout is up-to-date. This is a conservative change that
     11        fixes the issue for callers of EventHandler::hitTestResultAtPoint(),
     12        including WebPage::acceptsFirstMouse() and WebFrame::hitTest().
     13       
     14        This change is not general enough that we can ASSERT(!needsLayout())
     15        in RenderView::hitTest() yet.
     16       
     17        * page/EventHandler.cpp:
     18        (WebCore::EventHandler::hitTestResultAtPoint):
     19
    1202014-08-26  Beth Dakin  <bdakin@apple.com>
    221
  • trunk/Source/WebCore/page/EventHandler.cpp

    r172948 r172969  
    11361136        return result;
    11371137
     1138    m_frame.document()->updateLayout();
     1139   
    11381140    // hitTestResultAtPoint is specifically used to hitTest into all frames, thus it always allows child frame content.
    11391141    HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent);
Note: See TracChangeset for help on using the changeset viewer.