Fix a regression from r88478.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 21:48:35 +0000 (21:48 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 21:48:35 +0000 (21:48 +0000)
Reviewed by Darin Adler.

* platform/graphics/mac/ComplexTextControllerCoreText.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Add the runs
in reverse order in the RTL case here, since the whole vector is reversed by collectComplexTextRuns()
afterwards.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp

index b20888e..dd1d7cc 100644 (file)
@@ -1,3 +1,14 @@
+2011-06-09  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Fix a regression from r88478.
+
+        * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Add the runs
+        in reverse order in the RTL case here, since the whole vector is reversed by collectComplexTextRuns()
+        afterwards.
+
 2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>
 
         Reviewed by Antti Koivisto.
index 6e71a85..55ba281 100644 (file)
@@ -172,7 +172,7 @@ void ComplexTextController::collectComplexTextRunsForCharactersCoreText(const UC
     CFIndex runCount = CFArrayGetCount(runArray);
 
     for (CFIndex r = 0; r < runCount; r++) {
-        CTRunRef ctRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runArray, r));
+        CTRunRef ctRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runArray, m_run.ltr() ? r : runCount - 1 - r));
         ASSERT(CFGetTypeID(ctRun) == CTRunGetTypeID());
         CFRange runRange = CTRunGetStringRange(ctRun);
         m_complexTextRuns.append(ComplexTextRun::create(ctRun, fontData, cp, stringLocation, length, runRange));