Bug 108973 - Negative text indents can break RenderBlock's inline maximum preferred width calculation
Summary: Negative text indents can break RenderBlock's inline maximum preferred width ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-05 12:59 PST by Levi Weintraub
Modified: 2013-02-07 06:50 PST (History)
7 users (show)

See Also:


Attachments
Test case (219 bytes, text/html)
2013-02-05 13:02 PST, Levi Weintraub
no flags Details
Patch (6.45 KB, patch)
2013-02-06 12:12 PST, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch (6.95 KB, patch)
2013-02-06 14:06 PST, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.