Closed Bug 1600237 Opened 5 years ago Closed 5 years ago

CSS transform: translateX causes abnormal letter spacing

Categories

(Core :: Graphics: WebRender, defect, P2)

72 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1555376
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)

Attached file test.html (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

  1. open the test.html

Actual results:

Abnormal letter spacing in boxes b and c.

Expected results:


Sorry for my bad English.

Attached image Screenshots.png (deleted) —

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=lsalzman

Differential 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

Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Regressed by: 1575258
Flags: needinfo?(aosmond)
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

Reproduces on Linux. It appears that my fix for bug 1555376 does not fix this problem.

Assignee: nobody → aosmond
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 10 → All
Priority: -- → P2
Hardware: x86_64 → All

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.

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.

Flags: needinfo?(aosmond)

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.

Should be fixed as of build 20191201093732. Please please reopen if you still have similar issues.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: