Closed Bug 1153694 Opened 8 years ago Closed 7 years ago

background-attachment:fixed on scrolled elements causes too much layerization


(Core :: Layout, defect)

Not set



Tracking Status
firefox40 --- affected
firefox49 --- fixed


(Reporter: mstange, Assigned: mstange)



(Keywords: regression)


(2 files, 1 obsolete file)

This is a regression from bug 1148855.

It can be seen on , where the h1 and address elements at the top have a fixed background image. It causes the whole text content of the page to be lifted into a new layer above the one that contains the white background + blue border.

We should detect that the fixed background has a clip with respect to the scrolled content, and not block layer merging for things outside that clip.
Markus, did anything ever happen with this? I encounter this quite a lot when investigating android OOMs. Though not specifically with background-attachment:fixed, just with anything with a different AGR. We often end up doubling our texture usage for the sake of a tiny bit of moving text.

I must admit I'm not really sure how, why, or how often these things are clipped. I fear rarely. But especially in circumstances where there is no clip, we might want to think twice about creating a new layer for an unclipped AGR. The problem is of course it's hard to know half way through a display list what is the right call.
Flags: needinfo?(mstange)
This particular bug hasn't been fixed yet - and it's specifically about background-attachment:fixed.
We can talk about ways to reduce our memory usage on IRC tomorrow, if you want. The current code tries to layerize just as much as is required for correct APZ scrolling.
Flags: needinfo?(mstange)
Attached patch test (obsolete) — Splinter Review
Comment on attachment 8759389 [details]
Bug 1153694 - Don't let nsDisplayFixedPosition cause unnecessary layerization around itself.
Attachment #8759389 - Flags: review?(matt.woodrow) → review+
Pushed by
Don't let nsDisplayFixedPosition cause unnecessary layerization around itself. r=mattwoodrow
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
hey, this caused some tscrollx wins in talos on windows:
Cool! Not really sure why though. Either I introduced a bug or we were doing something really stupid before.
Assignee: nobody → mstange
Attachment #8759334 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.