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

@ -61,7 +61,7 @@ use std::sync::atomic::Ordering;
use style::atomic_refcell::AtomicRefCell;
use style::attr::AttrValue;
use style::computed_values::display;
use style::context::SharedStyleContext;
use style::context::{QuirksMode, SharedStyleContext};
use style::data::ElementData;
use style::dom::{LayoutIterator, NodeInfo, OpaqueNode, PresentationalHintsSynthetizer, TElement, TNode};
use style::dom::UnsafeNode;
@ -321,6 +321,10 @@ impl<'ld> ServoLayoutDocument<'ld> {
unsafe { self.document.will_paint(); }
}
pub fn quirks_mode(&self) -> QuirksMode {
unsafe { self.document.quirks_mode() }
}
pub fn from_layout_js(doc: LayoutJS<Document>) -> ServoLayoutDocument<'ld> {
ServoLayoutDocument {
document: doc,