Negative text indents can break RenderBlock's inline maximum preferred width calculation
https://bugs.webkit.org/show_bug.cgi?id=108973

Reviewed by Emil A Eklund.

Source/WebCore:

Change two quirks about to how we calculate a block's inline preferred width with
text-indent.

First, re-use text-indent that's first applied to floats on text that follows it.
This matches Layout, as otherwise we can prematurely wrap text when there's a negative
margin on a block starting with a float. This also matches FireFox.

Second, correct how the max preferred width is calculated in the presence of a negative
text-indent. If the text-indent is more negative than the first text line break, we
update the value to be the remainder. Previously, we added this remaining negative value
to subsequent minimum and maximum preferred width calculations (until the remainder was
gone). This is wrong for the max preferred width, as we're adding the negative value more
than once, and leads to a max preferred width that's smaller than our line.

Test: fast/css/negative-text-indent-in-inline-block.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):

LayoutTests:

* fast/css/negative-text-indent-in-inline-block-expected.html: Added.
* fast/css/negative-text-indent-in-inline-block.html: Added.


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