[Webkit-unassigned] [Bug 56613] New: inline elements with padding in a table cell cause an unnecessary line break

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 17 17:05:09 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56613

           Summary: inline elements with padding in a table cell cause an
                    unnecessary line break
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: pdr at google.com


Created an attachment (id=86119)
 --> (https://bugs.webkit.org/attachment.cgi?id=86119&action=review)
Test case of the bug

Nested span elements with padding appear to cause a wrapping table cell to force an unnecessary line break.

This was found when laying out several strings wrapped in spans all inside a table cell. When padding or margin was applied to the group (so that there is space to the left of the first element), the last element would fall onto a new line even though the table cell was wide enough to fit all the elements.

Consider the following markup:
<div style="display:table-cell"><span style="padding-left:6px"><span>A <span>B</span></span></span></div>

Webkit calculates the table cell width as 33px when the span's left padding is 6px, and 27px when the span's left padding is 0px. I think both of these are correct. When the padding is 6px, there is a linebreak after the "A ", but when the padding is 0px there is no linebreak. It appears that Webkit is correctly calculating the table cell's width, but inserts an unnecessary linebreak.

Expected: There should be no linebreak and "A B" should be rendered in the div.

Actual: There is a linebreak inserted after "A ", causing "B" to get bumped to the next line.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list