Title: [108788] trunk/Source/WebCore
Revision
108788
Author
[email protected]
Date
2012-02-24 06:39:38 -0800 (Fri, 24 Feb 2012)

Log Message

[Qt] Font related problem with newer Qt5
https://bugs.webkit.org/show_bug.cgi?id=79402

Patch by Simon Hausmann <[email protected]> on 2012-02-24
Reviewed by Kenneth Rohde Christiansen.

Apply the descent += 1 workaround needed to produce correct metrics only for Qt 4,
because the behaviour has been corrected in Qt 5.

* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::platformInit):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108787 => 108788)


--- trunk/Source/WebCore/ChangeLog	2012-02-24 14:37:36 UTC (rev 108787)
+++ trunk/Source/WebCore/ChangeLog	2012-02-24 14:39:38 UTC (rev 108788)
@@ -1,3 +1,16 @@
+2012-02-24  Simon Hausmann  <[email protected]>
+
+        [Qt] Font related problem with newer Qt5
+        https://bugs.webkit.org/show_bug.cgi?id=79402
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Apply the descent += 1 workaround needed to produce correct metrics only for Qt 4,
+        because the behaviour has been corrected in Qt 5.
+
+        * platform/graphics/qt/SimpleFontDataQt.cpp:
+        (WebCore::SimpleFontData::platformInit):
+
 2012-02-24  Kentaro Hara  <[email protected]>
 
         Move XML-related APIs from DOMWindow.idl to DOMWindowXML.idl

Modified: trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp (108787 => 108788)


--- trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp	2012-02-24 14:37:36 UTC (rev 108787)
+++ trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp	2012-02-24 14:39:38 UTC (rev 108788)
@@ -148,9 +148,11 @@
     float spaceWidth = fm.width(QLatin1Char(' '));
 #endif
 
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     // Qt subtracts 1 from the descent to account for the baseline,
     // we add it back here to get correct metrics for WebKit.
     descent += 1;
+#endif
 
     // The line spacing should always be >= (ascent + descent), but this
     // may be false in some cases due to misbehaving platform libraries.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to