Changeset 135884 in webkit
- Timestamp:
- Nov 27, 2012 11:15:04 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r135880 r135884 1 2012-11-27 Robert Hogan <robert@webkit.org> 2 3 REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font 4 https://bugs.webkit.org/show_bug.cgi?id=101443 5 6 Reviewed by David Hyatt. 7 8 * fast/text/word-space-nbsp-expected.html: Added. 9 * fast/text/word-space-nbsp.html: Added. 10 1 11 2012-11-27 Tony Chang <tony@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r135883 r135884 1 2012-11-27 Robert Hogan <robert@webkit.org> 2 3 REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font 4 https://bugs.webkit.org/show_bug.cgi?id=101443 5 6 Reviewed by David Hyatt. 7 8 Leading non-breaking space in a text run should always get word-spacing applied. When RenderText 9 calculates the preferred with of a run of text it breaks it up into word segments that contain 10 no breaking spaces and calculates the width of each. So when calculating the width of ' b' 11 it needs to add word-spacing to the leading non-breaking space as it does not get collapsed away. 12 13 Test: fast/text/word-space-nbsp.html 14 15 * platform/graphics/WidthIterator.cpp: 16 (WebCore::WidthIterator::advanceInternal): 17 1 18 2012-11-27 Yong Li <yoli@rim.com> 2 19 -
trunk/Source/WebCore/platform/graphics/WidthIterator.cpp
r131468 r135884 242 242 // Account for word spacing. 243 243 // We apply additional space between "words" by adding width to the space character. 244 if (treatAsSpace && (character != '\t' || !m_run.allowTabs()) && textIterator.currentCharacter() && m_font->wordSpacing())244 if (treatAsSpace && (character != '\t' || !m_run.allowTabs()) && (textIterator.currentCharacter() || character == noBreakSpace) && m_font->wordSpacing()) 245 245 width += m_font->wordSpacing(); 246 246 } else
Note: See TracChangeset
for help on using the changeset viewer.