Open
Bug 1347812
Opened 6 years ago
Updated 8 months ago
Consecutive percent signs arbitrarily wrap after every 6 characters (but not if there are fewer than 12 on the line)
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Core
Layout: Text and Fonts
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox55 | --- | affected |
People
(Reporter: dholbert, Unassigned)
References
Details
Attachments
(5 files)
STR: 1. Load attached testcase. EXPECTED RESULTS: Each bordered box of percent characters should be on a single line (and overflow its bordered box). ACTUAL RESULTS: The percent characters wrap after 6 characters -- but not if there are fewer than 12 characters on the line. (So anywhere up to 11 % characters will not wrap -- but 12 will wrap to two lines of 6.) This also doesn't have much to do with the available space -- if they wanted to avoid overflow, they'd need to wrap after only a few characters. Other browsers don't seem to have this odd behavior. And in Firefox, I can only reproduce this with percent characters in particular (so far). (I discovered this while playing with testcases for bug 1347808, a somewhat related bug about long strings of hyphens.)
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
(Here's a similar testcase but now using a monospace font, so that I can use an "em" div width and have it be about the same (relative to the text) on all platforms.)
Reporter | ||
Updated•6 years ago
|
Attachment #8847915 -
Attachment description: testcase 2 (using monospace) → testcase 2 (using monospace font)
Reporter | ||
Comment 3•6 years ago
|
||
Here's a variant of testcase 2 with wider divs. The line-wrapping does not change -- it's the same as in testcase 2 -- despite the fact that we could now fit more percent characters on the first line without overflow.
Reporter | ||
Updated•6 years ago
|
Attachment #8847917 -
Attachment description: testcase 2 (same as previous but with wider div) → testcase 3 (same as previous but with wider div)
Reporter | ||
Comment 4•6 years ago
|
||
And here's one more testcase the same as the previous two but with a *much* wider div. It shows that we do finally stop wrapping and lay the text out all on one line, once the whole line will definitely fit.
Reporter | ||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0) > Other browsers don't seem to have this odd behavior. And in Firefox, I can > only reproduce this with percent characters in particular (so far). Specifically: - Chrome 55 places all of the percent signs on a single line. - Edge 14 wraps the percent sign as-needed to prevent overflow (but not in odd groupings of 6 like we do -- just when they hit the edge of the container). Each of these behaviors make sense to me. Our behavior does not.
Comment 7•6 years ago
|
||
% is a special character, it's used in URL and may make the URL too long. Therefore, we treat it as breakable when it's in a long "word".
Reporter | ||
Comment 8•6 years ago
|
||
Ah, and "long word" = "12 or more consecutive characters on the same line", I suppose? That makes some sense. Though it still seems like we should break at the last % that fits rather than arbitrarily at the 6th one. *shrug*
Comment 9•6 years ago
|
||
Yeah, in older build, perhaps, pre-Gecko-1.9, we didn't break long words like file path nor URL. That caused a lot of such long words are overflown from web page and caused unexpected horizontal scrollbars. For solving that issue, we added new line break rules to break between ASCII characters too. However, it caused regressions like breaking in datetiem format, smilies, etc. Therefore, we backed out a part of the new break rules from "near" start and end from a word. That's length is 6. Therefore, 12 becomes a magic number, perhaps.
Updated•6 years ago
|
Priority: -- → P3
Updated•8 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•