Changeset 73923 in webkit


Ignore:
Timestamp:
Dec 13, 2010 9:27:55 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-13 Benjamin Kalman <kalman@chromium.org>

Reviewed by Ojan Vafai.

Shift-End does not select to the end of the line
https://bugs.webkit.org/show_bug.cgi?id=50610

  • editing/selection/extend-to-line-boundary-expected.txt: Added.
  • editing/selection/extend-to-line-boundary.html: Added.

2010-12-13 Benjamin Kalman <kalman@chromium.org>

Reviewed by Ojan Vafai.

Shift-End does not select to the end of the line
https://bugs.webkit.org/show_bug.cgi?id=50610

Test: editing/selection/extend-to-line-boundary.html

  • editing/SelectionController.cpp: (WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than start/end. (WebCore::SelectionController::modifyExtendingForward):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73922 r73923  
     12010-12-13  Benjamin Kalman  <kalman@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Shift-End does not select to the end of the line
     6        https://bugs.webkit.org/show_bug.cgi?id=50610
     7
     8        * editing/selection/extend-to-line-boundary-expected.txt: Added.
     9        * editing/selection/extend-to-line-boundary.html: Added.
     10
    1112010-12-13  Pavel Feldman  <pfeldman@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r73921 r73923  
     12010-12-13  Benjamin Kalman  <kalman@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Shift-End does not select to the end of the line
     6        https://bugs.webkit.org/show_bug.cgi?id=50610
     7
     8        Test: editing/selection/extend-to-line-boundary.html
     9
     10        * editing/SelectionController.cpp:
     11        (WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than
     12        start/end.
     13        (WebCore::SelectionController::modifyExtendingForward):
     14
    1152010-12-13  Adam Roben  <aroben@apple.com>
    216
  • trunk/WebCore/editing/SelectionController.cpp

    r73416 r73923  
    303303VisiblePosition SelectionController::positionForPlatform(bool isGetStart) const
    304304{
    305     Position pos;
    306305    Settings* settings = m_frame ? m_frame->settings() : 0;
    307306    if (settings && settings->editingBehaviorType() == EditingMacBehavior)
    308         pos = isGetStart ? m_selection.start() : m_selection.end();
     307        return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd();
    309308    else {
    310309        // Linux and Windows always extend selections from the extent endpoint.
     
    313312        // to which depends on the value of isBaseFirst. Then this can be changed
    314313        // to just return m_sel.extent().
    315         pos = m_selection.isBaseFirst() ? m_selection.end() : m_selection.start();
    316     }
    317     return VisiblePosition(pos, m_selection.affinity());
     314        return m_selection.isBaseFirst() ? m_selection.visibleEnd() : m_selection.visibleStart();
     315    }
    318316}
    319317
     
    386384        break;
    387385    case LineBoundary:
    388         pos = endForPlatform();
    389         pos.setAffinity(UPSTREAM);
    390         pos = logicalEndOfLine(pos);
     386        pos = logicalEndOfLine(endForPlatform());
    391387        break;
    392388    case ParagraphBoundary:
Note: See TracChangeset for help on using the changeset viewer.