Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
BorisChiou authored and emilio committed Oct 9, 2019
1 parent 4a97d6f commit 19ddfd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/style/values/specified/box.rs
Expand Up @@ -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(),
};

Expand Down

0 comments on commit 19ddfd5

Please sign in to comment.