Open Bug 1734343 Opened 3 years ago Updated 2 years ago

The text in the sidebar tree is displayed as grayscale AA instead of subpixel AA.

Categories

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

All
Windows 10
defect

Tracking

()

Webcompat Priority P2
Tracking Status
thunderbird_esr102 --- wontfix
firefox-esr91 --- wontfix
firefox-esr102 --- wontfix
firefox95 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix

People

(Reporter: alice0775, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: intl, nightly-community, regression)

Since WebRender is the default

Steps to reproduce:

  1. Open Sidebar

Actual Results:
The text in the sidebar tree is displayed as grayscale AA instead of subpixel AA.

Expected Results:
Should be subpixel AA.

Is this a recent regression? Or just caused by the fact that we force WebRender on now?

Not a recent regression.
Even if in Firefox 68, the issue appears if WebRender is enabled.

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → N/A
Flags: needinfo?(jmathies)
Priority: -- → P3

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies)

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: N/A → S4
Flags: needinfo?(jmathies)

Putting this on the list for the next WebCompat triage meeting. We have received a report on webcompat.com about Discord, where this rendering difference makes CJK characters harder to read. The reporter in that report has provided a lot of additional detail, including references to a popular fallback font as an alternative to what Microsoft is shipping per default.

If this is making text harder to read for a lot of people, P3/S4 probably isn't appropriate here.

Webcompat Priority: --- → ?

Setting this as P2 as there may be a lot of sites affected by this.

Hi Jonathan, wonder if you have thoughts on this? There is some analysis in the webcompat report https://github.com/webcompat/web-bugs/issues/104574 with more details.

Webcompat Priority: ? → P2
Flags: needinfo?(jfkthame)

(In reply to Ksenia Berezina [:ksenia] from comment #7)

Setting this as P2 as there may be a lot of sites affected by this.

Hi Jonathan, wonder if you have thoughts on this? There is some analysis in the webcompat report https://github.com/webcompat/web-bugs/issues/104574 with more details.

lsalzman, jfk suggests you might know better

Flags: needinfo?(jfkthame) → needinfo?(lsalzman)

Glenn, ideas?

Flags: needinfo?(lsalzman) → needinfo?(gwatson)

This is because the sidebar hits a fallback path in Gecko and gets drawn as a blob image, which doesn't support subpixel AA (as far as I know).

The correct solution to this is to change Gecko to not hit the fallback path here - I'm not sure what's involved in that or how much work it is. Perhaps Jeff might know. Also including Bob, as a note to discuss who might be able to work on this.

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(gwatson)
Flags: needinfo?(bhood)

Pulling in Nical for any insights, since he has worked on Blob images and is also currently looking into AA.

Flags: needinfo?(bhood) → needinfo?(nical.bugzilla)

Two orthogonal things here, let's look at the side bar first.

Without digging too much, it looks like the side bar mostly uses rather simple primitives already supported by webrender. A quick dump of the used items show a lot of PushClipRect, PopClip, Fill, FillRect, FillGlyphs and SetTransform.
The main missing primitive is Fill with paths.

We could:

  • Reimplement nsDisplayTreeBody on top of the WebRender API instead of Moz2D (would need to figure out where the Fill primitives come from and how to render them).
  • Reimplement the side bar using CSS instead of whatever custom thing is currently using nsDisplayTreeBody (xul I guess).

Either would work although it would be good to know if we have plans to move more of the UI away from xul before embarking in re-doing nsDisplayTreeBody and other custom primitives with webrender display items (since they don't affect web content).

Probably more a matter of how important it is to have subpx AA in the side bar and who is available to do the work.

There is also possibly implementing sub-px AA text in blob images. That would, I think, only work when we are guaranteed to have an opaque background in the blob image. It's probably the case here but the motivation to invest resource in the blob image code tends to be rather low because we'd like to phase that code path out over time and it does not affect the majority of web content.

Setting this as P2 as there may be a lot of sites affected by this.

I think that multiple issues are conflated in this bug.

The case of the side bar is special because it is drawn using different code paths from actual websites. Fixing the side bar is independent form the long tail of cases where parts of websites don't have sub-px aa, most of which is not related to blob images.

I suggest removing the webcompat priority from this bug and filing website-specific bugs about missing sub-px AA as the work will be different.
I looked at discord and the text does not appear to be drawn via blob images.

Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.