Move image fetching methods to SharedLayoutContext.

This commit is contained in:
Ms2ger 2016-08-23 16:13:23 +02:00
parent f863a7c317
commit 0cb0c6bc4e
3 changed files with 16 additions and 14 deletions

View file

@ -370,7 +370,7 @@ impl ImageFragmentInfo {
pub fn new<N: ThreadSafeLayoutNode>(node: &N, url: Option<Url>,
layout_context: &LayoutContext) -> ImageFragmentInfo {
let image_or_metadata = url.and_then(|url| {
layout_context.get_or_request_image_or_meta(url, UsePlaceholder::Yes)
layout_context.shared.get_or_request_image_or_meta(url, UsePlaceholder::Yes)
});
let (image, metadata) = match image_or_metadata {