Skip to content
  • commit-queue@webkit.org's avatar
    Crash on OS X when shift clicking outside of input · 284c20fd
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=104058
    
    Patch by Yi Shen <max.hong.shen@gmail.com> on 2013-04-22
    Reviewed by Chang Shu.
    
    Source/WebCore:
    
    Shift clicking outside of a focused div while removing the focused div from
    the dom tree at the same time may hit a null visible position, which should
    not be used to calculate the text distance with the new selection's start and
    end position. Otherwise, the browser may crash.
    
    Test: editing/selection/crash-on-shift-click.html
    
    * page/EventHandler.cpp:
    (WebCore::EventHandler::handleMousePressEventSingleClick):
    
    LayoutTests:
    
    Add test for shift click crash issue.
    
    * editing/selection/crash-on-shift-click-expected.txt: Added.
    * editing/selection/crash-on-shift-click.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    284c20fd