[Webkit-unassigned] [Bug 45269] New: CSS3: word-break:break-all not working within the non-line-box element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 6 08:14:06 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=45269
Summary: CSS3: word-break:break-all not working within the
non-line-box element
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yumeyao at gmail.com
According to w3.org:
word-wrap
This property specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit within the line box. It only has an effect when 'text-wrap' is either 'normal' or 'suppress'. Possible values:
word-break
This property specifies what set of line breaking restrictions are in effect within the element. Values have the following meanings:
You see, w3.org suggests that word-wrap[:break-word] applies to a line-box, my understanding of line-box is that something displayed as block, or something has a width property set in CSS. Relatively, word-break applies to an element, that is, anything.
So consider this html code:
<html><body>
<div style="width:800px; word-break:break-all;">
<img src="a.gif" style="float:right;" />
VERYLONGWORDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaVERYLONGWORD
</div></body></html>
It's meant to break the VeryLongWord and display the text to the left of the right-floated image. And here are results:
Result on IE8: http://img687.imageshack.us/img687/189/ie8.png
Result on Webkit(also same on gecko, presto): http://img228.imageshack.us/img228/24/webkit.png
IE8 breaked the text as expected, while Webkit didn't and displayed the text in a whole line next to the image.
Then consider change word-break:break-all to word-wrap:break-word. This time, as suggested by w3.org, the VERYLONGWORDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaVERYLONGWORD is not displayed as a line-box, so it's not breaked. All results are like the latter one.
--
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