Changeset 93909 in webkit
- Timestamp:
- Aug 26, 2011, 1:43:48 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93908 r93909 1 2011-08-26 Dan Bernstein <mitz@apple.com> 2 3 RenderText::computePreferredLogicalWidths() should measure words with trailing spaces 4 https://bugs.webkit.org/show_bug.cgi?id=66733 5 6 * fast/text/complex-preferred-logical-widths.html: Added. 7 * platform/mac/fast/text/complex-preferred-logical-widths-expected.txt: Added. 8 1 9 2011-08-26 Tony Chang <tony@chromium.org> 2 10 -
trunk/Source/WebCore/ChangeLog
r93908 r93909 1 2011-08-26 Ned Holbrook <nholbrook@apple.com> 2 3 RenderText::computePreferredLogicalWidths() should measure words with trailing spaces 4 https://bugs.webkit.org/show_bug.cgi?id=66733 5 6 Reviewed by Dan Bernstein. 7 8 Test: fast/text/complex-preferred-logical-widths.html 9 10 * rendering/RenderText.cpp: 11 (WebCore::RenderText::computePreferredLogicalWidths): Apply logic from RenderBlock::LineBreaker::nextLineBreak(). 12 1 13 2011-08-26 Tony Chang <tony@chromium.org> 2 14 -
trunk/Source/WebCore/rendering/RenderText.cpp
r93656 r93909 915 915 int lastWordBoundary = 0; 916 916 917 // Non-zero only when kerning is enabled, in which case we measure words with their trailing 918 // space, then subtract its width. 919 float wordTrailingSpaceWidth = f.typesettingFeatures() & Kerning ? f.width(RenderBlock::constructTextRun(this, f, &space, 1, style())) : 0; 920 917 921 int firstGlyphLeftOverflow = -1; 918 922 … … 984 988 int wordLen = j - i; 985 989 if (wordLen) { 986 float w = widthFromCache(f, i, wordLen, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow); 990 bool isSpace = (j < len) && isSpaceAccordingToStyle(c, style()); 991 float w; 992 if (wordTrailingSpaceWidth && isSpace) 993 w = widthFromCache(f, i, wordLen + 1, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow) - wordTrailingSpaceWidth; 994 else 995 w = widthFromCache(f, i, wordLen, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow); 996 987 997 if (firstGlyphLeftOverflow < 0) 988 998 firstGlyphLeftOverflow = glyphOverflow.left; … … 996 1006 } 997 1007 998 bool isSpace = (j < len) && isSpaceAccordingToStyle(c, style());999 1008 bool isCollapsibleWhiteSpace = (j < len) && style()->isCollapsibleWhiteSpace(c); 1000 1009 if (j < len && style()->autoWrap())
Note:
See TracChangeset
for help on using the changeset viewer.