[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jamesr at google.com
jamesr at google.com
Wed Dec 22 16:07:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 73bb607c0c3d672d9b831790d3f101845e80015d
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 18 20:10:27 2010 +0000
2010-11-18 James Robinson <jamesr at chromium.org>
Reviewed by Darin Fisher.
[chromium] REGRESSION(72141): Chromium fails acid3 on windows and linux
https://bugs.webkit.org/show_bug.cgi?id=49638
Adds a test checking that the bounding client rect of a text run with font-size:0
has zero height. This is also covered by acid3, but an isolated test case is easier
to work with.
* fast/text/font-size-zero-expected.txt: Added.
* fast/text/font-size-zero.html: Added.
* fast/text/script-tests/font-size-zero.js: Added.
2010-11-18 James Robinson <jamesr at chromium.org>
Reviewed by Darin Fisher.
[chromium] REGRESSION(72141): Chromium fails acid3 on windows and linux
https://bugs.webkit.org/show_bug.cgi?id=49638
Avoid clamping zero text size to 12pt in FontPlatformData::setupPaint() in FontPlatformDataLinux.cpp
Set all metrics to 0 if the font size is specified as zero in SimpleFontDataChromiumWin.cpp, just
like Safari Win did in r72270.
Test: fast/text/font-size-zero.html
* platform/graphics/chromium/FontPlatformDataLinux.cpp:
(WebCore::FontPlatformData::setupPaint):
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
(WebCore::SimpleFontData::platformInit):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 62c61fd..47424b7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-18 James Robinson <jamesr at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] REGRESSION(72141): Chromium fails acid3 on windows and linux
+ https://bugs.webkit.org/show_bug.cgi?id=49638
+
+ Adds a test checking that the bounding client rect of a text run with font-size:0
+ has zero height. This is also covered by acid3, but an isolated test case is easier
+ to work with.
+
+ * fast/text/font-size-zero-expected.txt: Added.
+ * fast/text/font-size-zero.html: Added.
+ * fast/text/script-tests/font-size-zero.js: Added.
+
2010-11-18 Adam Roben <aroben at apple.com>
Update Windows results after r72050
diff --git a/LayoutTests/fast/text/font-size-zero-expected.txt b/LayoutTests/fast/text/font-size-zero-expected.txt
new file mode 100644
index 0000000..0936902
--- /dev/null
+++ b/LayoutTests/fast/text/font-size-zero-expected.txt
@@ -0,0 +1,7 @@
+Tests that text with font-size:0 has zero height.
+
+PASS s.getBoundingClientRect().height is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/text/font-size-zero.html b/LayoutTests/fast/text/font-size-zero.html
new file mode 100644
index 0000000..68214a5
--- /dev/null
+++ b/LayoutTests/fast/text/font-size-zero.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description">Tests that text with font-size:0 has zero height.</p>
+<div id="console"></div>
+<script src="script-tests/font-size-zero.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/text/script-tests/font-size-zero.js b/LayoutTests/fast/text/script-tests/font-size-zero.js
new file mode 100644
index 0000000..5b69f7f
--- /dev/null
+++ b/LayoutTests/fast/text/script-tests/font-size-zero.js
@@ -0,0 +1,10 @@
+var s = document.createElement('span');
+s.style.fontSize = 0;
+s.innerHTML = 'Text';
+document.body.appendChild(s);
+
+shouldBe("s.getBoundingClientRect().height", "0");
+
+document.body.removeChild(s);
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bb7babd..b8e9a32 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-18 James Robinson <jamesr at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] REGRESSION(72141): Chromium fails acid3 on windows and linux
+ https://bugs.webkit.org/show_bug.cgi?id=49638
+
+ Avoid clamping zero text size to 12pt in FontPlatformData::setupPaint() in FontPlatformDataLinux.cpp
+ Set all metrics to 0 if the font size is specified as zero in SimpleFontDataChromiumWin.cpp, just
+ like Safari Win did in r72270.
+
+ Test: fast/text/font-size-zero.html
+
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+ (WebCore::FontPlatformData::setupPaint):
+ * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
+ (WebCore::SimpleFontData::platformInit):
+
2010-11-18 Rob Buis <rwlbuis at gmail.com>
Reviewed by Simon Fraser.
diff --git a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
index 0da873b..3944775 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
@@ -130,7 +130,7 @@ String FontPlatformData::description() const
void FontPlatformData::setupPaint(SkPaint* paint) const
{
- const float ts = m_textSize > 0 ? m_textSize : 12;
+ const float ts = m_textSize >= 0 ? m_textSize : 12;
paint->setAntiAlias(m_style.useAntiAlias == FontRenderStyle::NoPreference ? isSkiaAntiAlias : m_style.useAntiAlias);
switch (m_style.useHinting) {
diff --git a/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp b/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
index deebd31..ea2eb7c 100644
--- a/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
+++ b/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp
@@ -53,6 +53,18 @@ static inline float scaleEmToUnits(float x, int unitsPerEm)
void SimpleFontData::platformInit()
{
+ if (!m_platformData.size()) {
+ m_ascent = 0;
+ m_descent = 0;
+ m_lineGap = 0;
+ m_lineSpacing = 0;
+ m_avgCharWidth = 0;
+ m_maxCharWidth = 0;
+ m_xHeight = 0;
+ m_unitsPerEm = 0;
+ return;
+ }
+
HDC dc = GetDC(0);
HGDIOBJ oldFont = SelectObject(dc, m_platformData.hfont());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list