mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Update HTML image loading algorithm for recent spec changes
Changes: 8a2375aac2
Note that we don't support the full lazy loading machinery yet, so this
isn't actually hooked up.
This commit is contained in:
parent
2e9b12d327
commit
5c07aeb78e
2 changed files with 78 additions and 47 deletions
|
@ -51,7 +51,7 @@ public:
|
|||
virtual Optional<ARIA::Role> default_role() const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#update-the-image-data
|
||||
ErrorOr<void> update_the_image_data(bool restart_the_animations = false);
|
||||
ErrorOr<void> update_the_image_data(bool restart_the_animations = false, bool maybe_omit_events = false);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#use-srcset-or-picture
|
||||
[[nodiscard]] bool uses_srcset_or_picture() const;
|
||||
|
@ -93,7 +93,7 @@ private:
|
|||
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
void handle_successful_fetch(AK::URL const&, StringView mime_type, ImageRequest&, ByteBuffer);
|
||||
void handle_successful_fetch(AK::URL const&, StringView mime_type, ImageRequest&, ByteBuffer, bool maybe_omit_events, AK::URL const& previous_url);
|
||||
void handle_failed_fetch();
|
||||
|
||||
void animate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue