1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:18:11 +00:00

LibWeb: Update HTML image loading algorithm with null checks from spec

The spec has been updated to fix the missing null checks we found:
8f3d1fc6d1
This commit is contained in:
Andreas Kling 2023-06-11 06:53:40 +02:00
parent 2b89020b6c
commit 2e9b12d327
3 changed files with 29 additions and 31 deletions

View file

@ -37,9 +37,6 @@ public:
AK::URL const& current_url() const;
void set_current_url(AK::URL);
// https://html.spec.whatwg.org/multipage/images.html#abort-the-image-request
void abort(JS::Realm&);
[[nodiscard]] RefPtr<DecodedImageData const> image_data() const;
void set_image_data(RefPtr<DecodedImageData const>);
@ -52,6 +49,7 @@ public:
// https://html.spec.whatwg.org/multipage/images.html#prepare-an-image-for-presentation
void prepare_for_presentation(HTMLImageElement&);
[[nodiscard]] JS::GCPtr<Fetch::Infrastructure::FetchController> fetch_controller();
void set_fetch_controller(JS::GCPtr<Fetch::Infrastructure::FetchController>);
private:
@ -80,4 +78,7 @@ private:
JS::Handle<Fetch::Infrastructure::FetchController> m_fetch_controller;
};
// https://html.spec.whatwg.org/multipage/images.html#abort-the-image-request
void abort_the_image_request(JS::Realm&, ImageRequest*);
}