Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts.

This commit is contained in:
Simon Sapin 2017-10-14 00:03:57 +02:00
parent 4c5d6fd834
commit b505c9e948
13 changed files with 63 additions and 3 deletions

View file

@ -24,6 +24,10 @@ use style::properties::ComputedValues;
use style::values::Either;
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
#[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for MulticolFlow {}
#[repr(C)]
pub struct MulticolFlow {
pub block_flow: BlockFlow,
@ -32,6 +36,10 @@ pub struct MulticolFlow {
pub column_pitch: Au,
}
#[allow(unsafe_code)]
unsafe impl ::flow::HasBaseFlow for MulticolColumnFlow {}
#[repr(C)]
pub struct MulticolColumnFlow {
pub block_flow: BlockFlow,
}