Changeset 61445 in webkit


Ignore:
Timestamp:
Jun 18, 2010 3:11:14 PM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] Text spacing miscalculation when using wordSpacing.
https://bugs.webkit.org/show_bug.cgi?id=40483

Patch by Ananth Jasty <ext-ananth.jasty@nokia.com> on 2010-06-18
Reviewed by Simon Hausmann.

Removed wordSpacing compensation in FontQt whitespace width
calculation. The QFontMetrics::width() overload that takes
a character does not take QFont's word spacing into account.

  • platform/graphics/qt/FontQt.cpp:

(WebCore::Font::floatWidthForComplexText):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61444 r61445  
     12010-06-18  Ananth Jasty  <ext-ananth.jasty@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Text spacing miscalculation when using wordSpacing.
     6        https://bugs.webkit.org/show_bug.cgi?id=40483
     7
     8        Removed wordSpacing compensation in FontQt whitespace width
     9        calculation. The QFontMetrics::width() overload that takes
     10        a character does not take QFont's word spacing into account.
     11
     12        * platform/graphics/qt/FontQt.cpp:
     13        (WebCore::Font::floatWidthForComplexText):
     14
    1152010-06-18  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/WebCore/platform/graphics/qt/FontQt.cpp

    r61253 r61445  
    235235
    236236    if (run.length() == 1 && treatAsSpace(run[0]))
    237         return QFontMetrics(font()).width(run[0]) - m_wordSpacing + run.padding();
     237        return QFontMetrics(font()).width(run[0]) + run.padding();
    238238
    239239    String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
Note: See TracChangeset for help on using the changeset viewer.