Skip to content
  • cfleizach@apple.com's avatar
    AX: Crash at WebCore::commonTreeScope · 0fb724ec
    cfleizach@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=125042
    
    Reviewed by Mario Sanchez Prada.
    
    Source/WebCore:
    
    When an AX text marker that references a node in a detached document is used to create a text marker range, a crash occurs
    because the method to determine commonTreeScopes does not account for when there are no common tree scopes.
    
    Test: platform/mac/accessibility/ordered-textmarker-crash.html
    
    * accessibility/AccessibilityObject.cpp:
    (WebCore::AccessibilityObject::visiblePositionRangeForUnorderedPositions):
    * dom/TreeScope.cpp:
    (WebCore::commonTreeScope):
    
    LayoutTests:
    
    * platform/mac/accessibility/ordered-textmarker-crash-expected.txt: Added.
    * platform/mac/accessibility/ordered-textmarker-crash.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0fb724ec