WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29648
white-space: nowrap inline element beside a floated element wraps incorrectly without trailing textnode/newline
https://bugs.webkit.org/show_bug.cgi?id=29648
Summary
white-space: nowrap inline element beside a floated element wraps incorrectly...
Rob Retchless
Reported
2009-09-22 11:39:30 PDT
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.
Attachments
Patch
(5.96 KB, patch)
2012-10-27 01:39 PDT
,
Robert Hogan
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Patrick Mueller
Comment 1
2009-09-22 12:26:01 PDT
This appears to behave the same in Safari 4.0.3 as well.
Robert Hogan
Comment 2
2012-10-27 01:39:05 PDT
Created
attachment 171084
[details]
Patch
Levi Weintraub
Comment 3
2012-10-27 01:51:38 PDT
Comment on
attachment 171084
[details]
Patch LGTM. A link to the bug in the ref test would be nice :)
WebKit Review Bot
Comment 4
2012-10-30 12:13:17 PDT
Comment on
attachment 171084
[details]
Patch Clearing flags on attachment: 171084 Committed
r132935
: <
http://trac.webkit.org/changeset/132935
>
WebKit Review Bot
Comment 5
2012-10-30 12:13:21 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug