Changeset 147932 in webkit


Ignore:
Timestamp:
Apr 8, 2013 10:46:55 AM (11 years ago)
Author:
jocelyn.turcotte@digia.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147930 r147932  
     12013-04-08  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
     2
     3        [Qt] Avoid "QFont::setPixelSize: Pixel size <= 0 (0)"
     4        https://bugs.webkit.org/show_bug.cgi?id=114175
     5
     6        Reviewed by Allan Sandfeld Jensen.
     7
     8        QFont doesn't support a 0-size but WebCore does.
     9        Leave our QFont in its default state in this case to avoid the warning.
     10
     11        * platform/graphics/qt/FontPlatformDataQt.cpp:
     12        (WebCore::FontPlatformData::FontPlatformData):
     13
    1142013-04-08  Yi Shen  <max.hong.shen@gmail.com>
    215
  • trunk/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp

    r147623 r147932  
    6969    int requestedSize = description.computedPixelSize();
    7070    font.setFamily(familyName);
    71     font.setPixelSize(requestedSize);
     71    if (requestedSize)
     72        font.setPixelSize(requestedSize);
    7273    font.setItalic(description.italic());
    7374    font.setWeight(toQFontWeight(description.weight()));
Note: See TracChangeset for help on using the changeset viewer.