⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179758 in webkit


Ignore:
Timestamp:
Feb 6, 2015, 1:54:45 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

REGRESSION: Lookup doesn't work in RTL
https://bugs.webkit.org/show_bug.cgi?id=141338
<rdar://problem/19738407>

Reviewed by Dan Bernstein.

  • editing/Editor.cpp:

(WebCore::Editor::scanSelectionForTelephoneNumbers):

  • editing/mac/DictionaryLookup.mm:

(WebCore::rangeExpandedAroundPositionByCharacters):
Positions are independent of writing direction, so we don't
need to (and shouldn't) do anything special for RTL here.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179750 r179758  
     12015-02-06  Timothy Horton  <timothy_horton@apple.com>
     2
     3        REGRESSION: Lookup doesn't work in RTL
     4        https://bugs.webkit.org/show_bug.cgi?id=141338
     5        <rdar://problem/19738407>
     6
     7        Reviewed by Dan Bernstein.
     8
     9        * editing/Editor.cpp:
     10        (WebCore::Editor::scanSelectionForTelephoneNumbers):
     11        * editing/mac/DictionaryLookup.mm:
     12        (WebCore::rangeExpandedAroundPositionByCharacters):
     13        Positions are independent of writing direction, so we don't
     14        need to (and shouldn't) do anything special for RTL here.
     15
    1162015-02-06  Maciej Stachowiak  <mjs@apple.com>
    217
  • trunk/Source/WebCore/editing/Editor.cpp

    r179569 r179758  
    32953295    Position end = visibleSelection.end();
    32963296    for (int i = 0; i < charactersToExtend; ++i) {
    3297         if (directionOfEnclosingBlock(start) == LTR)
    3298             start = start.previous(Character);
    3299         else
    3300             start = start.next(Character);
    3301 
    3302         if (directionOfEnclosingBlock(end) == LTR)
    3303             end = end.next(Character);
    3304         else
    3305             end = end.previous(Character);
     3297        start = start.previous(Character);
     3298        end = end.next(Character);
    33063299    }
    33073300
  • trunk/Source/WebCore/editing/mac/DictionaryLookup.mm

    r176296 r179758  
    8383    Position end = position.deepEquivalent();
    8484    for (int i = 0; i < numberOfCharactersToExpand; ++i) {
    85         if (directionOfEnclosingBlock(start) == LTR)
    86             start = start.previous(Character);
    87         else
    88             start = start.next(Character);
    89 
    90         if (directionOfEnclosingBlock(end) == LTR)
    91             end = end.next(Character);
    92         else
    93             end = end.previous(Character);
     85        start = start.previous(Character);
     86        end = end.next(Character);
    9487    }
    9588
Note: See TracChangeset for help on using the changeset viewer.