mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
parent
4a97d6f4a0
commit
19ddfd57d5
1 changed files with 3 additions and 1 deletions
|
@ -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(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue