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

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 16:28:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 517b73f5c750f2b82909df3f339a111f8c660a1a
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 24 12:04:41 2010 +0000

    2010-11-24  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Simon Hausmann.
    
            [Qt] Pass Qt::TextBypassShaping flag when calculating shadow layer rects
    
            Without this, we could end up with a slightly too small shadow layer
            for some string/font combinations.
    
            * platform/graphics/qt/FontQt.cpp:
            (WebCore::drawTextCommon):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f6cf03a..6a88ce1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-24  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Pass Qt::TextBypassShaping flag when calculating shadow layer rects
+
+        Without this, we could end up with a slightly too small shadow layer
+        for some string/font combinations.
+
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::drawTextCommon):
+
 2010-11-22  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 356edfa..564ab2b 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -198,7 +198,11 @@ static void drawTextCommon(GraphicsContext* ctx, const TextRun& run, const Float
                 p->restore();
             } else {
                 QFontMetrics fm(font);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+                QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1, flags), fm.height());
+#else
                 QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string), fm.height());
+#endif
                 QPainter* shadowPainter = ctxShadow->beginShadowLayer(p, boundingRect);
                 if (shadowPainter) {
                     // Since it will be blurred anyway, we don't care about render hints.
@@ -215,7 +219,11 @@ static void drawTextCommon(GraphicsContext* ctx, const TextRun& run, const Float
                 p->translate(-ctxShadow->offset());
             } else {
                 QFontMetrics fm(font);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+                QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1, flags), fm.height());
+#else
                 QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string), fm.height());
+#endif
                 QPainter* shadowPainter = ctxShadow->beginShadowLayer(p, boundingRect);
                 if (shadowPainter) {
                     // Since it will be blurred anyway, we don't care about render hints.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list