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

ossy at webkit.org ossy at webkit.org
Wed Dec 22 18:01:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e7e553a496b113eb40810fc321f8eb3b3770e18a
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 6 10:24:08 2010 +0000

    [Qt] Report zero width for zero size fonts
    
    Patch by Robert Hogan <robert at webkit.org> on 2010-12-06
    Reviewed by Kenneth Rohde Christiansen.
    
    Report zero width when font size is zero.
    
    Fixes fast/text/font-size-zero.html
    
    https://bugs.webkit.org/show_bug.cgi?id=50539
    
    * platform/graphics/qt/FontQt.cpp:
    (WebCore::Font::floatWidthForSimpleText):
    (WebCore::Font::floatWidthForComplexText):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73352 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5336675..4956c12 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-06  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Report zero width for zero size fonts
+
+        Report zero width when font size is zero.
+
+        Fixes fast/text/font-size-zero.html
+
+        https://bugs.webkit.org/show_bug.cgi?id=50539
+
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::Font::floatWidthForSimpleText):
+        (WebCore::Font::floatWidthForComplexText):
+
 2010-12-03  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 1ee2b29..c2810de 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -262,6 +262,9 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float
 
 float Font::floatWidthForSimpleText(const TextRun& run, GlyphBuffer* glyphBuffer, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
 {
+    if (!primaryFont()->platformData().size())
+        return 0;
+
 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
     if (!run.length())
         return 0;
@@ -278,12 +281,15 @@ float Font::floatWidthForSimpleText(const TextRun& run, GlyphBuffer* glyphBuffer
     return w + run.padding();
 #else
     Q_ASSERT(false);
-    return 0.0f;
+    return 0;
 #endif
 }
 
 float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const
 {
+    if (!primaryFont()->platformData().size())
+        return 0;
+
     if (!run.length())
         return 0;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list