Closed Bug 617239 Opened 9 years ago Closed 9 years ago
min-intrinsic width computation ignores soft hyphens
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101206 Firefox/4.0b8pre Build Identifier: Fresh nightly 4.0b8pre When I load the attached HTML file into my browser, the browser appears unable to break the long string starting with "boost" around "struct boost" and ending with "filesystem::" around "boost:filesystem:basic_path". The width of the inner window at which a horizontal scroll bar appears is 1423. Reproducible: Always Steps to Reproduce: 1. Open break.html in the browser. 2. Resize the browser window so that the margin attempts to wrap the end of the string "boost::filesystem" in the string "boost::filesystem::basic_path". Actual Results: The browser fails to break the string. The browser shows a horizontal scroll bar. Expected Results: The browser should re-flow the text so that the first half of the line breaks by one of the numerous soft hyphens. HTML 4.01 Strict.
Replacing soft hyphens ­ with zero width spaces ​ lets the browser wrap the line. (As expected, the browser will not show hyphens.)
Yeah, this is sorta odd. Masayuki-san, do you know what's going on here?
Status: UNCONFIRMED → NEW
Ever confirmed: true
I have no idea. If the test is out of table cell, the line breaker works fine. So, isn't this a bug of table layout?
This seems to be a general problem with shrink-wrapping; in particular the min width that's computed is too wide.
Looks like nsTextFrame::AddInlineMinWidthForFlow doesn't treat ­ as a line-break opportunity. There's a comment like so: // XXX Should we consider hyphenation here? Seems like we should.
Summary: line breaking ignores soft hyphens → min-intrinsic width computation ignores soft hyphens
This looks a lot like bug 418975, and the patch there should fix it.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 418975
You need to log in before you can comment on or make changes to this bug.