REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing...
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2012 19:15:04 +0000 (19:15 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2012 19:15:04 +0000 (19:15 +0000)
commit625e6c0e5a0e8a5d0d1973c982c676e5d9591d0c
tree570f81ffc70197a573babb338c2c8d5a256c91a3
parentf5fe1e67f9d0aa0e266ef865a852a8343570a08f
REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font
https://bugs.webkit.org/show_bug.cgi?id=101443

Reviewed by David Hyatt.

Source/WebCore:

Leading non-breaking space in a text run should always get word-spacing applied. When RenderText
calculates the preferred with of a run of text it breaks it up into word segments that contain
no breaking spaces and calculates the width of each. So when calculating the width of '&nbsp;b'
it needs to add word-spacing to the leading non-breaking space as it does not get collapsed away.

Test: fast/text/word-space-nbsp.html

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):

LayoutTests:

* fast/text/word-space-nbsp-expected.html: Added.
* fast/text/word-space-nbsp.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/word-space-nbsp-expected.html [new file with mode: 0644]
LayoutTests/fast/text/word-space-nbsp.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/WidthIterator.cpp