Created attachment 85620 [details] Demonstration If a soft hyphen is the last character in an element, it seems that is no longer considered to be a line-breaking opportunity. The linked demonstration should permit breaks between "break" and "me", but it appears that the soft hyphen gets suppressed because the line break should occur between two spans, rather than internal to one of them. Given that WebKit does, in other circumstances, regard the soft hyphen as a line-breaking opportunity, I feel it should do so in this case too (though from what I can tell, the behaviour of hyphenation is not usefully defined, so perhaps this is an "enhancement" rather than a bug). Hyphenation should surely be driven by the "textual" content of a document, and not the logical (DOM) structure; that there are intervening span tags should not preclude the insertion of a line-break and visible hyphen in this case. Firefox 4RC and Internet Explorer 9 RTM both disagree with WebKit's interpretation and both allow line-breaking at the soft hyphens. Opera 11.01 is consistent with WebKit. Safari 5.0.4, Chrome 11.0.696.3 dev, on 64-bit Windows 7 with Service Pack 1, and Safari 5.0.4 on Mac OS X 10.6.6, all demonstrate the failure to line-break.
This looks like a special case of bug 17427.
Ah yes, I did not find that in a search. But yes, it looks essentially the same. The only nuance is that since the ­ is getting suppressed, there isn't actually a line-breaking opportunity any more. "Break?Me" can break because of the punctuation; "Break­Me" can break because of the soft hyphen. But the soft hyphen is getting removed, leaving "BreakMe", which is not eligible for a break anyway. At least, I think the soft hyphen is getting removed--it no longer appears in innerHTML etc.. I wonder if that is a separate (buggy?) issue; not rendering the ­ is one thing, removing it from the document entirely seems quite another.
Oh they don't even have to be separated by elements. If you create an element with multiple text nodes, a soft hyphen at the end of one text node is no longer a breaking point. If you normalize() the element (to fuse adjacent text nodes) then the hyphens work. See: http://dl.dropbox.com/u/4619191/webkit-soft-hyphens.html The top box has separate text nodes, the bottom box normalizes. In IE9 and Firefox 4, both boxes have a linebreak. In WebKit, only the bottom one does.