mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
LibWeb: Use a separate class for shared image requests
As it turns out, making everyone piggyback on HTML::ImageRequest had some major flaws, as HTMLImageElement may decide to abort an ongoing fetch or wipe out image data, even when someone else is using the same image request. To avoid this issue, this patch introduces SharedImageRequest, and then implements ImageRequest on top of that. Other clients of the ImageRequest API are moved to SharedImageRequest as well, and ImageRequest is now only used by HTMLImageElement. This fixes an issue with image data disappearing and leading to asserts and/or visually absent images.
This commit is contained in:
parent
cdec23a68c
commit
34591ff3d9
11 changed files with 287 additions and 174 deletions
|
@ -80,7 +80,7 @@ private:
|
|||
|
||||
RefPtr<DecodedImageData const> image_data() const;
|
||||
|
||||
RefPtr<ImageRequest> m_image_request;
|
||||
RefPtr<SharedImageRequest> m_image_request;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue