Bug 108973

Summary: Negative text indents can break RenderBlock's inline maximum preferred width calculation
Product: WebKit Reporter: Levi Weintraub <leviw>
Component: Layout and RenderingAssignee: Levi Weintraub <leviw>
Status: RESOLVED FIXED    
Severity: Normal CC: eae, eric, mitz, ojan.autocc, robert, webkit.review.bot, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case
none
Patch
none
Patch none

Description Levi Weintraub 2013-02-05 12:59:56 PST
This occurs when the negative text indent is larger than the line's inline minimum preferred width.
Comment 1 Levi Weintraub 2013-02-05 13:02:30 PST
Created attachment 186685 [details]
Test case
Comment 2 Levi Weintraub 2013-02-06 12:12:00 PST
Created attachment 186891 [details]
Patch
Comment 3 Emil A Eklund 2013-02-06 13:20:34 PST
Comment on attachment 186891 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=186891&action=review

Have you tested this for rtl content and with a negative margin-right?

> Source/WebCore/rendering/RenderBlock.cpp:5873
> +    // Only gets added to the max preffered width once.

typo, s/preffered/preferred/
Comment 4 Levi Weintraub 2013-02-06 14:06:14 PST
Created attachment 186916 [details]
Patch
Comment 5 WebKit Review Bot 2013-02-06 15:10:36 PST
Comment on attachment 186916 [details]
Patch

Clearing flags on attachment: 186916

Committed r142042: <http://trac.webkit.org/changeset/142042>
Comment 6 WebKit Review Bot 2013-02-06 15:10:39 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Zan Dobersek 2013-02-07 00:23:25 PST
The layout test added in this patch is failing on GTK. Could the failure be caused by the subpixel layout being disabled?

For reference, here's the expected and actual image output.
http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r142063%20(34139)/fast/css/negative-text-indent-in-inline-block-diffs.html
Comment 8 Emil A Eklund 2013-02-07 06:50:05 PST
That looks like a subpixel alignment issue. The good news is that there is no line break though.