Title: [147932] trunk/Source/WebCore
Revision
147932
Author
[email protected]
Date
2013-04-08 10:46:55 -0700 (Mon, 08 Apr 2013)

Log Message

[Qt] Avoid "QFont::setPixelSize: Pixel size <= 0 (0)"
https://bugs.webkit.org/show_bug.cgi?id=114175

Reviewed by Allan Sandfeld Jensen.

QFont doesn't support a 0-size but WebCore does.
Leave our QFont in its default state in this case to avoid the warning.

* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (147931 => 147932)


--- trunk/Source/WebCore/ChangeLog	2013-04-08 17:42:43 UTC (rev 147931)
+++ trunk/Source/WebCore/ChangeLog	2013-04-08 17:46:55 UTC (rev 147932)
@@ -1,3 +1,16 @@
+2013-04-08  Jocelyn Turcotte  <[email protected]>
+
+        [Qt] Avoid "QFont::setPixelSize: Pixel size <= 0 (0)"
+        https://bugs.webkit.org/show_bug.cgi?id=114175
+
+        Reviewed by Allan Sandfeld Jensen.
+
+        QFont doesn't support a 0-size but WebCore does.
+        Leave our QFont in its default state in this case to avoid the warning.
+
+        * platform/graphics/qt/FontPlatformDataQt.cpp:
+        (WebCore::FontPlatformData::FontPlatformData):
+
 2013-04-08  Yi Shen  <[email protected]>
 
         Counter still gets incremented when counter-increment is set to none

Modified: trunk/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp (147931 => 147932)


--- trunk/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp	2013-04-08 17:42:43 UTC (rev 147931)
+++ trunk/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp	2013-04-08 17:46:55 UTC (rev 147932)
@@ -68,7 +68,8 @@
     QFont font;
     int requestedSize = description.computedPixelSize();
     font.setFamily(familyName);
-    font.setPixelSize(requestedSize);
+    if (requestedSize)
+        font.setPixelSize(requestedSize);
     font.setItalic(description.italic());
     font.setWeight(toQFontWeight(description.weight()));
     font.setWordSpacing(wordSpacing);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to