Commit d0b89257 authored by dino@apple.com's avatar dino@apple.com

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3075fca7
2013-05-10 Dean Jackson <dino@apple.com>
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 <rniwa@webkit.org>
REGRESSION (r149652): Videos do not play on cnn.com, just black box
......
<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>
<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>
2013-05-10 Dean Jackson <dino@apple.com>
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 <andersca@apple.com>
Remove EventTracer
......
......@@ -878,7 +878,8 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment