Open Bug 1463588 Opened 6 years ago Updated 2 years ago

Will-change:transform on a non-transformable element shouldn't create a stacking context

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox62 --- affected

People

(Reporter: mattwoodrow, Unassigned)

References

Details

Attachments

(1 file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1462412#c12

I think we need to update the will-change bitflags so that NS_STYLE_WILL_CHANGE_{ABS|FIX}POS_CB and NS_STYLE_WILL_CHANGE_STACKING_CONTEXT can share that they only take effect on a transformable frame.

At the very least NS_STYLE_WILL_CHANGE_STACKING_CONTEXT added for will-change:opacity should still apply for non-transformable elements, and we need a way to distinguish the cases.
Depends on: 1462412
I don't think this matches what the will-change spec says, though.  I think it says these effects happen unconditionally.  Maybe the spec should change, though?

What do other implementations do?
"If any non-initial value of a property would create a stacking context on the element, specifying that property in will-change must create a stacking context on the element."

My interpretation of this was that a non-initial value of transform on a non-transformable element wouldn't create a stacking context, thus will-change:transform on the same element shouldn't either.
Attached file Testcase
Stealing the testcase from the other bug.

Looks like we create a stacking context here (as expected), but chrome doesn't.
Right -- sounds like this change would make us conform to the spec.  (That's good, given that you need it.)
Priority: -- → P3
I think this is higher priority given that I *think* it's equally possible as a cause of crashes like in 1462412 comment 1 (although probably less common given the properties involved).
Priority: P3 → P1
I misunderstood the conditions around the crash; this is just a bug but won't trigger crashes.
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: