Expose Quirks Mode information in the style shared context r=emilio

This commit is contained in:
Julien Wajsberg 2016-11-29 18:32:10 +01:00
parent 9d2b98e6f8
commit d024787188
9 changed files with 58 additions and 25 deletions

View file

@ -31,6 +31,14 @@ impl ThreadLocalStyleContextCreationInfo {
}
}
#[derive(PartialEq, Eq, Copy, Clone, Hash, Debug)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub enum QuirksMode {
Quirks,
LimitedQuirks,
NoQuirks,
}
pub struct SharedStyleContext {
/// The current viewport size.
pub viewport_size: Size2D<Au>,
@ -63,6 +71,9 @@ pub struct SharedStyleContext {
/// The current timer for transitions and animations. This is needed to test
/// them.
pub timer: Timer,
/// The QuirksMode state which the document needs to be rendered with
pub quirks_mode: QuirksMode,
}
pub struct ThreadLocalStyleContext {