CSS transform: translateX causes abnormal letter spacing
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox70 | --- | unaffected |
firefox71 | --- | unaffected |
firefox72 | --- | fixed |
People
(Reporter: nayinain, Assigned: aosmond)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
- open the
test.html
Actual results:
Abnormal letter spacing in boxes b and c.
Expected results:
Sorry for my bad English.
Regression window:
2019-11-29T15:50:46: INFO : Narrowed inbound regression window from [ee2ba98f, 1e12f9b1] (3 builds) to [b4ef304c, 1e12f9b1] (2 builds) (~1 steps left)
2019-11-29T15:50:46: DEBUG : Starting merge handling...
2019-11-29T15:50:46: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=1e12f9b1812772fee75f80a38fd27b5fff8cffbc&full=1
2019-11-29T15:50:48: DEBUG : Found commit message:
Bug 1575258 - Make text rasterize, render and snap glyphs consistently. r=lsalzmanDifferential Revision: https://phabricator.services.mozilla.com/D51305
2019-11-29T15:50:48: DEBUG : Did not find a branch, checking all integration branches
2019-11-29T15:50:48: INFO : The bisection is done.
2019-11-29T15:50:48: INFO : Stopped
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Reproduces on Linux. It appears that my fix for bug 1555376 does not fix this problem.
Assignee | ||
Comment 3•5 years ago
|
||
It is related to the same problem however, because a translateX on the text < 0.5 is expected to have no impact. We have a wrench test that expects translateX 0.5 to also have no impact (that might be wrong?). I thought I needed to just snap the translation from the transform with the text offset, but that does not appear to fix the above test case.
Assignee | ||
Comment 4•5 years ago
|
||
The problem here is straightforward. I need both the snapped and unsnapped text offset in local space in the shader; currently I only have the snapped text offset. I don't have room for both in the extra parameters. I cannot calculate the snapped text offset because it ignores animated portions of transforms (the shader only has the full transforms).
However the local primitive rect for text is only informative. It is used only to adjust the glyph position by the origin of said rect less the unsnapped text position. If I simply include that in the primitive rect, and remove the calculation in the shader, then it resolves this problem. I will go with that.
Assignee | ||
Comment 5•5 years ago
|
||
I've incorporated the fix and a WR-only reftest into bug 1555376 to resolve this. The test is WR-only because it appears with non-WR we will incorporate the translation into the subpixel positioning of the glyphs, but we don't do this with WR because we want stable subpixel positions for scrolling, animations, etc.
Assignee | ||
Comment 6•5 years ago
|
||
Should be fixed as of build 20191201093732. Please please reopen if you still have similar issues.
Description
•