summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-04-29 14:41:36 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-04-29 14:41:36 (GMT)
commiteeaea3e7e3697c78567ad6ad51b6e30ccc712ee8 (patch)
treefcb9fb53aa6ac04d91cd033b7cc89571da8f71e5 /src/3rdparty/webkit/WebCore
parent60fb7f10ec84824d94960a2b4e0906ccf1f2df59 (diff)
downloadQt-eeaea3e7e3697c78567ad6ad51b6e30ccc712ee8.zip
Qt-eeaea3e7e3697c78567ad6ad51b6e30ccc712ee8.tar.gz
Qt-eeaea3e7e3697c78567ad6ad51b6e30ccc712ee8.tar.bz2
Updated WebKit to 1a40220a82197023c1b1ac6eff027be6dd3168d3
Changes integrated: || <https://webkit.org/b/38179> || [Qt] QWebPage::setViewportSize() forces two layout of the render tree || || <https://webkit.org/b/31719> || [Qt] Loading of large page can take up to 10 seconds ||
Diffstat (limited to 'src/3rdparty/webkit/WebCore')
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp8
2 files changed, 15 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 35e48a7..7c340fd 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,5 +1,19 @@
2010-04-29 Simon Hausmann <simon.hausmann@nokia.com>
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Speed up text layouting
+ https://bugs.webkit.org/show_bug.cgi?id=31719
+
+ Use QFontMetrics::width() for the text width calculation instead
+ of QTextLayout. This avoids expensive bearing calculations and the
+ line breaking code.
+
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::Font::floatWidthForComplexText):
+
+2010-04-29 Simon Hausmann <simon.hausmann@nokia.com>
+
Reviewed by Tor Arne Vestbø.
[Qt] REGRESSION(r57638): tst_qwebframe::objectDeleted() fails
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
index 8c6d600..1e92dcc 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
@@ -180,13 +180,7 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
QString string = fromRawDataWithoutRef(sanitized);
- QTextLayout layout(string, font());
- QTextLine line = setupLayout(&layout, run);
-#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
- int w = int(line.horizontalAdvance());
-#else
- int w = int(line.naturalTextWidth());
-#endif
+ int w = QFontMetrics(font()).width(string);
// WebKit expects us to ignore word spacing on the first character (as opposed to what Qt does)
if (treatAsSpace(run[0]))
w -= m_wordSpacing;