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:
Emilio Cobos Álvarez 2018-02-20 12:00:31 +01:00
parent 6fbf2c1e3c
commit 8c4b401dd3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 95 additions and 59 deletions

View file

@ -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);
}
},
}