diff options
Diffstat (limited to 'components/shared/script_layout/lib.rs')
-rw-r--r-- | components/shared/script_layout/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index a09e0fcf1aa..3279f993820 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -40,6 +40,7 @@ use servo_url::{ImmutableOrigin, ServoUrl}; use style::animation::DocumentAnimationSet; use style::data::ElementData; use style::dom::OpaqueNode; +use style::media_queries::Device; use style::properties::style_structs::Font; use style::properties::PropertyId; use style::selector_parser::PseudoElement; @@ -179,6 +180,10 @@ pub trait Layout { /// Handle a a single mesasge from the FontCacheThread. fn handle_font_cache_msg(&mut self); + /// Get a reference to this Layout's Stylo `Device` used to handle media queries and + /// resolve font metrics. + fn device<'a>(&'a self) -> &'a Device; + /// Whether or not this layout is waiting for fonts from loaded stylesheets to finish loading. fn waiting_for_web_fonts_to_load(&self) -> bool; |