[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
tony at chromium.org
tony at chromium.org
Wed Dec 22 16:00:46 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 53ba80a6ebd116771a416018a8250e15775a623e
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 17 21:29:33 2010 +0000
2010-11-17 James Simonsen <simonjam at chromium.org>
Reviewed by Tony Chang.
[chromium] Fix negative letter spacing in complex text on linux
https://bugs.webkit.org/show_bug.cgi?id=49563
* fast/text/atsui-negative-spacing-features.html: Added.
* platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.checksum: Added.
* platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.png: Added.
* platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.txt: Added.
* platform/mac/fast/text/atsui-negative-spacing-features-expected.checksum: Added.
* platform/mac/fast/text/atsui-negative-spacing-features-expected.png: Added.
* platform/mac/fast/text/atsui-negative-spacing-features-expected.txt: Added.
2010-11-17 James Simonsen <simonjam at chromium.org>
Reviewed by Tony Chang.
[chromium] Fix negative letter spacing in complex text on linux
https://bugs.webkit.org/show_bug.cgi?id=49563
Test: fast/text/atsui-negative-spacing-features.html
* platform/graphics/chromium/FontLinux.cpp: Make spacing signed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 005bc48..b9a32d2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-17 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Fix negative letter spacing in complex text on linux
+ https://bugs.webkit.org/show_bug.cgi?id=49563
+
+ * fast/text/atsui-negative-spacing-features.html: Added.
+ * platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.checksum: Added.
+ * platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.png: Added.
+ * platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.txt: Added.
+ * platform/mac/fast/text/atsui-negative-spacing-features-expected.checksum: Added.
+ * platform/mac/fast/text/atsui-negative-spacing-features-expected.png: Added.
+ * platform/mac/fast/text/atsui-negative-spacing-features-expected.txt: Added.
+
2010-11-17 Dave Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/LayoutTests/fast/text/atsui-negative-spacing-features.html b/LayoutTests/fast/text/atsui-negative-spacing-features.html
new file mode 100644
index 0000000..131cc3d
--- /dev/null
+++ b/LayoutTests/fast/text/atsui-negative-spacing-features.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>ATSUI spacing features with negative values</title>
+<style type="text/css">
+div.test { width: 200px; border: solid blue 1px; margin-bottom: 5px; }
+div.rtl { direction: rtl; font-family: 'Lucida Grande'; line-height: 18px; }
+div.ref { width: 200px; border: solid green 1px; }
+div.word { word-spacing: -2px; }
+div.letter { letter-spacing: -1px; }
+</style>
+</head>
+<body>
+<p>
+Test for negative spacing values in complex text rendering.
+</p>
+Each green box should be identical to the blue box it follows, except for accents.
+<hr>
+<table>
+<tr style="text-align: center;">
+<td>Word spacing</td>
+<td>Letter spacing</td>
+</tr>
+<tr style="vertical-align: top;">
+<td>
+<div class="word">
+<div class="test rtl">
+יְהִי,
+אָחִי,
+לְךָ
+סֵפֶר
+שְׁלַחְתִּיו
+וּמִמְכֶּרֶת
+צְמִיתוּת
+לָךְ
+מְכַרְתִּיו.
+</div>
+<div class="test">
+Lorèm ipsum dolor sit amèt, consectetuer adipiscing èlit.
+</div>
+<div class="ref">
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+</div>
+</div>
+</td>
+<td>
+<div class="letter">
+<div class="test rtl">
+יְהִי,
+אָחִי,
+לְךָ
+סֵפֶר
+שְׁלַחְתִּיו
+וּמִמְכֶּרֶת
+צְמִיתוּת
+לָךְ
+מְכַרְתִּיו.
+</div>
+<div class="test">
+Lorèm ipsum dolor sit amèt, consectetuèr adipiscing èlit.
+</div>
+<div class="ref">
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+</div>
+</div>
+</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.checksum b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.checksum
new file mode 100644
index 0000000..b9c5b04
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.checksum
@@ -0,0 +1 @@
+2476ae1839f2bf3c2434fc7e32d5862c
\ No newline at end of file
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.png b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.png
new file mode 100644
index 0000000..e78332a
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.txt b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.txt
new file mode 100644
index 0000000..81153ed
--- /dev/null
+++ b/LayoutTests/platform/chromium-linux/fast/text/atsui-negative-spacing-features-expected.txt
@@ -0,0 +1,51 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x260
+ RenderBlock {HTML} at (0,0) size 800x260
+ RenderBody {BODY} at (8,16) size 784x236
+ RenderBlock {P} at (0,0) size 784x20
+ RenderText {#text} at (0,0) size 349x19
+ text run at (0,0) width 349: "Test for negative spacing values in complex text rendering."
+ RenderBlock (anonymous) at (0,36) size 784x20
+ RenderText {#text} at (0,0) size 483x19
+ text run at (0,0) width 483: "Each green box should be identical to the blue box it follows, except for accents."
+ RenderBlock {HR} at (0,64) size 784x2 [border: (1px inset #000000)]
+ RenderTable {TABLE} at (0,74) size 414x162
+ RenderTableSection {TBODY} at (0,0) size 414x162
+ RenderTableRow {TR} at (0,2) size 414x22
+ RenderTableCell {TD} at (2,2) size 204x22 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (59,1) size 85x19
+ text run at (59,1) width 85: "Word spacing"
+ RenderTableCell {TD} at (208,2) size 204x22 [r=0 c=1 rs=1 cs=1]
+ RenderText {#text} at (59,1) size 85x19
+ text run at (59,1) width 85: "Letter spacing"
+ RenderTableRow {TR} at (0,26) size 414x134
+ RenderTableCell {TD} at (2,26) size 204x134 [r=1 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 202x132
+ RenderBlock {DIV} at (0,0) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (26,1) size 175x37
+ text run at (26,1) width 175 RTL: "\x{5D9}\x{5B0}\x{5D4}\x{5B4}\x{5D9}, \x{5D0}\x{5B8}\x{5D7}\x{5B4}\x{5D9}, \x{5DC}\x{5B0}\x{5DA}\x{5B8} \x{5E1}\x{5B5}\x{5E4}\x{5B6}\x{5E8} \x{5E9}\x{5C1}\x{5B0}\x{5DC}\x{5B7}\x{5D7}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5} \x{5D5}\x{5BC}\x{5DE}\x{5B4}\x{5DE}\x{5B0}\x{5DB}\x{5BC}\x{5B6}\x{5E8}\x{5B6}\x{5EA}"
+ text run at (101,19) width 100 RTL: "\x{5E6}\x{5B0}\x{5DE}\x{5B4}\x{5D9}\x{5EA}\x{5D5}\x{5BC}\x{5EA} \x{5DC}\x{5B8}\x{5DA}\x{5B0} \x{5DE}\x{5B0}\x{5DB}\x{5B7}\x{5E8}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}."
+ RenderBlock {DIV} at (0,43) size 202x42 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 161x39
+ text run at (1,1) width 161: "Lore\x{300}m ipsum dolor sit ame\x{300}t,"
+ text run at (1,21) width 160: "consectetuer adipiscing e\x{300}lit."
+ RenderBlock {DIV} at (0,90) size 202x42 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 161x39
+ text run at (1,1) width 161: "Lorem ipsum dolor sit amet,"
+ text run at (1,21) width 160: "consectetuer adipiscing elit."
+ RenderTableCell {TD} at (208,26) size 204x134 [r=1 c=1 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 202x132
+ RenderBlock {DIV} at (0,0) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (10,1) size 191x37
+ text run at (10,1) width 33 RTL: "\x{5E6}\x{5B0}\x{5DE}\x{5B4}\x{5D9}\x{5EA}\x{5D5}\x{5BC}\x{5EA}"
+ text run at (43,1) width 158 RTL: "\x{5D9}\x{5B0}\x{5D4}\x{5B4}\x{5D9}, \x{5D0}\x{5B8}\x{5D7}\x{5B4}\x{5D9}, \x{5DC}\x{5B0}\x{5DA}\x{5B8} \x{5E1}\x{5B5}\x{5E4}\x{5B6}\x{5E8} \x{5E9}\x{5C1}\x{5B0}\x{5DC}\x{5B7}\x{5D7}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5} \x{5D5}\x{5BC}\x{5DE}\x{5B4}\x{5DE}\x{5B0}\x{5DB}\x{5BC}\x{5B6}\x{5E8}\x{5B6}\x{5EA} "
+ text run at (150,19) width 51 RTL: "\x{5DC}\x{5B8}\x{5DA}\x{5B0} \x{5DE}\x{5B0}\x{5DB}\x{5B7}\x{5E8}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}."
+ RenderBlock {DIV} at (0,43) size 202x42 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 142x39
+ text run at (1,1) width 142: "Lore\x{300}m ipsum dolor sit ame\x{300}t,"
+ text run at (1,21) width 135: "consectetue\x{300}r adipiscing e\x{300}lit."
+ RenderBlock {DIV} at (0,90) size 202x42 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 142x39
+ text run at (1,1) width 142: "Lorem ipsum dolor sit amet,"
+ text run at (1,21) width 135: "consectetuer adipiscing elit."
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 5961e2e..ee650d4 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3207,3 +3207,6 @@ BUGWK49653 WIN LINUX MAC : fast/css/line-height-determined-by-primary-font.html
// Regression after http://trac.webkit.org/changeset/72189
BUGWK49653 WIN LINUX MAC : fast/css/getFloatValueForUnit.html = TEXT
+
+// Newly added. Will be rebaselined once bots collect expected results.
+BUGWK49563 WIN : fast/text/atsui-negative-spacing-features.html = IMAGE+TEXT
diff --git a/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.checksum b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.checksum
new file mode 100644
index 0000000..1af4b8d
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.checksum
@@ -0,0 +1 @@
+45cb2e22241b876c2dc51eba7189b605
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.png b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.png
new file mode 100644
index 0000000..449f1d6
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.txt b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.txt
new file mode 100644
index 0000000..4cee7f0
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.txt
@@ -0,0 +1,52 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x246
+ RenderBlock {HTML} at (0,0) size 800x246
+ RenderBody {BODY} at (8,16) size 784x222
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 371x18
+ text run at (0,0) width 371: "Test for negative spacing values in complex text rendering."
+ RenderBlock (anonymous) at (0,34) size 784x18
+ RenderText {#text} at (0,0) size 507x18
+ text run at (0,0) width 507: "Each green box should be identical to the blue box it follows, except for accents."
+ RenderBlock {HR} at (0,60) size 784x2 [border: (1px inset #000000)]
+ RenderTable {TABLE} at (0,70) size 414x152
+ RenderTableSection {TBODY} at (0,0) size 414x152
+ RenderTableRow {TR} at (0,2) size 414x20
+ RenderTableCell {TD} at (2,2) size 204x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (58,1) size 88x18
+ text run at (58,1) width 88: "Word spacing"
+ RenderTableCell {TD} at (208,2) size 204x20 [r=0 c=1 rs=1 cs=1]
+ RenderText {#text} at (57,1) size 89x18
+ text run at (57,1) width 89: "Letter spacing"
+ RenderTableRow {TR} at (0,24) size 414x126
+ RenderTableCell {TD} at (2,24) size 204x126 [r=1 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 202x124
+ RenderBlock {DIV} at (0,0) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (32,1) size 190x36
+ text run at (32,1) width 169 RTL: "\x{5D9}\x{5B0}\x{5D4}\x{5B4}\x{5D9}, \x{5D0}\x{5B8}\x{5D7}\x{5B4}\x{5D9}, \x{5DC}\x{5B0}\x{5DA}\x{5B8} \x{5E1}\x{5B5}\x{5E4}\x{5B6}\x{5E8} \x{5E9}\x{5C1}\x{5B0}\x{5DC}\x{5B7}\x{5D7}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}"
+ text run at (11,19) width 131 RTL: "\x{5E6}\x{5B0}\x{5DE}\x{5B4}\x{5D9}\x{5EA}\x{5D5}\x{5BC}\x{5EA} \x{5DC}\x{5B8}\x{5DA}\x{5B0} \x{5DE}\x{5B0}\x{5DB}\x{5B7}\x{5E8}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}."
+ text run at (142,19) width 59 RTL: "\x{5D5}\x{5BC}\x{5DE}\x{5B4}\x{5DE}\x{5B0}\x{5DB}\x{5BC}\x{5B6}\x{5E8}\x{5B6}\x{5EA} "
+ RenderBlock {DIV} at (0,43) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 169x36
+ text run at (1,1) width 169: "Lore\x{300}m ipsum dolor sit ame\x{300}t,"
+ text run at (1,19) width 169: "consectetuer adipiscing e\x{300}lit."
+ RenderBlock {DIV} at (0,86) size 202x38 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 169x36
+ text run at (1,1) width 169: "Lorem ipsum dolor sit amet,"
+ text run at (1,19) width 169: "consectetuer adipiscing elit."
+ RenderTableCell {TD} at (208,24) size 204x126 [r=1 c=1 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 202x124
+ RenderBlock {DIV} at (0,0) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (47,1) size 172x36
+ text run at (47,1) width 154 RTL: "\x{5D9}\x{5B0}\x{5D4}\x{5B4}\x{5D9}, \x{5D0}\x{5B8}\x{5D7}\x{5B4}\x{5D9}, \x{5DC}\x{5B0}\x{5DA}\x{5B8} \x{5E1}\x{5B5}\x{5E4}\x{5B6}\x{5E8} \x{5E9}\x{5C1}\x{5B0}\x{5DC}\x{5B7}\x{5D7}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}"
+ text run at (29,19) width 118 RTL: "\x{5E6}\x{5B0}\x{5DE}\x{5B4}\x{5D9}\x{5EA}\x{5D5}\x{5BC}\x{5EA} \x{5DC}\x{5B8}\x{5DA}\x{5B0} \x{5DE}\x{5B0}\x{5DB}\x{5B7}\x{5E8}\x{5B0}\x{5EA}\x{5BC}\x{5B4}\x{5D9}\x{5D5}."
+ text run at (147,19) width 54 RTL: "\x{5D5}\x{5BC}\x{5DE}\x{5B4}\x{5DE}\x{5B0}\x{5DB}\x{5BC}\x{5B6}\x{5E8}\x{5B6}\x{5EA} "
+ RenderBlock {DIV} at (0,43) size 202x38 [border: (1px solid #0000FF)]
+ RenderText {#text} at (1,1) size 150x36
+ text run at (1,1) width 150: "Lore\x{300}m ipsum dolor sit ame\x{300}t,"
+ text run at (1,19) width 144: "consectetue\x{300}r adipiscing e\x{300}lit."
+ RenderBlock {DIV} at (0,86) size 202x38 [border: (1px solid #008000)]
+ RenderText {#text} at (1,1) size 150x36
+ text run at (1,1) width 150: "Lorem ipsum dolor sit amet,"
+ text run at (1,19) width 144: "consectetuer adipiscing elit."
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cb83141..baea938 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-17 James Simonsen <simonjam at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Fix negative letter spacing in complex text on linux
+ https://bugs.webkit.org/show_bug.cgi?id=49563
+
+ Test: fast/text/atsui-negative-spacing-features.html
+
+ * platform/graphics/chromium/FontLinux.cpp: Make spacing signed.
+
2010-11-17 Andreas Kling <kling at webkit.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index 5b2fb0b..9fc7558 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -165,7 +165,7 @@ public:
~TextRunWalker();
bool isWordBreak(unsigned);
- unsigned determineWordBreakSpacing(unsigned);
+ int determineWordBreakSpacing(unsigned);
// setPadding sets a number of pixels to be distributed across the TextRun.
// WebKit uses this to justify text.
void setPadding(int);
@@ -255,7 +255,7 @@ private:
// Since we only add a whole number of padding pixels at
// each word break we accumulate error. This is the
// number of pixels that we are behind so far.
- unsigned m_letterSpacing; // pixels to be added after each glyph.
+ int m_letterSpacing; // pixels to be added after each glyph.
};
@@ -305,9 +305,9 @@ bool TextRunWalker::isWordBreak(unsigned index)
return index && isCodepointSpace(m_item.string[index]) && !isCodepointSpace(m_item.string[index - 1]);
}
-unsigned TextRunWalker::determineWordBreakSpacing(unsigned logClustersIndex)
+int TextRunWalker::determineWordBreakSpacing(unsigned logClustersIndex)
{
- unsigned wordBreakSpacing = 0;
+ int wordBreakSpacing = 0;
// The first half of the conjunction works around the case where
// output glyphs aren't associated with any codepoints by the
// clusters log.
@@ -316,7 +316,7 @@ unsigned TextRunWalker::determineWordBreakSpacing(unsigned logClustersIndex)
wordBreakSpacing = m_wordSpacingAdjustment;
if (m_padding > 0) {
- unsigned toPad = roundf(m_padPerWordBreak + m_padError);
+ int toPad = roundf(m_padPerWordBreak + m_padError);
m_padError += m_padPerWordBreak - toPad;
if (m_padding < toPad)
@@ -554,8 +554,7 @@ void TextRunWalker::setGlyphXPositions(bool isRTL)
position += advance;
}
}
-
- m_pixelWidth = position;
+ m_pixelWidth = std::max(position, 0.0);
m_offsetX += m_pixelWidth;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list