WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
11857
Regression (
r132935
): WebKit breaks between <nobr> tags
https://bugs.webkit.org/show_bug.cgi?id=11857
Summary
Regression (r132935): WebKit breaks between <nobr> tags
Rosyna
Reported
2006-12-17 02:08:08 PST
This Microsoft page has a bunch of adjacent <nobr></nobr> tags in their breadcrumb view. WebKit should wrap inbetween the nobr tags. This may be related to
bug 10145
.
Attachments
Simple nobr test
(682 bytes, text/html)
2006-12-17 02:14 PST
,
Rosyna
no flags
Details
Patch
(4.77 KB, patch)
2012-12-27 10:23 PST
,
Robert Hogan
no flags
Details
Formatted Diff
Diff
Patch
(4.74 KB, patch)
2012-12-27 14:45 PST
,
Robert Hogan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dave Hyatt
Comment 1
2006-12-17 02:10:15 PST
Maybe in quirks mode. I'm not convinced it should in strict mode.
Rosyna
Comment 2
2006-12-17 02:14:23 PST
Created
attachment 11892
[details]
Simple nobr test
Rosyna
Comment 3
2006-12-17 02:16:06 PST
Why should it not be in strict mode? I thought the point of <nobr> was to prevent content inside the tag from word breaking. However, between the <nobr> tags is an opportunity for breaking. Or rather, is it documented it shouldn't break? Other browsers break in strict mode.
Dave Hyatt
Comment 4
2006-12-17 02:44:25 PST
Break opportunities don't automatically exist in between inline elements. Consider this: <span>A</span>pp<span>l</span>le This is all one word, "Apple", despite having multiple inlines wrapping some of the letters. Whether or not a break opportunity exists depends on the prevailing white-space mode (in this example "normal") and whether or not there's a break opportunity between two characters. In the case of <nobr>, the white-space mode is "nowrap", meaning that everything inside a <nobr> is considered to be unbreakable. When two of these elements are contiguous, the break opportunity between the two characters at the edges of the <nobr>s does not exist.
Dave Hyatt
Comment 5
2006-12-17 02:45:12 PST
If a space or newline is in between the <nobr>s then we would break.
Dave Hyatt
Comment 6
2006-12-17 02:46:51 PST
Our whitespace handling when mixing modes is way more advanced than other browsers. Take, for example:
http://hixie.ch/tests/adhoc/css/text/white-space/mixed/001.html
mitz
Comment 7
2006-12-17 03:17:59 PST
Note that in Firefox for a line break to occur between adjacent <nobr>s, either the first one must end with whitespace or the second one must begin with whitespace, i.e. <nobr>No</nobr><nobr>break</nobr> won't wrap, but the following will <nobr>No </nobr><nobr>break</nobr> <nobr>No</nobr><nobr> break</nobr>
Rosyna
Comment 8
2006-12-17 04:37:47 PST
In this case, there is whitespace before the closing tag, as mitz says.
Darin Fisher (:fishd, Google)
Comment 9
2008-02-29 13:21:28 PST
I think this bug (or maybe a variant of it) exists on
http://login.live.com/?id=2
. (Depending on your font settings, you might need to increase font sizes to see it.) Notice that in WebKit the "Account Services | Privacy Statement | Terms of Use" line doesn't break, whereas in all other browsers it does.
mitz
Comment 10
2008-02-29 13:31:58 PST
(In reply to
comment #9
)
> I think this bug (or maybe a variant of it) exists on >
http://login.live.com/?id=2
. (Depending on your font settings, you might need > to increase font sizes to see it.) > > Notice that in WebKit the "Account Services | Privacy Statement | Terms of > Use" line doesn't break, whereas in all other browsers it does. >
Yup, I think
bug 17595
is a duplicate of this bug.
Shane Stephens
Comment 11
2011-07-06 20:38:04 PDT
***
Bug 17595
has been marked as a duplicate of this bug. ***
Robert Hogan
Comment 12
2012-12-26 12:57:59 PST
WebKit's old behaviour was correct but has now regressed and 'passes' the reduction in this bug; it breaks between the <nobr> tags.
Robert Hogan
Comment 13
2012-12-26 15:28:10 PST
(In reply to
comment #12
)
> WebKit's old behaviour was correct but has now regressed and 'passes' the reduction in this bug; it breaks between the <nobr> tags.
Turns out I'm the culprit:
https://bugs.webkit.org/show_bug.cgi?id=29648
. This bug seems like the right place to fix it.
Robert Hogan
Comment 14
2012-12-27 10:23:24 PST
Created
attachment 180809
[details]
Patch
Eric Seidel (no email)
Comment 15
2012-12-27 10:38:48 PST
Comment on
attachment 180809
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180809&action=review
> Source/WebCore/rendering/RenderBlockLineLayout.cpp:3085 > + } else if (blockStyle->autoWrap() && !width.fitsOnLine() && !width.committedWidth()) > + // If the container autowraps but the current child does not then we still need to ensure that it > + // wraps and moves below any floats. > + width.fitBelowFloats();
I believe the "official" style is to wrap such blocks in {}, even though some of the lines are only comments. Sad that check-webkit-style doesn't enforce this.
Robert Hogan
Comment 16
2012-12-27 14:45:09 PST
Created
attachment 180822
[details]
Patch
Dave Hyatt
Comment 17
2013-01-02 11:08:42 PST
Comment on
attachment 180822
[details]
Patch r=me
WebKit Review Bot
Comment 18
2013-01-02 12:19:35 PST
Comment on
attachment 180822
[details]
Patch Clearing flags on attachment: 180822 Committed
r138630
: <
http://trac.webkit.org/changeset/138630
>
WebKit Review Bot
Comment 19
2013-01-02 12:19:39 PST
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