diff options
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Window.cpp | 12 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Window.h | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Window.cpp b/Userland/Libraries/LibWeb/DOM/Window.cpp index e3d54f8092..52a7f7f875 100644 --- a/Userland/Libraries/LibWeb/DOM/Window.cpp +++ b/Userland/Libraries/LibWeb/DOM/Window.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -40,20 +40,20 @@ void Window::set_wrapper(Badge<Bindings::WindowObject>, Bindings::WindowObject& m_wrapper = wrapper.make_weak_ptr(); } -void Window::alert(const String& message) +void Window::alert(String const& message) { if (auto* page = this->page()) page->client().page_did_request_alert(message); } -bool Window::confirm(const String& message) +bool Window::confirm(String const& message) { if (auto* page = this->page()) return page->client().page_did_request_confirm(message); return false; } -String Window::prompt(const String& message, const String& default_) +String Window::prompt(String const& message, String const& default_) { if (auto* page = this->page()) return page->client().page_did_request_prompt(message, default_); @@ -118,7 +118,7 @@ i32 Window::request_animation_frame(JS::FunctionObject& callback) static double fake_timestamp = 0; i32 link_id = GUI::DisplayLink::register_callback([handle = make_handle(&callback)](i32 link_id) { - auto& function = const_cast<JS::FunctionObject&>(static_cast<const JS::FunctionObject&>(*handle.cell())); + auto& function = const_cast<JS::FunctionObject&>(static_cast<JS::FunctionObject const&>(*handle.cell())); auto& vm = function.vm(); fake_timestamp += 10; [[maybe_unused]] auto rc = vm.call(function, JS::js_undefined(), JS::Value(fake_timestamp)); @@ -137,7 +137,7 @@ void Window::cancel_animation_frame(i32 id) GUI::DisplayLink::unregister_callback(id); } -void Window::did_set_location_href(Badge<Bindings::LocationObject>, const URL& new_href) +void Window::did_set_location_href(Badge<Bindings::LocationObject>, URL const& new_href) { auto* frame = document().browsing_context(); if (!frame) diff --git a/Userland/Libraries/LibWeb/DOM/Window.h b/Userland/Libraries/LibWeb/DOM/Window.h index 1645deb26a..054ed289b2 100644 --- a/Userland/Libraries/LibWeb/DOM/Window.h +++ b/Userland/Libraries/LibWeb/DOM/Window.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -36,12 +36,12 @@ public: Page* page(); Page const* page() const; - const Document& document() const { return m_document; } + Document const& document() const { return m_document; } Document& document() { return m_document; } - void alert(const String&); - bool confirm(const String&); - String prompt(const String&, const String&); + void alert(String const&); + bool confirm(String const&); + String prompt(String const&, String const&); i32 request_animation_frame(JS::FunctionObject&); void cancel_animation_frame(i32); @@ -53,11 +53,11 @@ public: int inner_width() const; int inner_height() const; - void did_set_location_href(Badge<Bindings::LocationObject>, const URL& new_href); + void did_set_location_href(Badge<Bindings::LocationObject>, URL const& new_href); void did_call_location_reload(Badge<Bindings::LocationObject>); Bindings::WindowObject* wrapper() { return m_wrapper; } - const Bindings::WindowObject* wrapper() const { return m_wrapper; } + Bindings::WindowObject const* wrapper() const { return m_wrapper; } void set_wrapper(Badge<Bindings::WindowObject>, Bindings::WindowObject&); @@ -69,7 +69,7 @@ public: CSS::Screen& screen() { return *m_screen; } - const Event* current_event() const { return m_current_event; } + Event const* current_event() const { return m_current_event; } void set_current_event(Event* event) { m_current_event = event; } private: |