[Webkit-unassigned] [Bug 29648] New: white-space: nowrap inline element beside a floated element wraps incorrectly without trailing textnode/newline

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 22 11:39:30 PDT 2009


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

           Summary: white-space: nowrap inline element beside a floated
                    element wraps incorrectly without trailing
                    textnode/newline
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: retchless at gmail.com


I've recently run into an issue with white-space: nowrap which is reproducible
with the latest WebKit nightly.  

Broken:

<div style="width: 200px; overflow: hidden">
    <div style="float: left; width: 50px; height: 50px; background-color:
red"></div>
    <span style="white-space: nowrap">Some long string that
wraps</span></div><!-- </div> not on next line on purpose - triggers bug -->

Works:

<div style="width: 200px; overflow: hidden">
    <div style="float: left; width: 50px; height: 50px; background-color:
red"></div>
    <span style="white-space: nowrap">Some long string that wraps</span><!--
text node (space or newline) here fixes the bug -->
</div>

Essentially, the white-space: nowrap span (or any inline element) should wrap
below the float: left block if it doesn't fit, and should only spill out of its
parent if it doesn't fit within the width of its parent after wrapping. Adding
a space or newline after the white-space: nowrap span causes it to behave
correctly.

Note: Overflow hidden on the parent is not necessary, but it makes this
scenario clearer.

-- 
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