Open Bug 1440639 Opened 6 years ago Updated 2 years ago

Link underlines suffer from format inconsistency in Simplify Page

Categories

(Toolkit :: Printing, defect, P3)

60 Branch
defect

Tracking

()

Tracking Status
firefox60 --- affected

People

(Reporter: bmaris, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 1 obsolete file)

[Affected versions]: 
- 60.0a1(2018-02-22)

[Affected platforms]:
- Ubuntu 16.04 (x86 and x64)
- Ubuntu 14.04 x64
- Windows 10 x64

[Steps to reproduce]:
1. Launch Firefox
2. Go to any site that contain many links (eg. wikipedia)
3. Print Preview the page and click on the Simplify Page button
4. Observe the links underline

[Expected result]:
- The underlines have the same standard format on the entire page, for all links.

[Actual result]:
- The underlines are not uniform displayed (some are too thick, others are slightly overlapping the link text).

[Regression range]:
- Not a regression, I was able to reproduce this issue on old Nightly from 2016-07-12 as well (where the feature was first introduced).

[Additional notes]:
- This behaviour is visible despite the scale and the orientation settings
- Note that the affected links are noticeable when Print to file, but when print on paper, some of the affected links are printed correctly (not all of them though).
- Here is a screenshot showing the issue: https://goo.gl/3ifxpx
Screenshot of preview using simplify page scaled to shrink to fit
Screenshot of preview using simplify page scaled to 150%
Screenshot of preview using simplify page scaled to shrink to fit but zoomed in
Screenshot of preview using simplify page scaled to shrink to fit but zoomed in
Attachment #8954915 - Attachment is obsolete: true
Simplify page printout scaled to shrink to fit
Simplify page printout scaled to 150%
I decided to run a quick investigation about this and here's what I found. Maybe it can help us track the real problem down the road.

Issue: underlining is not displayed uniformly (some are too thick, others slightly overlap above link text). See attachment #8954912 [details].

Caveat: if we set the scale factor to 150%, underling is displayed uniformly, as well as if we zoom in the preview when in shrink to fit scale. See attachment #8954914 [details] and attachment #8954916 [details].

Resulting printouts: Attachment #8954918 [details] is a printout using shrink to fit scale, and attachment #8954919 [details] scaled to 150%. Both of them are rendered correctly, with no discrepancies related to how underlining is displayed/rendered (at least on my system).

Mike, any thoughts?
Flags: needinfo?(mconley)
I've going to tentatively forward this to jfkthame who might know a bit more about text rendering here (although I'm not 100% sure the underline falls exactly within that realm).
Flags: needinfo?(mconley) → needinfo?(jfkthame)
I'm guessing that the issue here arises because in the print preview / simplify view, we're not snapping text baselines and/or underline rects to device pixels, as we normally do for HTML content. Then the thickness of the line once it gets rasterized, and its exact distance from the text, may vary depending where the "ideal" shape happens to fall on the device pixel grid.

In normal HTML layout, we try to snap text baselines (and, IIRC, text decoration lines) to the device pixel grid so as to avoid such irregularities. I'm not sure offhand what's different about the Simplify Page view, such that this doesn't happen, but that's what it looks like in the screenshots.
Flags: needinfo?(jfkthame)
Just so we're clear, this bug only affects Simplify Page, and not normal Print Preview?
Flags: needinfo?(mlongaray)
Priority: -- → P3
(In reply to Mike Conley (:mconley) (:⚙️) (PTO - back May 7) from comment #10)
> Just so we're clear, this bug only affects Simplify Page, and not normal
> Print Preview?

From what I tested, yes. It only affects Simplify Page.
Flags: needinfo?(mlongaray)
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: