From 19ddfd57d5d43e128235a5e93a33b2ec3aeae9c4 Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Mon, 30 Sep 2019 21:52:30 +0000 Subject: [PATCH] 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 --- components/style/values/specified/box.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index cec3f4092f2..fd4ff6f8b18 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -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(), };