Closed Bug 1590839 Opened 5 years ago Closed 3 years ago

Background is not clipped appropriately when using -webkit-background-clip: text and background-attachment: fixed on animated gif background

Categories

(Core :: Web Painting, defect, P3)

69 Branch
defect

Tracking

()

RESOLVED FIXED
Webcompat Priority revisit

People

(Reporter: ksenia, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files, 2 obsolete files)

Attached file 42577.html (obsolete) —

As reported here https://github.com/webcompat/web-bugs/issues/42577

Steps to reproduce: in Firefox open https://codepen.io/FlorinPop17/full/eYYdQKz and observe behavior

Expected:
Text appears on top of the image

Actual:
Can't see the text

I've attached a reduced test case as well

Aslo if I remove background-attachment: fixed from .text-to-life element, the text appears.

Version: 70 Branch → 69 Branch
Priority: -- → P3

I think the testcase can be reduced some more. I'll try that now.

Attached file reduced testcase

The issue seems to be that -webkit-background-clip: text; is ignored if the background image is both an animated gif and fixed. Changing the background image to a png or to a gradient makes the bug disappear.

Attachment #9103650 - Attachment is obsolete: true
Summary: Text stays invisible when using -webkit-background-clip: text and -webkit-text-fill-color: rgba(0, 0, 0, 0) → Background is not clipped appropriately when using -webkit-background-clip: text and background-attachment: fixed on animated gif background

hmm I've tried changing the image to be jpg or png, the text did not appear. So it's probably doesn't matter if the image is animated?

Attached file kittens (obsolete) —
Attached file kittens.html
Attachment #9103980 - Attachment is obsolete: true

Oh, I see, I think in my testcase it mattered because I had removed the background-size: cover. But with background-size: cover, it no longer matters whether the image is animated.

That implicates this code in nsDisplayBackgroundImage::CanOptimizeToImageLayer and indicates that ImageLayer creation is at fault somehow.

Webcompat Priority: ? → revisit
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
No longer blocks: fixed-by-webrender
Depends on: fixed-by-webrender
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: