1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibWeb: Add class to represent "list of available images" from HTML spec

This commit is contained in:
Andreas Kling 2023-05-11 06:12:45 +02:00
parent 596eabe9e6
commit 9281bf7a01
6 changed files with 158 additions and 0 deletions

View file

@ -474,6 +474,9 @@ public:
void set_salvageable(bool value) { m_salvageable = value; };
HTML::ListOfAvailableImages& list_of_available_images();
HTML::ListOfAvailableImages const& list_of_available_images() const;
protected:
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
@ -639,6 +642,9 @@ private:
// NOTE: This is a cache to make finding the first <base href> element O(1).
JS::GCPtr<HTML::HTMLBaseElement const> m_first_base_element_with_href_in_tree_order;
// https://html.spec.whatwg.org/multipage/images.html#list-of-available-images
OwnPtr<HTML::ListOfAvailableImages> m_list_of_available_images;
};
template<>