Changeset 129284 in webkit
- Timestamp:
- Sep 21, 2012, 6:00:01 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r129281 r129284 1 2012-09-21 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION (r129176): Incorrect line breaking when kerning occurs between a space and the following character 4 https://bugs.webkit.org/show_bug.cgi?id=97377 5 6 Reviewed by Enrica Casucci. 7 8 * fast/text/kerning-with-TextLayout-expected.html: Added. 9 * fast/text/kerning-with-TextLayout.html: Added. 10 1 11 2012-09-21 Gavin Barraclough <barraclough@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r129280 r129284 1 2012-09-21 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION (r129176): Incorrect line breaking when kerning occurs between a space and the following character 4 https://bugs.webkit.org/show_bug.cgi?id=97377 5 6 Reviewed by Enrica Casucci. 7 8 Test: fast/text/kerning-with-TextLayout.html 9 10 When kerning is enabled, the last character in a word may have its advance shortened because 11 of its trailing space. To account for that, words are measured along with the trailing space, 12 then the width of a space is subtracted from the result. This doesn’t work when the trailing 13 space itself has its advance shortened due to the character following it, which can happen 14 when using the TextLayout optimization. However, when the optimization is used, the advance 15 of the last character of the word is already adjusted for the trailing space, so there is no 16 need to measure with that space and subtract its advance. 17 18 * rendering/RenderBlockLineLayout.cpp: 19 (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to not use the trailingSpaceWidth 20 mechanism when TextLayout is being used. 21 1 22 2012-09-21 Adam Klein <adamk@chromium.org> 2 23 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r128713 r129284 2415 2415 float lastSpaceWordSpacing = 0; 2416 2416 2417 // Non-zero only when kerning is enabled, in which case we measure words with their trailing2418 // space, then subtract its width.2419 float wordTrailingSpaceWidth = f.typesettingFeatures() & Kerning ? f.width(constructTextRun(t, f, &space, 1, style)) + wordSpacing : 0;2420 2421 2417 float wrapW = width.uncommittedWidth() + inlineLogicalWidth(current.m_obj, !appliedStartWidth, true); 2422 2418 float charWidth = 0; … … 2447 2443 2448 2444 TextLayout* textLayout = renderTextInfo.m_layout.get(); 2445 2446 // Non-zero only when kerning is enabled and TextLayout isn't used, in which case we measure 2447 // words with their trailing space, then subtract its width. 2448 float wordTrailingSpaceWidth = (f.typesettingFeatures() & Kerning) && !textLayout ? f.width(constructTextRun(t, f, &space, 1, style)) + wordSpacing : 0; 2449 2449 2450 2450 for (; current.m_pos < t->textLength(); current.fastIncrementInTextNode()) {
Note:
See TracChangeset
for help on using the changeset viewer.