[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mitz at apple.com mitz at apple.com
Wed Dec 22 15:42:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a4fb58f65ad92882fc8123efb559ac69dfe6bf50
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 10 20:53:27 2010 +0000

    REGRESSION (r71566): r71566 breaks bidi-control-chars-treated-as-ZWS.html
    https://bugs.webkit.org/show_bug.cgi?id=49295
    
    WebCore:
    
    Reviewed by Dave Hyatt.
    
    * platform/graphics/mac/ComplexTextController.h: Added m_indexOffset.
    * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
    (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Use m_indexOffset
    instead of computing the offset based on m_directionalOverride.
    (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set m_indexOffset to
    the offset between indices in m_characters and indices in the text passed to ATSUI.
    
    LayoutTests:
    
    * platform/mac-leopard/Skipped: Re-enable the previously failing test.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 240268d..a425511 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-10  Dan Bernstein  <mitz at apple.com>
+
+        REGRESSION (r71566): r71566 breaks bidi-control-chars-treated-as-ZWS.html
+        https://bugs.webkit.org/show_bug.cgi?id=49295
+
+        * platform/mac-leopard/Skipped: Re-enable the previously failing test.
+
 2010-11-10  Stephen White  <senorblanco at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/LayoutTests/platform/mac-leopard/Skipped b/LayoutTests/platform/mac-leopard/Skipped
index 59c01a4..d29e50b 100644
--- a/LayoutTests/platform/mac-leopard/Skipped
+++ b/LayoutTests/platform/mac-leopard/Skipped
@@ -172,6 +172,3 @@ canvas/philip/tests/security.drawImage.image.html
 canvas/philip/tests/security.pattern.canvas.fillStyle.html
 canvas/philip/tests/security.pattern.canvas.strokeStyle.html
 canvas/philip/tests/security.reset.html
-
-# Disable the following test temporarily due to bug 49295 -- Regression in ATSUI handling.
-fast/text/international/bidi-control-chars-treated-as-ZWS.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6c8f5cf..2ee6e93 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-10  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Dave Hyatt.
+
+        REGRESSION (r71566): r71566 breaks bidi-control-chars-treated-as-ZWS.html
+        https://bugs.webkit.org/show_bug.cgi?id=49295
+
+        * platform/graphics/mac/ComplexTextController.h: Added m_indexOffset.
+        * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
+        (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Use m_indexOffset
+        instead of computing the offset based on m_directionalOverride.
+        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set m_indexOffset to
+        the offset between indices in m_characters and indices in the text passed to ATSUI.
+
 2010-11-10  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebCore/platform/graphics/mac/ComplexTextController.h b/WebCore/platform/graphics/mac/ComplexTextController.h
index 85407c7..42e1d81 100644
--- a/WebCore/platform/graphics/mac/ComplexTextController.h
+++ b/WebCore/platform/graphics/mac/ComplexTextController.h
@@ -140,6 +140,7 @@ private:
         const CGSize* m_advances;
 #if USE(ATSUI)
         bool m_directionalOverride;
+        CFIndex m_indexOffset;
 #endif
         bool m_isMonotonic;
     };
diff --git a/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp b/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
index 2c4a7c4..9883baa 100644
--- a/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
@@ -55,12 +55,11 @@ OSStatus ComplexTextController::ComplexTextRun::overrideLayoutOperation(ATSULayo
 
     count--;
     ItemCount j = 0;
-    CFIndex indexOffset = 0;
+    CFIndex indexOffset = complexTextRun->m_indexOffset;
 
     if (complexTextRun->m_directionalOverride) {
         j++;
         count -= 2;
-        indexOffset = -1;
     }
 
     complexTextRun->m_glyphCount = count;
@@ -146,6 +145,7 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(ATSUTextLayout atsuTextLay
     , m_stringLocation(stringLocation)
     , m_stringLength(stringLength)
     , m_directionalOverride(directionalOverride)
+    , m_indexOffset(0)
     , m_isMonotonic(true)
 {
     OSStatus status;
@@ -203,7 +203,7 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(ATSUTextLayout atsuTextLay
             || leadingCharacter == leftToRightOverride 
             || leadingCharacter == rightToLeftEmbed
             || leadingCharacter == rightToLeftOverride
-            || leadingCharacter == popDirectionalFormatting)
+            || leadingCharacter == popDirectionalFormatting) {
             if (substituteCharacters.isEmpty()) {
                 substituteCharacters.grow(stringLength - 1);
                 memcpy(substituteCharacters.data(), characters + 1, (stringLength - 1) * sizeof(UChar));
@@ -212,6 +212,8 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(ATSUTextLayout atsuTextLay
                 substituteCharacters.remove(0);
                 ATSUTextDeleted(atsuTextLayout, 0, 1);
             }
+            m_indexOffset++;
+        }
     }
 
     if (directionalOverride) {
@@ -227,6 +229,7 @@ ComplexTextController::ComplexTextRun::ComplexTextRun(ATSUTextLayout atsuTextLay
             substituteCharacters.append(popDirectionalFormatting);
         }
         ATSUTextInserted(atsuTextLayout, 0, 2);
+        m_indexOffset--;
     }
 
     ATSULayoutOperationOverrideSpecifier overrideSpecifier;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list