Closed Bug 1407652 Opened 7 years ago Closed 7 years ago

wr-text: fix quirks shadows

Categories

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

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox58 --- affected

People

(Reporter: Gankra, Assigned: Gankra)

References

Details

(Whiteboard: [wr-mvp])

Attachments

(1 file)

Attached image live-example.png
== layout/reftests/text-shadow/decorations-multiple-zorder.html layout/reftests/text-shadow/decorations-multiple-zorder-ref.html

== layout/reftests/text-shadow/quirks-decor-noblur.html layout/reftests/text-shadow/quirks-decor-noblur-ref.html

== layout/reftests/text-shadow/standards-decor-noblur.html layout/reftests/text-shadow/standards-decor-noblur-ref.html



Not totally sure what's going on here...
Whiteboard: [wr-mvp] [triage]
jfkthame, do you have any idea what these tests are about? Webrender and Chrome (macos) appear to agree on the result perfectly, so I don't know what gecko is trying to support here.
Flags: needinfo?(jfkthame)
Priority: -- → P3
Whiteboard: [wr-mvp] [triage] → [wr-reserve]
Comparing how standards-decor-noblur.html appears in Firefox and Chrome on macOS, it looks to me like Chrome is rendering all the decoration lines (both the "original" and all the shadows) behind all the text (again, including all its shadows), whereas Firefox renders each shadow (of text and decoration) in a separate layer.

The Firefox result seems much more reasonable to me: it's natural (IMO) to regard the text and its underline as a single layer in the rendering, and each shadow is a shadow of that complete layer, so there's no way the multiple colored shadows (each being a single shadow of the complete text+underline) should be interleaved.

To take a reduced example, consider

data:text/html,<u style="font:99px serif;color:red;text-shadow:black 10px 20px 5px">test

In Firefox, the red text+underline is clearly all "in front of" its black shadow, whereas in Chrome, the shadow of the text falls over the underline, which looks bizarre/wrong.
Flags: needinfo?(jfkthame)
Oh woah yeah you're right chrome is acting totally bogus here. The lots of shadows made it hard for me to focus on what's happening here.

The bug is in webrender's handling on non-blurred shadows (it takes a seperate fast path). If you add a minimal blur you get the right result.
Depends on: 1407213
Fixed upstream, merged.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Priority: P3 → P1
Assignee: nobody → a.beingessner
Whiteboard: [wr-reserve] → [wr-mvp]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: