Closed Bug 1172025 Opened 9 years ago Closed 9 years ago

will-change: scroll-position asserts: ###!!! ASSERTION: If we added nothing to our budget then this shouldn't be called., ##!!! ASSERTION: Can't modify the budget once it's been used.: '!mWillChangeBudgetCalculated'

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1103106
Tracking Status
firefox41 --- affected

People

(Reporter: mstange, Assigned: BenWa)

References

Details

Attachments

(2 files)

Setting will-change: scroll-position anywhere always causes these assertions to fire:

[13558] ###!!! ASSERTION: If we added nothing to our budget then this shouldn't be called.: 'false', file /home/mstange/code/mozilla-central/layout/base/nsDisplayList.cpp, line 1410
[13558] ###!!! ASSERTION: If we added nothing to our budget then this shouldn't be called.: 'false', file /home/mstange/code/mozilla-central/layout/base/nsDisplayList.cpp, line 1410
[13558] ###!!! ASSERTION: If we added nothing to our budget then this shouldn't be called.: 'false', file /home/mstange/code/mozilla-central/layout/base/nsDisplayList.cpp, line 1410
[13558] ###!!! ASSERTION: Can't modify the budget once it's been used.: '!mWillChangeBudgetCalculated', file /home/mstange/code/mozilla-central/layout/base/nsDisplayList.cpp, line 1379

Maybe this is the cause of bug 1111824.
We might be layerizing something too early.
mstange asked me to take a look
Flags: needinfo?(bgirard)
Attached file testcase
Reproducible
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attached file stack
Looks like this was broken by bug 1101260
Depends on: 1101260
Flags: needinfo?(bgirard) → needinfo?(dvander)
What's going on here is:
- Before we didn't query IsAnimatedGeometryRoot during display list building for the test case.
- After bug 1101260 we query IsAnimatedGeometryRoot
- To get a correct result, if we set will-change we need to check the budget but we're still building the displaylist so the budget isn't ready which catches my assertion detecting this very problem.

Looks like the optimization made in bug 1101260 is incompatible with the will-change budgeting. We knew that the will-change budget would be a big maintenance burden going in.

So possible solution:
- Have a IsMaybeAnimatedGeometryRoot. Yuk...
- Always have an AnimatedGeometryRoot if we have will-change: scroll. Not sure if we can have an AnimatedGeometryRoot without an active layer or not. If not it means that we effectively can't disable will-change: scroll if we cache IsAnimatedGeometryRoot
- Remove bug 1101260 part 1 which I doubt we want.

Maybe :roc has a suggestion?
Flags: needinfo?(roc)
IIRC we talked about this in bug 1103106 too. The will-change budgeting still looks pretty fragile to me. Making it more pessimistic or lazy would be a lot simpler.
Flags: needinfo?(dvander)
See Also: → 1103106
Yes we did, which is why it sounded so familiar. Clearing ni? as to not repeat the conversation we had in bug 1103106.
Depends on: 1103106
Flags: needinfo?(roc)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: