Skip to content
  • commit-queue@webkit.org's avatar
    [Chromium] Merge moveSelectionStart, moveSelectionEnd, and moveCaret into selectRange · 03a52339
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=96508
    
    Patch by Iain Merrick <husky@google.com> on 2012-09-18
    Reviewed by Ryosuke Niwa.
    
    These methods had "start" and "end" parameters, but this is incorrect.
    selectRange() actually takes base and extent (where the user actually
    touched), and selectionBounds() returns anchor and focus (base and extent
    expanded to account for the selection granularity).
    
    This patch fixes the parameter names, and updates selectRange, its test
    and its documentation to reflect the correct usage. It also removes
    moveSelectionStart/moveSelectionEnd/moveCaret (which aren't being used
    yet), and updates WebFrameTest to show how these can be implemented via
    selectRange.
    
    * public/WebFrame.h:
    (WebFrame):
    * public/WebWidget.h:
    (WebWidget):
    (WebKit::WebWidget::selectionBounds):
    * src/WebFrameImpl.cpp:
    (WebKit::WebFrameImpl::selectRange):
    * src/WebFrameImpl.h:
    (WebFrameImpl):
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::selectionBounds):
    * src/WebViewImpl.h:
    (WebViewImpl):
    * tests/WebFrameTest.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    03a52339