mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWeb: Rename SharedImageRequest to SharedResourceRequest
For the SVG <use> element, we want to support loading HTML documents that have a SVG element inside of it pointed to by the URL fragment. In this situation we would need to fetch and parse the entire document in SharedImageRequest (so that we can still cache the SVGs). Rename SharedImageRequest to SharedResourceRequest to make the class a little more generic for future usecases.
This commit is contained in:
parent
2fb5054603
commit
a342370dfb
Notes:
github-actions[bot]
2024-08-05 09:27:38 +00:00
Author: https://github.com/shannonbooth
Commit: a342370dfb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/873
Reviewed-by: https://github.com/tcl3
18 changed files with 92 additions and 92 deletions
|
@ -12,7 +12,6 @@
|
|||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/SharedImageRequest.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -58,7 +57,7 @@ public:
|
|||
void fetch_image(JS::Realm&, JS::NonnullGCPtr<Fetch::Infrastructure::Request>);
|
||||
void add_callbacks(Function<void()> on_finish, Function<void()> on_fail);
|
||||
|
||||
SharedImageRequest const* shared_image_request() const { return m_shared_image_request; }
|
||||
JS::GCPtr<SharedResourceRequest const> shared_resource_request() const { return m_shared_resource_request; }
|
||||
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
|
@ -87,7 +86,7 @@ private:
|
|||
// which is either a struct consisting of a width and a height or is null. It must initially be null.
|
||||
Optional<Gfx::FloatSize> m_preferred_density_corrected_dimensions;
|
||||
|
||||
JS::GCPtr<SharedImageRequest> m_shared_image_request;
|
||||
JS::GCPtr<SharedResourceRequest> m_shared_resource_request;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#abort-the-image-request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue