mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Use CustomIdent in will-change
This commit is contained in:
parent
b0392dbf39
commit
cdcc8157c6
2 changed files with 15 additions and 22 deletions
|
@ -2683,19 +2683,19 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
for feature in features.iter() {
|
||||
if feature == &atom!("scroll-position") {
|
||||
if feature.0 == atom!("scroll-position") {
|
||||
self.gecko.mWillChangeBitField |= NS_STYLE_WILL_CHANGE_SCROLL as u8;
|
||||
} else if feature == &atom!("opacity") {
|
||||
} else if feature.0 == atom!("opacity") {
|
||||
self.gecko.mWillChangeBitField |= NS_STYLE_WILL_CHANGE_OPACITY as u8;
|
||||
} else if feature == &atom!("transform") {
|
||||
} else if feature.0 == atom!("transform") {
|
||||
self.gecko.mWillChangeBitField |= NS_STYLE_WILL_CHANGE_TRANSFORM as u8;
|
||||
}
|
||||
|
||||
unsafe {
|
||||
Gecko_AppendWillChange(&mut self.gecko, feature.as_ptr());
|
||||
Gecko_AppendWillChange(&mut self.gecko, feature.0.as_ptr());
|
||||
}
|
||||
|
||||
if let Ok(prop_id) = PropertyId::parse(feature.to_string().into()) {
|
||||
if let Ok(prop_id) = PropertyId::parse(feature.0.to_string().into()) {
|
||||
match prop_id.as_shorthand() {
|
||||
Ok(shorthand) => {
|
||||
for longhand in shorthand.longhands() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue