Changeset 58507 in webkit
- Timestamp:
- Apr 29, 2010 6:36:00 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r58506 r58507 1 2010-04-29 Simon Hausmann <simon.hausmann@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Speed up text layouting 6 https://bugs.webkit.org/show_bug.cgi?id=31719 7 8 Use QFontMetrics::width() for the text width calculation instead 9 of QTextLayout. This avoids expensive bearing calculations and the 10 line breaking code. 11 12 * platform/graphics/qt/FontQt.cpp: 13 (WebCore::Font::floatWidthForComplexText): 14 1 15 2010-04-29 Kwang Yul Seo <skyul@company100.net> 2 16 -
trunk/WebCore/platform/graphics/qt/FontQt.cpp
r57717 r58507 181 181 QString string = fromRawDataWithoutRef(sanitized); 182 182 183 QTextLayout layout(string, font()); 184 QTextLine line = setupLayout(&layout, run); 185 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) 186 int w = int(line.horizontalAdvance()); 187 #else 188 int w = int(line.naturalTextWidth()); 189 #endif 183 int w = QFontMetrics(font()).width(string); 190 184 // WebKit expects us to ignore word spacing on the first character (as opposed to what Qt does) 191 185 if (treatAsSpace(run[0]))
Note: See TracChangeset
for help on using the changeset viewer.