[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:58:51 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 248000cc3612be39c8ebcff3e57ebe4485d59cbb
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 25 06:56:38 2010 +0000

    2010-02-24  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Optimized Font::normalizeSpaces() by caching the String::characters()
            instead of repeatedly calling operator[]
    
            https://bugs.webkit.org/show_bug.cgi?id=35336
    
            * platform/graphics/Font.cpp:
            (WebCore::Font::normalizeSpaces):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55224 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f4e2747..c168ce3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-24  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Optimized Font::normalizeSpaces() by caching the String::characters()
+        instead of repeatedly calling operator[]
+
+        https://bugs.webkit.org/show_bug.cgi?id=35336
+
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::normalizeSpaces):
+
 2010-02-24  Jungshik Shin  <jshin at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 7d0e5a9..3d3ffe3 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -267,12 +267,13 @@ FontSelector* Font::fontSelector() const
 
 String Font::normalizeSpaces(const String& string)
 {
+    const UChar* characters = string.characters();
     unsigned length = string.length();
     Vector<UChar, 256> buffer(length);
     bool didReplacement = false;
 
     for (unsigned i = 0; i < length; ++i) {
-        UChar originalCharacter = string[i];
+        UChar originalCharacter = characters[i];
         buffer[i] = normalizeSpaces(originalCharacter);
         if (buffer[i] != originalCharacter)
             didReplacement = true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list