Changeset 197024 in webkit


Ignore:
Timestamp:
Feb 24, 2016 2:41:11 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
https://bugs.webkit.org/show_bug.cgi?id=153747

Reviewed by Michael Catanzaro.

Source/WebCore:

Do not return early when reaching a boundary if there's a range
selection. In that case, the selection will be cleared and
accessibility will be notified.

Test: editing/selection/move-to-line-boundary-clear-selection.html

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::modify):

LayoutTests:

Add test to check that moving to line boundary clears the
selection even if the cursor is already at the boundary.

  • editing/selection/move-to-line-boundary-clear-selection-expected.txt: Added.
  • editing/selection/move-to-line-boundary-clear-selection.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r197022 r197024  
     12016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
     4        https://bugs.webkit.org/show_bug.cgi?id=153747
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Add test to check that moving to line boundary clears the
     9        selection even if the cursor is already at the boundary.
     10
     11        * editing/selection/move-to-line-boundary-clear-selection-expected.txt: Added.
     12        * editing/selection/move-to-line-boundary-clear-selection.html: Added.
     13
    1142016-02-23  Sergio Villar Senin  <svillar@igalia.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r197023 r197024  
     12016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
     4        https://bugs.webkit.org/show_bug.cgi?id=153747
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Do not return early when reaching a boundary if there's a range
     9        selection. In that case, the selection will be cleared and
     10        accessibility will be notified.
     11
     12        Test: editing/selection/move-to-line-boundary-clear-selection.html
     13
     14        * editing/FrameSelection.cpp:
     15        (WebCore::FrameSelection::modify):
     16
    1172016-02-24  Alejandro G. Castro  <alex@igalia.com>
    218
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r195949 r197024  
    12531253    willBeModified(alter, direction);
    12541254
    1255     bool shouldNotify = false;
     1255    bool reachedBoundary = false;
    12561256    bool wasRange = m_selection.isRange();
    12571257    Position originalStartPosition = m_selection.start();
     
    12601260    case DirectionRight:
    12611261        if (alter == AlterationMove)
    1262             position = modifyMovingRight(granularity, &shouldNotify);
     1262            position = modifyMovingRight(granularity, &reachedBoundary);
    12631263        else
    12641264            position = modifyExtendingRight(granularity);
     
    12681268            position = modifyExtendingForward(granularity);
    12691269        else
    1270             position = modifyMovingForward(granularity, &shouldNotify);
     1270            position = modifyMovingForward(granularity, &reachedBoundary);
    12711271        break;
    12721272    case DirectionLeft:
    12731273        if (alter == AlterationMove)
    1274             position = modifyMovingLeft(granularity, &shouldNotify);
     1274            position = modifyMovingLeft(granularity, &reachedBoundary);
    12751275        else
    12761276            position = modifyExtendingLeft(granularity);
     
    12801280            position = modifyExtendingBackward(granularity);
    12811281        else
    1282             position = modifyMovingBackward(granularity, &shouldNotify);
    1283         break;
    1284     }
    1285    
    1286     if (shouldNotify && userTriggered == UserTriggered && m_frame && AXObjectCache::accessibilityEnabled()) {
     1282            position = modifyMovingBackward(granularity, &reachedBoundary);
     1283        break;
     1284    }
     1285
     1286    if (reachedBoundary && !isRange() && userTriggered == UserTriggered && m_frame && AXObjectCache::accessibilityEnabled()) {
    12871287        notifyAccessibilityForSelectionChange({ AXTextStateChangeTypeSelectionBoundary, textSelectionWithDirectionAndGranularity(direction, granularity) });
    12881288        return true;
Note: See TracChangeset for help on using the changeset viewer.