diff options
Diffstat (limited to 'components/layout/context.rs')
-rw-r--r-- | components/layout/context.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs index cb5b9efb0ef..b8d7c8680df 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -18,6 +18,7 @@ use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResp use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder}; use parking_lot::RwLock; use servo_url::ServoUrl; +use std::borrow::Borrow; use std::cell::{RefCell, RefMut}; use std::collections::HashMap; use std::hash::BuildHasherDefault; @@ -88,6 +89,12 @@ pub struct SharedLayoutContext { BuildHasherDefault<FnvHasher>>>>, } +impl Borrow<SharedStyleContext> for SharedLayoutContext { + fn borrow(&self) -> &SharedStyleContext { + &self.style_context + } +} + pub struct LayoutContext<'a> { pub shared: &'a SharedLayoutContext, cached_local_layout_context: Rc<LocalLayoutContext>, |