Skip to content
  • commit-queue@webkit.org's avatar
    2011-04-15 Alice Boxhall <aboxhall@chromium.org> · 46791beb
    commit-queue@webkit.org authored
            Reviewed by Ryosuke Niwa.
    
            Text selection changes unexpectedly when dragging out of the <input>
            https://bugs.webkit.org/show_bug.cgi?id=55552
    
            Tests that dragging outside of a contenteditable, input or textarea selects to the end of the
            element, rather than jumping back to the beginning.
    
            * editing/selection/resources/select-out-of-floated-editable.js: Added.
            (log):
            (else.window.onmouseup):
            (getSelectionStart):
            (getSelectionEnd):
            (checkSelection):
            * editing/selection/select-out-of-editable-expected.txt: Added.
            * editing/selection/select-out-of-editable.html: Added.
            * editing/selection/select-out-of-floated-contenteditable-expected.txt: Added.
            * editing/selection/select-out-of-floated-contenteditable.html: Added.
            * editing/selection/select-out-of-floated-input-expected.txt: Added.
            * editing/selection/select-out-of-floated-input.html: Added.
            * editing/selection/select-out-of-floated-textarea-expected.txt: Added.
            * editing/selection/select-out-of-floated-textarea.html: Added.
    2011-04-15  Alice Boxhall  <aboxhall@chromium.org>
    
            Reviewed by Ryosuke Niwa.
    
            Text selection changes unexpectedly when dragging out of the <input>
            https://bugs.webkit.org/show_bug.cgi?id=55552
    
            Tests: editing/selection/select-out-of-editable.html
                   editing/selection/select-out-of-floated-contenteditable.html
                   editing/selection/select-out-of-floated-input.html
                   editing/selection/select-out-of-floated-textarea.html
    
            * page/EventHandler.cpp:
            (WebCore::selectionExtentRespectingEditingBoundary): When dragging from an editable element, check that
            the endpoint is not outside the element. If it is, translate the point into a local point within
            the editable element.
            (WebCore::EventHandler::updateSelectionForMouseDrag): Call targetPositionForSelectionEndpoint() to
            calculate the selection endpoint.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    46791beb