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'

RESOLVED DUPLICATE of bug 1103106

Status

()

Core
Layout
RESOLVED DUPLICATE of bug 1103106
3 years ago
3 years ago

People

(Reporter: mstange, Assigned: BenWa)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox41 affected)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
We might be layerizing something too early.
(Assignee)

Comment 2

3 years ago
mstange asked me to take a look
Flags: needinfo?(bgirard)
(Assignee)

Comment 3

3 years ago
Created attachment 8627880 [details]
testcase

Reproducible
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
(Assignee)

Comment 4

3 years ago
Created attachment 8627883 [details]
stack
(Assignee)

Comment 5

3 years ago
Looks like this was broken by bug 1101260
Depends on: 1101260
Flags: needinfo?(bgirard) → needinfo?(dvander)
(Assignee)

Comment 6

3 years ago
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)

Updated

3 years ago
See Also: → bug 1103106
(Assignee)

Comment 8

3 years ago
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)
(Assignee)

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1103106
You need to log in before you can comment on or make changes to this bug.