mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Only expose longhands to rust via iterators.
The key here is that we only filter longhands if the shorthand is accessible to content and vice-versa. This prevents the bug that prevented me to land this patch before, which was us not expanding properly chrome-only shorthands. Again, this is incomplete, and I need to teach LonghandsToSerialize to get a potentially incomplete list of properties, and all that.
This commit is contained in:
parent
6fbf2c1e3c
commit
8c4b401dd3
8 changed files with 95 additions and 59 deletions
|
@ -3472,7 +3472,7 @@ fn static_assert() {
|
|||
use properties::PropertyId;
|
||||
use properties::longhands::will_change::computed_value::T;
|
||||
|
||||
fn will_change_bitfield_from_prop_flags(prop: &LonghandId) -> u8 {
|
||||
fn will_change_bitfield_from_prop_flags(prop: LonghandId) -> u8 {
|
||||
use properties::PropertyFlags;
|
||||
use gecko_bindings::structs::NS_STYLE_WILL_CHANGE_ABSPOS_CB;
|
||||
use gecko_bindings::structs::NS_STYLE_WILL_CHANGE_FIXPOS_CB;
|
||||
|
@ -3526,7 +3526,7 @@ fn static_assert() {
|
|||
if let PropertyDeclarationId::Longhand(longhand)
|
||||
= longhand_or_custom {
|
||||
self.gecko.mWillChangeBitField |=
|
||||
will_change_bitfield_from_prop_flags(&longhand);
|
||||
will_change_bitfield_from_prop_flags(longhand);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue