style: Set WillChangeBits::TRANSFORM for individual transform.

We always check StyleWillChangeBits_TRANSFORM bit together with a
transform-like property set, so using WillChangeBits::TRANSFORM bit to
represent all transform-like properties is ok.

However, it seems the new test case works well even if we don't have this
patch. I still add it for individual transform properties to make sure
the test coverage is enough anyway.

Differential Revision: https://phabricator.services.mozilla.com/D47509
This commit is contained in:
Boris Chiou 2019-09-30 21:52:30 +00:00 committed by Emilio Cobos Álvarez
parent 4a97d6f4a0
commit 19ddfd57d5

View file

@ -1153,7 +1153,9 @@ bitflags! {
fn change_bits_for_longhand(longhand: LonghandId) -> WillChangeBits {
let mut flags = match longhand {
LonghandId::Opacity => WillChangeBits::OPACITY,
LonghandId::Transform => WillChangeBits::TRANSFORM,
LonghandId::Transform | LonghandId::Translate | LonghandId::Rotate | LonghandId::Scale => {
WillChangeBits::TRANSFORM
}
_ => WillChangeBits::empty(),
};