Closed Bug 1458159 Opened 6 years ago Closed 6 years ago

Giving a div overflow:hidden can chop off its text's descenders in cases on Windows

Categories

(Core :: Graphics: Text, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox61 --- wontfix
firefox62 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file)

Just a spawn of bug 1406552 since that's more related to Linux and Android, while I found it also affects Windows and I found the reason on Windows and have a patch for it.
I suspect that we (at least) want some kind of rounding, so that ascent+descent is a whole number of device pixels. Whether to round each value separately or round the total and then figure out how to divide it between ascent/descent is unclear...

(Anything that changes how we compute font/line metrics has potentially far-reaching effects, as it can disturb the positioning/alignment of text in the browser UI as well as on web pages. As such, I'd be reluctant to make a change here when we're in the pre-beta freeze; it should probably be aimed at the beginning of a cycle for maximum Nightly testing time.)
Comment on attachment 8972243 [details]
Bug 1458159 - Use rounding instead of ceiling on max{Ascent,Descent} for DWriteFont.

Cancel the review request for now.

I'll revisit this after we start 62 nightly and try to fix the test failures.
Attachment #8972243 - Flags: review?(jfkthame)
Comment on attachment 8972243 [details]
Bug 1458159 - Use rounding instead of ceiling on max{Ascent,Descent} for DWriteFont.

https://reviewboard.mozilla.org/r/240912/#review251336

OK, this seems reasonable; let's try it. Thanks for looking into the tests.
Attachment #8972243 - Flags: review?(jfkthame) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5352d48512f7
Use rounding instead of ceiling on max{Ascent,Descent} for DWriteFont. r=jfkthame
Backed out for failing reftest min-intrinsic-with-percents-across-elements.html  == min-intrinsic-with-percents-across-elements-ref.html 

Push that started the failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=5352d48512f78e1dd767ce24ca6292396bb21fac

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=179463324&repo=autoland&lineNumber=4230

Backout: https://hg.mozilla.org/integration/autoland/rev/f1fe5e4c8ce5f8bab3ed63e2c751fd3a5db43a3c
Flags: needinfo?(xidorn+moz)
Tests relying on consistency of font metrics are so hard to get right cross platform /_\
So it is mostly a test bug that the reference doesn't reflect what should happen in test by adding a wrapper but lacking an corresponding rule.
Flags: needinfo?(xidorn+moz)
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1be70a3d127f
Use rounding instead of ceiling on max{Ascent,Descent} for DWriteFont. r=jfkthame
Flags: needinfo?(xidorn+moz)
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e86e1123dd47
Use rounding instead of ceiling on max{Ascent,Descent} for DWriteFont. r=jfkthame
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8eaf4eadc303
followup - Update reftest expectations in w3c-css/received/reftest.list on CLOSED TREE
https://hg.mozilla.org/mozilla-central/rev/e86e1123dd47
https://hg.mozilla.org/mozilla-central/rev/8eaf4eadc303
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Assignee: nobody → xidorn+moz
Depends on: 1475924
Depends on: 1476036
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: