Avoid dropping image requests on the ground from non-script-initiated reflow.

This commit is contained in:
Josh Matthews 2016-12-29 14:07:57 -05:00
parent 541ecbfe21
commit 980eb5ac33
6 changed files with 96 additions and 47 deletions

View file

@ -343,9 +343,10 @@ pub mod utils {
pub fn request_image_from_cache(window: &Window, url: ServoUrl) -> ImageResponse {
let image_cache = window.image_cache_thread();
//XXXjdm add a image cache mode that doesn't store anything for NotRequested?
let response =
image_cache.find_image_or_metadata(url.into(), UsePlaceholder::No);
image_cache.find_image_or_metadata(url.into(),
UsePlaceholder::No,
CanRequestImages::No);
match response {
Ok(ImageOrMetadataAvailable::ImageAvailable(image)) =>
ImageResponse::Loaded(image),