Firefox breaks right-aligned text after the space when font size is very large
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: ced, Assigned: jfkthame)
References
Details
(Keywords: parity-chrome, parity-edge, regression)
Attachments
(4 files)
30.06 KB,
image/png
|
Details | |
430 bytes,
text/html
|
Details | |
1.28 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
1.71 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
Create a new html file then add this code:
<style>
h1 {
font: bold 300px sans-serif;
width: 900px;
text-align: right;
background: yellow;
}
</style>
<h1>Long title</h1>
Save and open this file in Firefox.
Actual results:
Firefox breaks the text after the first space, instead of before. The result is a miss-aligned text. It doesn't happen in other browsers.
Example: https://codepen.io/ced64k/pen/ErPgwX
Expected results:
Align all text to the right.
Comment 1•7 years ago
|
||
I can confirm the bug with Firefox 66 on windows 10
![]() |
||
Updated•7 years ago
|
![]() |
||
Comment 2•7 years ago
|
||
I can reproduce on Windows10 if font-size >=246px
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d8ca3e1c469e&tochange=20d1a5916ef6
Suspect: bug 825875
![]() |
||
Updated•7 years ago
|
![]() |
||
Updated•7 years ago
|
Assignee | ||
Comment 3•7 years ago
|
||
Wow, that's weird. The exact size where the problem kicks in also depends on the font used; it's 246px with Arial or Helvetica, but with Times [New Roman], it doesn't occur until 274px.
I'm guessing the issue may be triggered when the width of the <space> glyph becomes large enough that it no longer fits in a "simple" CompressedGlyph record in the textrun.
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 5•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7761a0f081bf
https://hg.mozilla.org/mozilla-central/rev/960911b3928c
Description
•