Bug 113800

Summary: Padding applied twice for empty generated RenderInlines
Product: WebKit Reporter: Emil A Eklund <eae>
Component: Layout and RenderingAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, esprehn+autocc, jchaffraix, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Emil A Eklund 2013-04-02 09:49:14 PDT
The padding for empty generated content render objects is incorrectly applied twice.

Downstream chromium bug: https://code.google.com/p/chromium/issues/detail?id=225054
Comment 1 Emil A Eklund 2013-04-02 09:50:57 PDT
Created attachment 196168 [details]
Patch
Comment 2 Levi Weintraub 2013-04-02 09:56:25 PDT
Comment on attachment 196168 [details]
Patch

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

> Source/WebCore/rendering/RenderBlockLineLayout.cpp:325
> +        if (!isEmptyInline(parentAsRenderInline)) {

So if it's empty, where does the border/padding/margin get added?
Comment 3 Emil A Eklund 2013-04-02 10:00:08 PDT
(In reply to comment #2)
> (From update of attachment 196168 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=196168&action=review
> 
> > Source/WebCore/rendering/RenderBlockLineLayout.cpp:325
> > +        if (!isEmptyInline(parentAsRenderInline)) {
> 
> So if it's empty, where does the border/padding/margin get added?

To the RenderInline instead of the child RenderText
Comment 4 Levi Weintraub 2013-04-02 15:41:06 PDT
Comment on attachment 196168 [details]
Patch

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

LGTM.

> LayoutTests/fast/css-generated-content/margin-empty-content-expected.html:5
> +            ul {
> +                list-style-type: none;

Lookit all the whitespace!
Comment 5 WebKit Review Bot 2013-04-02 16:15:42 PDT
Comment on attachment 196168 [details]
Patch

Clearing flags on attachment: 196168

Committed r147505: <http://trac.webkit.org/changeset/147505>
Comment 6 WebKit Review Bot 2013-04-02 16:15:45 PDT
All reviewed patches have been landed.  Closing bug.