Skip to content
  • adele@apple.com's avatar
    WebCore: · 8e9caa38
    adele@apple.com authored
    2008-06-30  Adele Peterson  <adele@apple.com>
    
            Reviewed by Anders.
    
            Fix for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
    
            Test: editing/selection/select-all-textarea.html
    
            * dom/Node.cpp:
            (WebCore::Node::shadowAncestorNode): Break out code to find the root of the shadow tree into a new helper function.
            (WebCore::Node::shadowTreeRootNode): Added helper function.
            * dom/Node.h:
            * dom/Range.cpp: (WebCore::Range::shadowTreeRootNode): Added helper function.
            * dom/Range.h:
            * editing/Selection.cpp: (WebCore::Selection::shadowTreeRootNode): ditto.
            * editing/Selection.h:
            * editing/SelectionController.h: (WebCore::SelectionController::shadowTreeRootNode): ditto.
            * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll):
            If the selection is in a shadow tree, only select the contents of that shadow tree, not the whole document.
            * page/Frame.cpp:
            (WebCore::Frame::findString): Use the new shadowTreeRootNode helper functions.
            (WebCore::Frame::markAllMatchesForText): ditto.
    
    LayoutTests:
    
    2008-06-30  Adele Peterson  <adele@apple.com>
    
            Reviewed by Anders.
    
            Test for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas
    
            * editing/selection/select-all-textarea-expected.txt: Added.
            * editing/selection/select-all-textarea.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8e9caa38