Title: [149891] trunk
- Revision
- 149891
- Author
- [email protected]
- Date
- 2013-05-10 11:20:28 -0700 (Fri, 10 May 2013)
Log Message
Include tab character as a word end for kerning
https://bugs.webkit.org/show_bug.cgi?id=115915
<rdar://problem/13861491>
Reviewed by Enrica Casucci.
This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
which only looked for a space character as a word end. It should
look for tab characters too.
Source/WebCore:
Test: fast/text/word-space-with-kerning-4.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Look for '\t'.
LayoutTests:
* fast/text/word-space-with-kerning-4-expected.html: Added.
* fast/text/word-space-with-kerning-4.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (149890 => 149891)
--- trunk/LayoutTests/ChangeLog 2013-05-10 18:12:36 UTC (rev 149890)
+++ trunk/LayoutTests/ChangeLog 2013-05-10 18:20:28 UTC (rev 149891)
@@ -1,3 +1,18 @@
+2013-05-10 Dean Jackson <[email protected]>
+
+ Include tab character as a word end for kerning
+ https://bugs.webkit.org/show_bug.cgi?id=115915
+ <rdar://problem/13861491>
+
+ Reviewed by Enrica Casucci.
+
+ This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
+ which only looked for a space character as a word end. It should
+ look for tab characters too.
+
+ * fast/text/word-space-with-kerning-4-expected.html: Added.
+ * fast/text/word-space-with-kerning-4.html: Added.
+
2013-05-10 Ryosuke Niwa <[email protected]>
REGRESSION (r149652): Videos do not play on cnn.com, just black box
Added: trunk/LayoutTests/fast/text/word-space-with-kerning-4-expected.html (0 => 149891)
--- trunk/LayoutTests/fast/text/word-space-with-kerning-4-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/word-space-with-kerning-4-expected.html 2013-05-10 18:20:28 UTC (rev 149891)
@@ -0,0 +1,8 @@
+<div style="font-size: 20px; font-family: ahem; -webkit-font-smoothing: none;">
+ <div style="-webkit-font-kerning: normal;">
+ <span style="word-spacing: 60px">a<span>b<span>c </span> </span> d
+ </div>
+ <div style="-webkit-font-kerning: normal;">
+ <span style="word-spacing: 60px">a<span>b<span>c </span> </span> d
+ </div>
+</div>
Property changes on: trunk/LayoutTests/fast/text/word-space-with-kerning-4-expected.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/fast/text/word-space-with-kerning-4.html (0 => 149891)
--- trunk/LayoutTests/fast/text/word-space-with-kerning-4.html (rev 0)
+++ trunk/LayoutTests/fast/text/word-space-with-kerning-4.html 2013-05-10 18:20:28 UTC (rev 149891)
@@ -0,0 +1,8 @@
+<div style="font-size: 20px; font-family: ahem; -webkit-font-smoothing: none;">
+ <div>
+ <span style="word-spacing: 60px">a<span>b<span>c </span> </span> d
+ </div>
+ <div style="-webkit-font-kerning: normal;">
+ <span style="word-spacing: 60px">a<span>b<span>c </span> </span> d
+ </div>
+</div>
Property changes on: trunk/LayoutTests/fast/text/word-space-with-kerning-4.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (149890 => 149891)
--- trunk/Source/WebCore/ChangeLog 2013-05-10 18:12:36 UTC (rev 149890)
+++ trunk/Source/WebCore/ChangeLog 2013-05-10 18:20:28 UTC (rev 149891)
@@ -1,3 +1,20 @@
+2013-05-10 Dean Jackson <[email protected]>
+
+ Include tab character as a word end for kerning
+ https://bugs.webkit.org/show_bug.cgi?id=115915
+ <rdar://problem/13861491>
+
+ Reviewed by Enrica Casucci.
+
+ This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
+ which only looked for a space character as a word end. It should
+ look for tab characters too.
+
+ Test: fast/text/word-space-with-kerning-4.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::setLogicalWidthForTextRun): Look for '\t'.
+
2013-05-10 Anders Carlsson <[email protected]>
Remove EventTracer
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (149890 => 149891)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-05-10 18:12:36 UTC (rev 149890)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-05-10 18:20:28 UTC (rev 149891)
@@ -878,7 +878,8 @@
if (kerningIsEnabled && lastEndOffset == run->m_stop) {
int wordLength = lastEndOffset - wordMeasurement.startOffset;
measuredWidth += renderer->width(wordMeasurement.startOffset, wordLength, xPos + measuredWidth, lineInfo.isFirstLine());
- if (i > 0 && wordLength == 1 && renderer->characterAt(wordMeasurement.startOffset) == ' ')
+ UChar c = renderer->characterAt(wordMeasurement.startOffset);
+ if (i > 0 && wordLength == 1 && (c == ' ' || c == '\t'))
measuredWidth += renderer->style()->wordSpacing();
} else
measuredWidth += wordMeasurement.width;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes