LibWeb+WebContent: Take advantage of IPC encoding improvements

This removes a couple of places where we were constructing strings or
vectors just to transfer data over IPC. And passes some values by const&
to remove clangd noise.
This commit is contained in:
Timothy Flynn 2025-03-08 10:41:16 -05:00 committed by Tim Flynn
commit 62912b985a
Notes: github-actions[bot] 2025-03-09 15:15:48 +00:00
11 changed files with 50 additions and 51 deletions

View file

@ -174,7 +174,7 @@ static Optional<Web::DOM::Element&> container_for_element(Web::DOM::Element& ele
}
template<typename T>
static bool fire_an_event(FlyString name, Optional<Web::DOM::Element&> target)
static bool fire_an_event(FlyString const& name, Optional<Web::DOM::Element&> target)
{
// FIXME: This is supposed to call the https://dom.spec.whatwg.org/#concept-event-fire DOM algorithm,
// but that doesn't seem to be implemented elsewhere. So, we'll ad-hack it for now. :^)
@ -3082,7 +3082,7 @@ void WebDriverConnection::delete_cookies(Optional<StringView> const& name)
if (!name.has_value() || name.value() == cookie.name) {
// Set the cookie expiry time to a Unix timestamp in the past.
cookie.expiry_time = UnixDateTime::earliest();
current_browsing_context().page().client().page_did_update_cookie(move(cookie));
current_browsing_context().page().client().page_did_update_cookie(cookie);
}
// -> Otherwise
// Do nothing.