style: Make the will-change bitfield use cbindgen.

Differential Revision: https://phabricator.services.mozilla.com/D23414
This commit is contained in:
Emilio Cobos Álvarez 2019-03-18 18:08:08 +00:00
parent 6e2643c636
commit 01e0f37861
4 changed files with 14 additions and 33 deletions

View file

@ -555,9 +555,8 @@ impl WillChange {
bitflags! {
/// The change bits that we care about.
///
/// These need to be in sync with NS_STYLE_WILL_CHANGE_*.
#[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue)]
#[repr(C)]
pub struct WillChangeBits: u8 {
/// Whether the stacking context will change.
const STACKING_CONTEXT = 1 << 0;
@ -616,7 +615,7 @@ impl Parse for WillChange {
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<WillChange, ParseError<'i>> {
) -> Result<Self, ParseError<'i>> {
if input
.try(|input| input.expect_ident_matching("auto"))
.is_ok()