[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
zecke at webkit.org
zecke at webkit.org
Wed Mar 17 18:09:15 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 74f3379a00caf330381295f0685ff55a775da506
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 2 10:16:24 2010 +0000
[Qt] Special case Font::floatWidthForComplexText for single space
https://bugs.webkit.org/show_bug.cgi?id=33876
For a single space we can go through the QFontMetric::width routine
instead of converting the WebCore::String to a QString and then
going through the QTextLine.
* platform/graphics/qt/FontQt.cpp:
(WebCore::Font::floatWidthForComplexText):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5b02bf2..d74b4f4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-28 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Special case Font::floatWidthForComplexText for single space
+ https://bugs.webkit.org/show_bug.cgi?id=33876
+
+ For a single space we can go through the QFontMetric::width routine
+ instead of converting the WebCore::String to a QString and then
+ going through the QTextLine.
+
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::Font::floatWidthForComplexText):
+
2010-02-28 Holger Hans Peter Freyther <zecke at selfish.org>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 9ff7c1a..3b1638c 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- Copyright (C) 2008 Holger Hans Peter Freyther
+ Copyright (C) 2008, 2010 Holger Hans Peter Freyther
Copyright (C) 2009 Dirk Schulze <krit at webkit.org>
This library is free software; you can redistribute it and/or
@@ -174,6 +174,9 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
if (!run.length())
return 0;
+ if (run.length() == 1 && treatAsSpace(run[0]))
+ return QFontMetrics(font()).width(run[0]) - m_wordSpacing + run.padding();
+
String sanitized = Font::normalizeSpaces(String(run.characters(), run.length()));
QString string = fromRawDataWithoutRef(sanitized);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list