summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader/Resource.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-03-23 08:20:41 -0400
committerAndreas Kling <kling@serenityos.org>2022-03-23 13:44:51 +0100
commit90829fe8801ef0f27cdd67d5ce88faf0c34509c4 (patch)
tree8d8a578b031ce772d0f2e2e9e9a350a7ac73bb08 /Userland/Libraries/LibWeb/Loader/Resource.h
parenteb1d7e807688f7a8ba473aa3697f01e803d04991 (diff)
downloadserenity-90829fe8801ef0f27cdd67d5ce88faf0c34509c4.zip
LibWeb: Allow HTMLObjectElement to convert a Resource to ImageResource
HTMLObjectElement, when implemented according to the spec, does not know the resource type specified by the 'data' attribute until after it has actually loaded (i.e. it may be an image, XML document, etc.). Currently we always use ImageLoader within HTMLObjectElement to load the object, but will need to use ResourceLoader instead to generically load data. However, ImageLoader / ImageResource have image-specific functionality that HTMLObjectElement still needs if the resource turns out to be an image. This patch will allow (only) HTMLObjectElement to convert the generic Resource to an ImageResource as needed.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/Resource.h')
-rw-r--r--Userland/Libraries/LibWeb/Loader/Resource.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/Resource.h b/Userland/Libraries/LibWeb/Loader/Resource.h
index c138da0af4..ad77e9e611 100644
--- a/Userland/Libraries/LibWeb/Loader/Resource.h
+++ b/Userland/Libraries/LibWeb/Loader/Resource.h
@@ -65,6 +65,7 @@ public:
protected:
explicit Resource(Type, const LoadRequest&);
+ Resource(Type, Resource&);
private:
LoadRequest m_request;