[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

simonjam at chromium.org simonjam at chromium.org
Mon Feb 21 00:04:38 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 0e8860f8e965b8e8ae7d16c93416b3fa4e43a9ff
Author: simonjam at chromium.org <simonjam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 27 23:03:04 2011 +0000

    2011-01-27  James Simonsen  <simonjam at chromium.org>
    
            Reviewed by Tony Chang.
    
            [Chromium] Simplify small caps logic in complex text on linux
            https://bugs.webkit.org/show_bug.cgi?id=53207
    
            Test: fast/text/atsui-multiple-renderers.html
                  fast/text/atsui-small-caps-punctuation-size.html
    
            * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
            (WebCore::ComplexTextController::nextScriptRun): Remove redundant logic. Case changes in a text run imply FontData changes.
            (WebCore::ComplexTextController::setupFontForScriptRun): Update comment to reflect above.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76845 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d1f0448..e292e63 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-27  James Simonsen  <simonjam at chromium.org>
+
+        Reviewed by Tony Chang.
+
+        [Chromium] Simplify small caps logic in complex text on linux
+        https://bugs.webkit.org/show_bug.cgi?id=53207
+
+        Test: fast/text/atsui-multiple-renderers.html
+              fast/text/atsui-small-caps-punctuation-size.html
+
+        * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
+        (WebCore::ComplexTextController::nextScriptRun): Remove redundant logic. Case changes in a text run imply FontData changes.
+        (WebCore::ComplexTextController::setupFontForScriptRun): Update comment to reflect above.
+
 2011-01-27  Adam Barth  <abarth at webkit.org>
 
         In which I attempt to fix the EFL build.
diff --git a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
index 6d15510..0566f0e 100644
--- a/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
+++ b/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
@@ -160,15 +160,11 @@ bool ComplexTextController::nextScriptRun()
     // So we allow that to run first, then do a second pass over the range it
     // found and take the largest subregion that stays within a single font.
     m_currentFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false).fontData;
-    bool isFirstCharacterLowerCase = u_islower(m_item.string[m_item.item.pos]);
     unsigned endOfRun;
     for (endOfRun = 1; endOfRun < m_item.item.length; ++endOfRun) {
-        UChar nextCharacter = m_item.string[m_item.item.pos + endOfRun];
-        const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(nextCharacter, false).fontData;
+        const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false).fontData;
         if (nextFontData != m_currentFontData)
             break;
-        if (m_font->isSmallCaps() && isFirstCharacterLowerCase != u_islower(nextCharacter))
-            break;
     }
     m_item.item.length = endOfRun;
     m_indexOfNextScriptRun = m_item.item.pos + endOfRun;
@@ -193,8 +189,9 @@ void ComplexTextController::setupFontForScriptRun()
 {
     FontDataVariant fontDataVariant = AutoVariant;
     // Determine if this script run needs to be converted to small caps.
-    // nextScriptRun() will always send us a run of the same case, so we only
-    // need to check the first character's case.
+    // nextScriptRun() will always send us a run of the same case, because a
+    // case change while in small-caps mode always results in different
+    // FontData, so we only need to check the first character's case.
     if (m_font->isSmallCaps() && u_islower(m_item.string[m_item.item.pos])) {
         m_smallCapsString = String(m_run.data(m_item.item.pos), m_item.item.length);
         m_smallCapsString.makeUpper();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list