diff options
Diffstat (limited to 'Userland/Libraries/LibWeb')
19 files changed, 40 insertions, 40 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp index 01d155af7e..e5568fbc29 100644 --- a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp +++ b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp @@ -128,7 +128,7 @@ JS::VM& main_thread_vm() // 5. Queue a global task on the DOM manipulation task source given global to fire an event named rejectionhandled at global, using PromiseRejectionEvent, // with the promise attribute initialized to promise, and the reason attribute initialized to the value of promise's [[PromiseResult]] internal slot. - HTML::queue_global_task(HTML::Task::Source::DOMManipulation, global, [&global, &promise]() mutable { + HTML::queue_global_task(HTML::Task::Source::DOMManipulation, global, [&global, &promise] { // FIXME: This currently assumes that global is a WindowObject. auto& window = verify_cast<HTML::Window>(global); @@ -178,12 +178,12 @@ JS::VM& main_thread_vm() }; // 8.1.5.4.2 HostEnqueueFinalizationRegistryCleanupJob(finalizationRegistry), https://html.spec.whatwg.org/multipage/webappapis.html#hostenqueuefinalizationregistrycleanupjob - vm->host_enqueue_finalization_registry_cleanup_job = [](JS::FinalizationRegistry& finalization_registry) mutable { + vm->host_enqueue_finalization_registry_cleanup_job = [](JS::FinalizationRegistry& finalization_registry) { // 1. Let global be finalizationRegistry.[[Realm]]'s global object. auto& global = finalization_registry.realm().global_object(); // 2. Queue a global task on the JavaScript engine task source given global to perform the following steps: - HTML::queue_global_task(HTML::Task::Source::JavaScriptEngine, global, [&finalization_registry]() mutable { + HTML::queue_global_task(HTML::Task::Source::JavaScriptEngine, global, [&finalization_registry] { // 1. Let entry be finalizationRegistry.[[CleanupCallback]].[[Callback]].[[Realm]]'s environment settings object. auto& entry = host_defined_environment_settings_object(*finalization_registry.cleanup_callback().callback.cell()->realm()); @@ -224,7 +224,7 @@ JS::VM& main_thread_vm() auto* script = active_script(); // NOTE: This keeps job_settings alive by keeping realm alive, which is holding onto job_settings. - HTML::queue_a_microtask(script ? script->settings_object().responsible_document().ptr() : nullptr, [job_settings, job = move(job), script_or_module = move(script_or_module)]() mutable { + HTML::queue_a_microtask(script ? script->settings_object().responsible_document().ptr() : nullptr, [job_settings, job = move(job), script_or_module = move(script_or_module)] { // The dummy execution context has to be kept up here to keep it alive for the duration of the function. Optional<JS::ExecutionContext> dummy_execution_context; diff --git a/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp b/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp index 4065ef10fa..c4199cf7fa 100644 --- a/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp +++ b/Userland/Libraries/LibWeb/DOM/AbortSignal.cpp @@ -101,7 +101,7 @@ void AbortSignal::follow(JS::NonnullGCPtr<AbortSignal> parent_signal) // 3. Otherwise, add the following abort steps to parentSignal: // NOTE: `this` and `parent_signal` are protected by AbortSignal using JS::SafeFunction. - parent_signal->add_abort_algorithm([this, parent_signal]() mutable { + parent_signal->add_abort_algorithm([this, parent_signal] { // 1. Signal abort on followingSignal with parentSignal’s abort reason. signal_abort(parent_signal->reason()); }); diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 38fb7e99b8..77cc5bf453 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1559,13 +1559,13 @@ void Document::completely_finish_loading() // 4. If container is an iframe element, then queue an element task on the DOM manipulation task source given container to run the iframe load event steps given container. if (container && is<HTML::HTMLIFrameElement>(*container)) { - container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container]() mutable { + container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container] { run_iframe_load_event_steps(static_cast<HTML::HTMLIFrameElement&>(*container)); }); } // 5. Otherwise, if container is non-null, then queue an element task on the DOM manipulation task source given container to fire an event named load at container. else if (container) { - container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container]() mutable { + container->queue_an_element_task(HTML::Task::Source::DOMManipulation, [container] { container->dispatch_event(*DOM::Event::create(container->realm(), HTML::EventNames::load)); }); } diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp index 8a90e5e7f4..5839f18e69 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp @@ -171,7 +171,7 @@ void EventTarget::add_an_event_listener(DOMEventListener& listener) // 5. If listener’s signal is not null, then add the following abort steps to it: if (listener.signal) { // NOTE: `this` and `listener` are protected by AbortSignal using JS::SafeFunction. - listener.signal->add_abort_algorithm([this, &listener]() mutable { + listener.signal->add_abort_algorithm([this, &listener] { // 1. Remove an event listener with eventTarget and listener. remove_an_event_listener(listener); }); diff --git a/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp b/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp index 0c6b162c00..606643a9ac 100644 --- a/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp +++ b/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp @@ -125,7 +125,7 @@ JS::NonnullGCPtr<JS::Promise> fetch_impl(JS::VM& vm, RequestInfo const& input, R }))); // 11. Add the following abort steps to requestObject’s signal: - request_object->signal()->add_abort_algorithm([&vm, locally_aborted, request, controller, promise_capability_handle = JS::make_handle(*promise_capability), request_object_handle = JS::make_handle(*request_object), response_object_handle]() mutable { + request_object->signal()->add_abort_algorithm([&vm, locally_aborted, request, controller, promise_capability_handle = JS::make_handle(*promise_capability), request_object_handle = JS::make_handle(*request_object), response_object_handle] { dbgln_if(WEB_FETCH_DEBUG, "Fetch: Request object signal's abort algorithm called"); auto& promise_capability = *promise_capability_handle; diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp index 127e27c195..4276238b47 100644 --- a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp @@ -260,7 +260,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> main_fetch(JS:: request->current_url().set_scheme("https"sv); } - JS::SafeFunction<WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>>()> get_response = [&realm, &vm, &fetch_params, request]() mutable -> WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> { + JS::SafeFunction<WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>>()> get_response = [&realm, &vm, &fetch_params, request]() -> WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> { dbgln_if(WEB_FETCH_DEBUG, "Fetch: Running 'main fetch' get_response() function"); // -> fetchParams’s preloaded response candidate is not null @@ -333,7 +333,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> main_fetch(JS:: // 2. Let corsWithPreflightResponse be the result of running HTTP fetch given fetchParams and true. auto cors_with_preflight_response = TRY(http_fetch(realm, fetch_params, MakeCORSPreflight::Yes)); - cors_with_preflight_response->when_loaded([returned_pending_response](JS::NonnullGCPtr<Infrastructure::Response> cors_with_preflight_response) mutable { + cors_with_preflight_response->when_loaded([returned_pending_response](JS::NonnullGCPtr<Infrastructure::Response> cors_with_preflight_response) { dbgln_if(WEB_FETCH_DEBUG, "Fetch: Running 'main fetch' cors_with_preflight_response load callback"); // 3. If corsWithPreflightResponse is a network error, then clear cache entries using request. if (cors_with_preflight_response->is_network_error()) { @@ -368,7 +368,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> main_fetch(JS:: } // 10. If recursive is false, then run the remaining steps in parallel. - Platform::EventLoopPlugin::the().deferred_invoke([&realm, &vm, &fetch_params, request, response, get_response = move(get_response)]() mutable { + Platform::EventLoopPlugin::the().deferred_invoke([&realm, &vm, &fetch_params, request, response, get_response = move(get_response)] { // 11. If response is null, then set response to the result of running the steps corresponding to the first // matching statement: auto pending_response = PendingResponse::create(vm, request, Infrastructure::Response::create(vm)); @@ -898,7 +898,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_fetch(JS::Realm& rea // HTTP-redirect fetch given fetchParams and response. response = Infrastructure::OpaqueRedirectFilteredResponse::create(vm, *actual_response); if (request->mode() == Infrastructure::Request::Mode::Navigate) { - fetch_params.controller()->set_next_manual_redirect_steps([&realm, &fetch_params, response]() mutable { + fetch_params.controller()->set_next_manual_redirect_steps([&realm, &fetch_params, response] { (void)http_redirect_fetch(realm, fetch_params, *response); }); } @@ -914,7 +914,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_fetch(JS::Realm& rea } if (inner_pending_response) { - inner_pending_response->when_loaded([returned_pending_response](JS::NonnullGCPtr<Infrastructure::Response> response) mutable { + inner_pending_response->when_loaded([returned_pending_response](JS::NonnullGCPtr<Infrastructure::Response> response) { dbgln_if(WEB_FETCH_DEBUG, "Fetch: Running 'HTTP fetch' inner_pending_response load callback"); returned_pending_response->resolve(response); }); @@ -1465,7 +1465,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet inner_pending_response = TRY_OR_IGNORE(http_network_or_cache_fetch(realm, fetch_params, IsAuthenticationFetch::Yes)); } - inner_pending_response->when_loaded([&realm, &vm, &fetch_params, request, returned_pending_response, is_authentication_fetch, is_new_connection_fetch](JS::NonnullGCPtr<Infrastructure::Response> response) mutable { + inner_pending_response->when_loaded([&realm, &vm, &fetch_params, request, returned_pending_response, is_authentication_fetch, is_new_connection_fetch](JS::NonnullGCPtr<Infrastructure::Response> response) { dbgln_if(WEB_FETCH_DEBUG, "Fetch: Running 'HTTP network-or-cache fetch' inner_pending_response load callback"); // 15. If response’s status is 407, then: if (response->status() == 407) { @@ -1515,7 +1515,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet inner_pending_response = TRY_OR_IGNORE(http_network_or_cache_fetch(realm, fetch_params, is_authentication_fetch, IsNewConnectionFetch::Yes)); } - inner_pending_response->when_loaded([returned_pending_response, is_authentication_fetch](JS::NonnullGCPtr<Infrastructure::Response> response) mutable { + inner_pending_response->when_loaded([returned_pending_response, is_authentication_fetch](JS::NonnullGCPtr<Infrastructure::Response> response) { // 17. If isAuthenticationFetch is true, then create an authentication entry for request and the given // realm. if (is_authentication_fetch == IsAuthenticationFetch::Yes) { @@ -1595,7 +1595,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> nonstandard_resource_load ResourceLoader::the().load( load_request, - [&realm, &vm, request, pending_response](auto data, auto& response_headers, auto status_code) mutable { + [&realm, &vm, request, pending_response](auto data, auto& response_headers, auto status_code) { dbgln_if(WEB_FETCH_DEBUG, "Fetch: ResourceLoader load for '{}' complete", request->url()); if constexpr (WEB_FETCH_DEBUG) log_response(status_code, response_headers, data); @@ -1610,7 +1610,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> nonstandard_resource_load // FIXME: Set response status message pending_response->resolve(response); }, - [&vm, request, pending_response](auto& error, auto status_code) mutable { + [&vm, request, pending_response](auto& error, auto status_code) { dbgln_if(WEB_FETCH_DEBUG, "Fetch: ResourceLoader load for '{}' failed: {} (status {})", request->url(), error, status_code.value_or(0)); auto response = Infrastructure::Response::create(vm); // FIXME: This is ugly, ResourceLoader should tell us. diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp index 7a4270475c..37dc4a180e 100644 --- a/Userland/Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Fetching/PendingResponse.cpp @@ -56,7 +56,7 @@ void PendingResponse::run_callback() const { VERIFY(m_callback); VERIFY(m_response); - Platform::EventLoopPlugin::the().deferred_invoke([strong_this = JS::make_handle(const_cast<PendingResponse&>(*this))]() mutable { + Platform::EventLoopPlugin::the().deferred_invoke([strong_this = JS::make_handle(const_cast<PendingResponse&>(*this))] { strong_this->m_callback(*strong_this->m_response); strong_this->m_request->remove_pending_response({}, *strong_this.ptr()); }); diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index d2e9306306..606b7d9bea 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -1142,7 +1142,7 @@ WebIDL::ExceptionOr<void> BrowsingContext::traverse_the_history(size_t entry_ind if (new_document->ready_state() == "complete"sv) { // then queue a global task on the DOM manipulation task source given newDocument's relevant global object to run the following steps: - queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document]() mutable { + queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document] { // 1. If newDocument's page showing flag is true, then abort these steps. if (new_document->page_showing()) return; @@ -1211,7 +1211,7 @@ WebIDL::ExceptionOr<void> BrowsingContext::traverse_the_history(size_t entry_ind // 20. If hashChanged is true, if (hash_changed) { // then queue a global task on the DOM manipulation task source given newDocument's relevant global object - queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document]() mutable { + queue_global_task(Task::Source::DOMManipulation, relevant_global_object(*new_document), [new_document] { // to fire an event named hashchange at newDocument's relevant global object, // using HashChangeEvent, with the oldURL attribute initialized to oldURL // and the newURL attribute initialized to newURL. @@ -1330,7 +1330,7 @@ void BrowsingContext::set_system_visibility_state(VisibilityState visibility_sta // has changed to newState, it must queue a task on the user interaction task source to update // the visibility state of all the Document objects in the top-level browsing context's document family with newState. auto document_family = top_level_browsing_context().document_family(); - queue_global_task(Task::Source::UserInteraction, Bindings::main_thread_vm().current_realm()->global_object(), [visibility_state, document_family = move(document_family)]() mutable { + queue_global_task(Task::Source::UserInteraction, Bindings::main_thread_vm().current_realm()->global_object(), [visibility_state, document_family = move(document_family)] { for (auto& document : document_family) { document->update_the_visibility_state(visibility_state); } diff --git a/Userland/Libraries/LibWeb/HTML/FormAssociatedElement.cpp b/Userland/Libraries/LibWeb/HTML/FormAssociatedElement.cpp index b983612c9f..9fe3b371ac 100644 --- a/Userland/Libraries/LibWeb/HTML/FormAssociatedElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/FormAssociatedElement.cpp @@ -103,7 +103,7 @@ void FormAssociatedElement::reset_form_owner() if (is_listed() && html_element.has_attribute(HTML::AttributeNames::form) && html_element.is_connected()) { // 1. If the first element in element's tree, in tree order, to have an ID that is identical to element's form content attribute's value, is a form element, then associate the element with that form element. auto form_value = html_element.attribute(HTML::AttributeNames::form); - html_element.root().for_each_in_inclusive_subtree_of_type<HTMLFormElement>([this, &form_value](HTMLFormElement& form_element) mutable { + html_element.root().for_each_in_inclusive_subtree_of_type<HTMLFormElement>([this, &form_value](HTMLFormElement& form_element) { if (form_element.attribute(HTML::AttributeNames::id) == form_value) { set_form(&form_element); return IterationDecision::Break; diff --git a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp index a1b4dcce09..b202a1abba 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp @@ -534,7 +534,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_ // set to source. // FIXME: "navigate" means implementing the navigation algorithm here: // https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate - hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, target]() mutable { + hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, target] { target->loader().load(url_string, FrameLoader::Type::Navigation); }); } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 952d6450e9..a719379e30 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -123,7 +123,7 @@ void HTMLInputElement::set_files(JS::GCPtr<FileAPI::FileList> files) void HTMLInputElement::update_the_file_selection(JS::NonnullGCPtr<FileAPI::FileList> files) { // 1. Queue an element task on the user interaction task source given element and the following steps: - queue_an_element_task(Task::Source::UserInteraction, [this, files]() mutable { + queue_an_element_task(Task::Source::UserInteraction, [this, files] { // 1. Update element's selected files so that it represents the user's selection. this->set_files(files.ptr()); diff --git a/Userland/Libraries/LibWeb/HTML/MessagePort.cpp b/Userland/Libraries/LibWeb/HTML/MessagePort.cpp index c3d5dc1c7f..b65a366583 100644 --- a/Userland/Libraries/LibWeb/HTML/MessagePort.cpp +++ b/Userland/Libraries/LibWeb/HTML/MessagePort.cpp @@ -88,7 +88,7 @@ void MessagePort::post_message(JS::Value message) // FIXME: This is an ad-hoc hack implementation instead, since we don't currently // have serialization and deserialization of messages. - main_thread_event_loop().task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [target_port, message]() mutable { + main_thread_event_loop().task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [target_port, message] { MessageEventInit event_init {}; event_init.data = message; event_init.origin = "<origin>"; diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index dbd8601ec2..62e042e8cc 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -250,7 +250,7 @@ void HTMLParser::the_end() } // 6. Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following substeps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document]() mutable { + old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { // 1. Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object. document->load_timing_info().dom_content_loaded_event_start_time = HighResolutionTime::unsafe_shared_current_time(); @@ -279,7 +279,7 @@ void HTMLParser::the_end() }); // 9. Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document]() mutable { + old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, *m_document, [document = m_document] { // 1. Update the current document readiness to "complete". document->update_readiness(HTML::DocumentReadyState::Complete); diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Environments.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/Environments.cpp index 1b376b8e57..653a38ec95 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Environments.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Environments.cpp @@ -228,7 +228,7 @@ void EnvironmentSettingsObject::notify_about_rejected_promises(Badge<EventLoop>) auto& global = global_object(); // 5. Queue a global task on the DOM manipulation task source given global to run the following substep: - queue_global_task(Task::Source::DOMManipulation, global, [this, &global, list = move(list)]() mutable { + queue_global_task(Task::Source::DOMManipulation, global, [this, &global, list = move(list)] { // 1. For each promise p in list: for (auto promise : list) { diff --git a/Userland/Libraries/LibWeb/HTML/Window.cpp b/Userland/Libraries/LibWeb/HTML/Window.cpp index 4890025fa4..e3974b26a8 100644 --- a/Userland/Libraries/LibWeb/HTML/Window.cpp +++ b/Userland/Libraries/LibWeb/HTML/Window.cpp @@ -495,7 +495,7 @@ i32 Window::run_timer_initialization_steps(TimerHandler handler, i32 timeout, JS // 8. Assert: initiating script is not null, since this algorithm is always called from some script. // 9. Let task be a task that runs the following substeps: - JS::SafeFunction<void()> task = [this, handler = move(handler), timeout, arguments = move(arguments), repeat, id]() mutable { + JS::SafeFunction<void()> task = [this, handler = move(handler), timeout, arguments = move(arguments), repeat, id] { // 1. If id does not exist in global's map of active timers, then abort these steps. if (!m_timers.contains(id)) return; @@ -564,7 +564,7 @@ i32 Window::run_timer_initialization_steps(TimerHandler handler, i32 timeout, JS // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#run-the-animation-frame-callbacks i32 Window::request_animation_frame_impl(WebIDL::CallbackType& js_callback) { - return m_animation_frame_callback_driver.add([this, js_callback = JS::make_handle(js_callback)](auto) mutable { + return m_animation_frame_callback_driver.add([this, js_callback = JS::make_handle(js_callback)](auto) { // 3. Invoke callback, passing now as the only argument, auto result = WebIDL::invoke_callback(*js_callback, {}, JS::Value(performance().now())); @@ -802,7 +802,7 @@ void Window::fire_a_page_transition_event(FlyString const& event_name, bool pers void Window::queue_microtask_impl(WebIDL::CallbackType& callback) { // The queueMicrotask(callback) method must queue a microtask to invoke callback, - HTML::queue_a_microtask(&associated_document(), [this, &callback]() mutable { + HTML::queue_a_microtask(&associated_document(), [this, &callback] { auto result = WebIDL::invoke_callback(callback, {}); // and if callback throws an exception, report the exception. if (result.is_error()) @@ -906,7 +906,7 @@ WebIDL::ExceptionOr<void> Window::post_message_impl(JS::Value message, String co { // FIXME: This is an ad-hoc hack implementation instead, since we don't currently // have serialization and deserialization of messages. - HTML::queue_global_task(HTML::Task::Source::PostedMessage, *this, [this, message]() mutable { + HTML::queue_global_task(HTML::Task::Source::PostedMessage, *this, [this, message] { HTML::MessageEventInit event_init {}; event_init.data = message; event_init.origin = "<origin>"; @@ -961,7 +961,7 @@ void Window::start_an_idle_period() // 5. Queue a task on the queue associated with the idle-task task source, // which performs the steps defined in the invoke idle callbacks algorithm with window and getDeadline as parameters. - HTML::queue_global_task(HTML::Task::Source::IdleTask, *this, [this]() mutable { + HTML::queue_global_task(HTML::Task::Source::IdleTask, *this, [this] { invoke_idle_callbacks(); }); } @@ -985,7 +985,7 @@ void Window::invoke_idle_callbacks() HTML::report_exception(result, realm()); // 4. If window's list of runnable idle callbacks is not empty, queue a task which performs the steps // in the invoke idle callbacks algorithm with getDeadline and window as a parameters and return from this algorithm - HTML::queue_global_task(HTML::Task::Source::IdleTask, *this, [this]() mutable { + HTML::queue_global_task(HTML::Task::Source::IdleTask, *this, [this] { invoke_idle_callbacks(); }); } diff --git a/Userland/Libraries/LibWeb/HTML/Worker.cpp b/Userland/Libraries/LibWeb/HTML/Worker.cpp index ea796a3e0f..a3e717ecc1 100644 --- a/Userland/Libraries/LibWeb/HTML/Worker.cpp +++ b/Userland/Libraries/LibWeb/HTML/Worker.cpp @@ -154,7 +154,7 @@ void Worker::run_a_worker(AK::URL& url, EnvironmentSettingsObject& outside_setti auto& event_loop = get_vm_event_loop(m_document->realm().vm()); - event_loop.task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [this, message]() mutable { + event_loop.task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [this, message] { MessageEventInit event_init {}; event_init.data = message; event_init.origin = "<origin>"; diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp index cc28cfae05..5832999c24 100644 --- a/Userland/Libraries/LibWeb/Loader/Resource.cpp +++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp @@ -168,7 +168,7 @@ void ResourceClient::set_resource(Resource* resource) // This ensures that these callbacks always happen in a consistent way, instead of being invoked // synchronously in some cases, and asynchronously in others. if (resource->is_loaded() || resource->is_failed()) { - Platform::EventLoopPlugin::the().deferred_invoke([weak_this = make_weak_ptr(), strong_resource = NonnullRefPtr { *m_resource }]() mutable { + Platform::EventLoopPlugin::the().deferred_invoke([weak_this = make_weak_ptr(), strong_resource = NonnullRefPtr { *m_resource }] { if (!weak_this) return; diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index 845e9391ea..2f34922b28 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -285,7 +285,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, Has if (timeout.has_value() && timeout.value() > 0) { auto timer = Platform::Timer::create_single_shot(timeout.value(), nullptr); - timer->on_timeout = [timer, protocol_request, timeout_callback = move(timeout_callback)]() mutable { + timer->on_timeout = [timer, protocol_request, timeout_callback = move(timeout_callback)] { protocol_request->stop(); if (timeout_callback) timeout_callback(); diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp index 11f71d548c..dd808688d5 100644 --- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp +++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp @@ -178,7 +178,7 @@ void XMLDocumentBuilder::document_end() (void)m_document.scripts_to_execute_when_parsing_has_finished().take_first(); } // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following substeps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = &m_document]() mutable { + old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = &m_document] { // Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object. document->load_timing_info().dom_content_loaded_event_start_time = HighResolutionTime::unsafe_shared_current_time(); @@ -206,7 +206,7 @@ void XMLDocumentBuilder::document_end() }); // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps: - old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = &m_document]() mutable { + old_queue_global_task_with_document(HTML::Task::Source::DOMManipulation, m_document, [document = &m_document] { // Update the current document readiness to "complete". document->update_readiness(HTML::DocumentReadyState::Complete); |