Unstyled spans are not layout-neutral in justified text / justification algorithm is span-dependent
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: rbucata, Unassigned, NeedInfo)
References
(Regression, )
Details
(Keywords: regression, Whiteboard: [webcompat-source:web-bugs])
Attachments
(1 file)
1.89 KB,
text/html
|
Details |
Environment:
Operating system: Windows 10
Firefox version: Firefox 128.0
Steps to reproduce:
- Navigate to: https://jsfiddle.net/vwLso5b8/8/
- Observe the console output
The glitch can be hard to reproduce because text justification is only inconsistent at certain widths. In this example, in my local browser, setting the container to 410px did it. However, if the problem is not apparent, just remove the fixed width and drag to resize the window for a bit and it'll eventually pop up.
It's also hard to pinpoint what's wrong because changing CSS (font-size, white-space, word-break, font-kerning etc.) will seemingly fix it. However, you'll soon realize that it's not really fixed, it's just that the text has repositioned and will now break at a different width. Nothing that I tried solved it definitively, although sometimes it took longer for the problem to manifest.
I suspect it's something in the text justification algorithm.
Expected Behavior:
The text is rendered correctly
Actual Behavior:
The text is rendered broken
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in Firefox Nightly, and Firefox Release
- Does not reproduce in Chrome
Created from https://github.com/webcompat/web-bugs/issues/139946
Reporter | ||
Updated•1 month ago
|
Comment 1•1 month ago
|
||
First regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6592c05a4bb2&tochange=8fd4e3a06f17
Regressed by: Bug 1063857
Second regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=8917a7a6d54fee4a13cc9229380e148615b22779&tochange=5a6f372f62c150b9263a1a59377a352284b35114
Regressed by: Bug 1071816
Updated•1 month ago
|
Comment 2•1 month ago
|
||
The regressor attribution to bug 1071816 doesn't make sense, unless the code for bug 1071816 is somehow very, very broken:
Bug 1071816 is about character encoding and only for file:
URLs. The bug description here suggests a layout-level glitch on a Web site (not file:
). I took a look at the code that landed for bug 1071816, and it looks very, very unlikely that it could have caused the kind of brokenness described here.
Comment 3•1 month ago
|
||
:xidorn, since you are the author of the regressor, bug 1063857, could you take a look?
For more information, please visit BugBot documentation.
Comment 4•1 month ago
|
||
Added some resizing so the bug is seen clearly.
Comment 5•1 month ago
|
||
This is clearly a bug, but it's hard to justify making it more than S3 given how long-standing it is. The justification algorithm is described here and was introduced in bug 1063857 (not surprising).
If Xidorn had time to take a look it'd be amazing, of course. cc'ing Jonathan who might be familiar with that code as well, and fixing up the title :)
Updated•25 days ago
|
Description
•