Closed Bug 1573711 Opened 5 years ago Closed 5 years ago

"text-decoration-skip-ink" doesn't interact properly with "vertical-align"

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox70 --- verified
firefox71 --- verified

People

(Reporter: dholbert, Assigned: jfkthame)

References

Details

Attachments

(4 files)

STR:

  1. Load attached testcase, with about:config pref layout.css.text-decoration-skip-ink.enabled = true

EXPECTED RESULTS:
The underline should only skip characters that are actively intersecting it.

ACTUAL RESULTS:
For the middle section (the section whose vertical-align is being animated), the underline seems to skip characters as if they had the default vertical-align value.

Note: Chrome isn't useful as a reference case here, because it ties the underline to the characters themselves rather than to the baseline of the element that adds the underline. So it exhibits a different set of ACTUAL RESULTS, though its results do have reasonable ink-skipping behavior.

I'm tentatively marking this as blocking bug 1573631 though I'm not sure it needs to.

Attached file testcase 1

This affects <sup> tags, for example, which use vertical-align: super via this html.css UA-stylesheet-rule:
https://searchfox.org/mozilla-central/rev/3366c3d24f1c3818df37ec0818833bf085e41a53/layout/style/res/html.css#549-550

In this screenshot, you can see that the superscript (2nd word) has unnecessary gaps, whereas the subscript (3rd word) has the line-decoration overlapping the partially-transparent text (not skipping as it should).

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e99be10fe186 Account for baseline offset (potential effect of vertical-align property) when computing skip-ink intercepts. r=dholbert
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → jfkthame

Comment on attachment 9089592 [details]
Bug 1573711 - Account for baseline offset (potential effect of vertical-align property) when computing skip-ink intercepts. r=dholbert

Beta/Release Uplift Approval Request

  • User impact if declined: When text-decoration-skip-ink is enabled, rendering is incorrect when vertical-align is used to shift the text baseline (e.g. superscripts/subscripts)
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple patch to pass the relevant baseline offset down to the text-decoration rendering code; no impact on anything except how the ink-skipping positions are computed. Includes automated tests.
  • String changes made/needed:
Attachment #9089592 - Flags: approval-mozilla-beta?

Comment on attachment 9089592 [details]
Bug 1573711 - Account for baseline offset (potential effect of vertical-align property) when computing skip-ink intercepts. r=dholbert

Fix for new css features which are aiming to ship in 70.
OK for uplift for beta 5.

Attachment #9089592 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Verified as fixed on Firefox Nightly 71.0a1 (2019-09-09) and on Firefox 70.0b5 on Windows 10 x64, Ubuntu 18.04 and Mac OS X 10.15.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: