summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/XHR/ProgressEvent.h
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-09-25 18:08:29 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-01 21:05:32 +0100
commit4878a18ee7ebe0c9d50880f804bd2dc22b1c751c (patch)
treea4a2980f80d1258edb09ee55f01c3c378fb9cb9c /Userland/Libraries/LibWeb/XHR/ProgressEvent.h
parent6a103527122592501c9f86283a2abf70bd828d56 (diff)
downloadserenity-4878a18ee7ebe0c9d50880f804bd2dc22b1c751c.zip
LibWeb: Remove unecessary dependence on Window from Fetch, XHR, FileAPI
These classes only needed Window to get at its realm. Pass a realm directly to construct Fetch, XMLHttpRequest and FileAPI classes.
Diffstat (limited to 'Userland/Libraries/LibWeb/XHR/ProgressEvent.h')
-rw-r--r--Userland/Libraries/LibWeb/XHR/ProgressEvent.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/XHR/ProgressEvent.h b/Userland/Libraries/LibWeb/XHR/ProgressEvent.h
index 1289c23621..e5d633920e 100644
--- a/Userland/Libraries/LibWeb/XHR/ProgressEvent.h
+++ b/Userland/Libraries/LibWeb/XHR/ProgressEvent.h
@@ -23,10 +23,8 @@ class ProgressEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(ProgressEvent, DOM::Event);
public:
- static ProgressEvent* create(HTML::Window&, FlyString const& event_name, ProgressEventInit const& event_init);
- static ProgressEvent* create_with_global_object(HTML::Window&, FlyString const& event_name, ProgressEventInit const& event_init);
-
- ProgressEvent(HTML::Window&, FlyString const& event_name, ProgressEventInit const& event_init);
+ static ProgressEvent* create(JS::Realm&, FlyString const& event_name, ProgressEventInit const& event_init);
+ static ProgressEvent* construct_impl(JS::Realm&, FlyString const& event_name, ProgressEventInit const& event_init);
virtual ~ProgressEvent() override;
@@ -35,6 +33,8 @@ public:
u64 total() const { return m_total; }
private:
+ ProgressEvent(JS::Realm&, FlyString const& event_name, ProgressEventInit const& event_init);
+
bool m_length_computable { false };
u64 m_loaded { 0 };
u64 m_total { 0 };