Whitespace between nowrap elements ignored after collapsed trailing space in a text run
https://bugs.webkit.org/show_bug.cgi?id=17705

Reviewed by Ryosuke Niwa.

Source/WebCore:

Bug 93448 and r138654 fixed the treatment of line-breaks between nowrap elements. This augments
that fix by recognizing that we have a potential break not only in situations where the next character is a
space and the current character is not, but also where the next character is a space and the current character
*is* a space *and* we are ignoring spaces. This is so because any spaces we have ignored up to this point
after the actual word end will get collapsed away even if we don't end up taking the line break.

In a nutshell, if we allow whitespace collapsing 'word  ' and 'word' are equivalent when before a whitespace
character, so treat the first as well as the second as a potential linebreak.

Test: fast/text/whitespace/inline-whitespace-wrapping-5.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/text/whitespace/inline-whitespace-wrapping-5-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-5.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-6-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-6.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148367 268f45cc-cd09-0410-ab3c-d52691b4dbfc