Title: [179758] trunk/Source/WebCore
Revision
179758
Author
[email protected]
Date
2015-02-06 13:54:45 -0800 (Fri, 06 Feb 2015)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179757 => 179758)


--- trunk/Source/WebCore/ChangeLog	2015-02-06 21:48:41 UTC (rev 179757)
+++ trunk/Source/WebCore/ChangeLog	2015-02-06 21:54:45 UTC (rev 179758)
@@ -1,3 +1,18 @@
+2015-02-06  Timothy Horton  <[email protected]>
+
+        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.
+
 2015-02-06  Maciej Stachowiak  <[email protected]>
 
         REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).

Modified: trunk/Source/WebCore/editing/Editor.cpp (179757 => 179758)


--- trunk/Source/WebCore/editing/Editor.cpp	2015-02-06 21:48:41 UTC (rev 179757)
+++ trunk/Source/WebCore/editing/Editor.cpp	2015-02-06 21:54:45 UTC (rev 179758)
@@ -3294,15 +3294,8 @@
     Position start = visibleSelection.start();
     Position end = visibleSelection.end();
     for (int i = 0; i < charactersToExtend; ++i) {
-        if (directionOfEnclosingBlock(start) == LTR)
-            start = start.previous(Character);
-        else
-            start = start.next(Character);
-
-        if (directionOfEnclosingBlock(end) == LTR)
-            end = end.next(Character);
-        else
-            end = end.previous(Character);
+        start = start.previous(Character);
+        end = end.next(Character);
     }
 
     FrameSelection extendedSelection;

Modified: trunk/Source/WebCore/editing/mac/DictionaryLookup.mm (179757 => 179758)


--- trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2015-02-06 21:48:41 UTC (rev 179757)
+++ trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2015-02-06 21:54:45 UTC (rev 179758)
@@ -82,15 +82,8 @@
     Position start = position.deepEquivalent();
     Position end = position.deepEquivalent();
     for (int i = 0; i < numberOfCharactersToExpand; ++i) {
-        if (directionOfEnclosingBlock(start) == LTR)
-            start = start.previous(Character);
-        else
-            start = start.next(Character);
-
-        if (directionOfEnclosingBlock(end) == LTR)
-            end = end.next(Character);
-        else
-            end = end.previous(Character);
+        start = start.previous(Character);
+        end = end.next(Character);
     }
 
     return makeRange(start, end);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to