stylo: Support font-variation-settings

This commit is contained in:
Manish Goregaokar 2017-05-23 18:15:47 -07:00 committed by Manish Goregaokar
parent dd1cc6bb45
commit 9ed5a7a05e
6 changed files with 259 additions and 117 deletions

View file

@ -2196,7 +2196,8 @@ pub mod root {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct FontVariation {
pub _bindgen_opaque_blob: [u32; 2usize],
pub mTag: u32,
pub mValue: f32,
}
#[test]
fn bindgen_test_layout_FontVariation() {
@ -2207,6 +2208,17 @@ pub mod root {
concat ! (
"Alignment of " , stringify ! ( FontVariation )
));
assert_eq! (unsafe {
& ( * ( 0 as * const FontVariation ) ) . mTag as *
const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! (
FontVariation ) , "::" , stringify ! ( mTag ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const FontVariation ) ) . mValue as
* const _ as usize } , 4usize , concat ! (
"Alignment of field: " , stringify ! (
FontVariation ) , "::" , stringify ! ( mValue )
));
}
impl Clone for FontVariation {
fn clone(&self) -> Self { *self }