LibWeb: Add support for fetching SVG use elements from external docs

This allows SVG elements to refer to elements which are in other
documents, such as https://www.neogaf.com/forums/gaming-discussion.2/
or on lemmy.ml

Fixes: #141
Progress towards: #350
This commit is contained in:
Shannon Booth 2024-07-28 02:34:05 +12:00 committed by Andreas Kling
commit 85e8e7ec23
Notes: github-actions[bot] 2024-08-05 09:27:54 +00:00
2 changed files with 65 additions and 17 deletions

View file

@ -57,15 +57,20 @@ private:
JS::GCPtr<DOM::Element> referenced_element();
void fetch_the_document(URL::URL const& url);
bool is_referrenced_element_same_document() const;
void clone_element_tree_as_our_shadow_tree(Element* to_clone);
bool is_valid_reference_element(Element const& reference_element) const;
Optional<float> m_x;
Optional<float> m_y;
Optional<FlyString> m_referenced_id;
URL::URL m_href;
JS::GCPtr<DOM::DocumentObserver> m_document_observer;
JS::GCPtr<HTML::SharedImageRequest> m_image_request;
Optional<DOM::DocumentLoadEventDelayer> m_load_event_delayer;
};
}