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

zecke at webkit.org zecke at webkit.org
Thu Apr 8 02:09:31 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 8f71f50f3c51eb840e8d48f9594099e9b838ed56
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 4 12:29:22 2010 +0000

    [Qt] Avoid calling QFont::detach too often from FontQt
    
    https://bugs.webkit.org/show_bug.cgi?id=35569
    
    The letter- and wordspacing is inside the WebCore::Font class,
    our QFont is located in the WebCore::FontPlatformData. Everytime
    we need to use a QFont inside WebCore::Font we are calling the
    font method which gets the QFont from the WebCore::FontPlatformData
    and is applying the letter- and wordspacing. Internally this
    will attempt to detach the QFont...
    
    Avoid calling setLetterSpacing and setWordSpacing on QFont if
    the WebCore::Font has the default applied.
    
    * platform/graphics/qt/FontQt.cpp:
    (WebCore::Font::font):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 66a4f94..37f592f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-03-02  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Avoid calling QFont::detach too often from FontQt
+        https://bugs.webkit.org/show_bug.cgi?id=35569
+
+        The letter- and wordspacing is inside the WebCore::Font class,
+        our QFont is located in the WebCore::FontPlatformData. Everytime
+        we need to use a QFont inside WebCore::Font we are calling the
+        font method which gets the QFont from the WebCore::FontPlatformData
+        and is applying the letter- and wordspacing. Internally this
+        will attempt to detach the QFont...
+
+        Avoid calling setLetterSpacing and setWordSpacing on QFont if
+        the WebCore::Font has the default applied.
+
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::Font::font):
+
 2010-03-04  Alexander Pavlov  <apavlov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 3b1638c..65e8a6d 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -219,8 +219,10 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, const IntPoint&
 QFont Font::font() const
 {
     QFont f = primaryFont()->getQtFont();
-    f.setLetterSpacing(QFont::AbsoluteSpacing, m_letterSpacing);
-    f.setWordSpacing(m_wordSpacing);
+    if (m_letterSpacing != 0)
+        f.setLetterSpacing(QFont::AbsoluteSpacing, m_letterSpacing);
+    if (m_wordSpacing != 0)
+        f.setWordSpacing(m_wordSpacing);
     return f;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list