mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
Avoid dropping image requests on the ground from non-script-initiated reflow.
This commit is contained in:
parent
541ecbfe21
commit
980eb5ac33
6 changed files with 96 additions and 47 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue