[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
kov at webkit.org
kov at webkit.org
Thu Oct 29 20:40:49 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit f61c3f8da5914346876a3b7a319df9eceaa37c26
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 7 07:10:03 2009 +0000
2009-10-07 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
Fix rounding error issues in height calculation in 64 bits.
Already covered by existing tests.
* platform/graphics/gtk/SimpleFontDataGtk.cpp:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/gtk/SimpleFontDataPango.cpp:
(WebCore::SimpleFontData::platformInit):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6b3565e..de673e7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-07 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Fix rounding error issues in height calculation in 64 bits.
+
+ Already covered by existing tests.
+
+ * platform/graphics/gtk/SimpleFontDataGtk.cpp:
+ (WebCore::SimpleFontData::platformInit):
+ * platform/graphics/gtk/SimpleFontDataPango.cpp:
+ (WebCore::SimpleFontData::platformInit):
+
2009-10-07 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp b/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp
index dc0455a..1b722aa 100644
--- a/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp
+++ b/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp
@@ -50,9 +50,9 @@ void SimpleFontData::platformInit()
cairo_font_extents_t font_extents;
cairo_text_extents_t text_extents;
cairo_scaled_font_extents(m_platformData.m_scaledFont, &font_extents);
- m_ascent = static_cast<int>(font_extents.ascent);
- m_descent = static_cast<int>(font_extents.descent);
- m_lineSpacing = static_cast<int>(font_extents.height);
+ m_ascent = static_cast<int>(lroundf(font_extents.ascent));
+ m_descent = static_cast<int>(lroundf(font_extents.descent));
+ m_lineSpacing = static_cast<int>(lroundf(font_extents.height));
// There seems to be some rounding error in cairo (or in how we
// use cairo) with some fonts, like DejaVu Sans Mono, which makes
// cairo report a height smaller than ascent + descent, which is
diff --git a/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp b/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp
index ef0bb3d..88d1ecf 100644
--- a/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp
+++ b/WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp
@@ -49,9 +49,9 @@ void SimpleFontData::platformInit()
cairo_font_extents_t font_extents;
cairo_text_extents_t text_extents;
cairo_scaled_font_extents(m_platformData.m_scaledFont, &font_extents);
- m_ascent = static_cast<int>(font_extents.ascent);
- m_descent = static_cast<int>(font_extents.descent);
- m_lineSpacing = static_cast<int>(font_extents.height);
+ m_ascent = static_cast<int>(lroundf(font_extents.ascent));
+ m_descent = static_cast<int>(lroundf(font_extents.descent));
+ m_lineSpacing = static_cast<int>(lroundf(font_extents.height));
// There seems to be some rounding error in cairo (or in how we
// use cairo) with some fonts, like DejaVu Sans Mono, which makes
// cairo report a height smaller than ascent + descent, which is
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list