mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +00:00
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:
parent
68947d55d9
commit
62912b985a
Notes:
github-actions[bot]
2025-03-09 15:15:48 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/62912b985ac Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3865
11 changed files with 50 additions and 51 deletions
|
@ -40,13 +40,13 @@ void Clipboard::initialize(JS::Realm& realm)
|
|||
}
|
||||
|
||||
// https://w3c.github.io/clipboard-apis/#os-specific-well-known-format
|
||||
static String os_specific_well_known_format(StringView mime_type_string)
|
||||
static StringView os_specific_well_known_format(StringView mime_type_string)
|
||||
{
|
||||
// NOTE: Here we always takes the Linux case, and defer to the chrome layer to handle OS specific implementations.
|
||||
auto mime_type = MimeSniff::MimeType::parse(mime_type_string);
|
||||
|
||||
// 1. Let wellKnownFormat be an empty string.
|
||||
String well_known_format {};
|
||||
StringView well_known_format {};
|
||||
|
||||
// 2. If mimeType’s essence is "text/plain", then
|
||||
if (mime_type->essence() == "text/plain"sv) {
|
||||
|
@ -56,7 +56,7 @@ static String os_specific_well_known_format(StringView mime_type_string)
|
|||
// Assign NSPasteboardTypeString to wellKnownFormat.
|
||||
// On Linux, ChromeOS, and Android, follow the convention described below:
|
||||
// Assign "text/plain" to wellKnownFormat.
|
||||
well_known_format = "text/plain"_string;
|
||||
well_known_format = "text/plain"sv;
|
||||
}
|
||||
// 3. Else, if mimeType’s essence is "text/html", then
|
||||
if (mime_type->essence() == "text/html"sv) {
|
||||
|
@ -66,7 +66,7 @@ static String os_specific_well_known_format(StringView mime_type_string)
|
|||
// Assign NSHTMLPboardType to wellKnownFormat.
|
||||
// On Linux, ChromeOS, and Android, follow the convention described below:
|
||||
// Assign "text/html" to wellKnownFormat.
|
||||
well_known_format = "text/html"_string;
|
||||
well_known_format = "text/html"sv;
|
||||
}
|
||||
// 4. Else, if mimeType’s essence is "image/png", then
|
||||
if (mime_type->essence() == "image/png"sv) {
|
||||
|
@ -76,7 +76,7 @@ static String os_specific_well_known_format(StringView mime_type_string)
|
|||
// Assign NSPasteboardTypePNG to wellKnownFormat.
|
||||
// On Linux, ChromeOS, and Android, follow the convention described below:
|
||||
// Assign "image/png" to wellKnownFormat.
|
||||
well_known_format = "image/png"_string;
|
||||
well_known_format = "image/png"sv;
|
||||
}
|
||||
|
||||
// 5. Return wellKnownFormat.
|
||||
|
@ -84,7 +84,7 @@ static String os_specific_well_known_format(StringView mime_type_string)
|
|||
}
|
||||
|
||||
// https://w3c.github.io/clipboard-apis/#write-blobs-and-option-to-the-clipboard
|
||||
static void write_blobs_and_option_to_clipboard(JS::Realm& realm, ReadonlySpan<GC::Ref<FileAPI::Blob>> items, String presentation_style)
|
||||
static void write_blobs_and_option_to_clipboard(JS::Realm& realm, ReadonlySpan<GC::Ref<FileAPI::Blob>> items, StringView presentation_style)
|
||||
{
|
||||
auto& window = as<HTML::Window>(realm.global_object());
|
||||
|
||||
|
@ -113,7 +113,7 @@ static void write_blobs_and_option_to_clipboard(JS::Realm& realm, ReadonlySpan<G
|
|||
auto payload = MUST(TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, item->raw_bytes()));
|
||||
|
||||
// 4. Insert payload and presentationStyle into the system clipboard using formatString as the native clipboard format.
|
||||
window.page().client().page_did_insert_clipboard_entry(move(payload), move(presentation_style), move(format_string));
|
||||
window.page().client().page_did_insert_clipboard_entry(payload, presentation_style, format_string);
|
||||
}
|
||||
|
||||
// FIXME: 3. Write web custom formats given webCustomFormats.
|
||||
|
@ -181,10 +181,10 @@ GC::Ref<WebIDL::Promise> Clipboard::write_text(String data)
|
|||
item_list.append(text_blob);
|
||||
|
||||
// 4. Let option be set to "unspecified".
|
||||
auto option = "unspecified"_string;
|
||||
static constexpr auto option = "unspecified"sv;
|
||||
|
||||
// 5. Write blobs and option to the clipboard with itemList and option.
|
||||
write_blobs_and_option_to_clipboard(realm, item_list, move(option));
|
||||
write_blobs_and_option_to_clipboard(realm, item_list, option);
|
||||
|
||||
// 6. Resolve p.
|
||||
HTML::TemporaryExecutionContext execution_context { realm };
|
||||
|
|
|
@ -374,7 +374,7 @@ static void show_the_picker_if_applicable(HTMLInputElement& element)
|
|||
auto weak_element = element.make_weak_ptr<HTMLInputElement>();
|
||||
|
||||
element.set_is_open(true);
|
||||
element.document().browsing_context()->top_level_browsing_context()->page().did_request_file_picker(weak_element, move(accepted_file_types), allow_multiple_files);
|
||||
element.document().browsing_context()->top_level_browsing_context()->page().did_request_file_picker(weak_element, accepted_file_types, allow_multiple_files);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ EventResult EventHandler::handle_mouseup(CSSPixelPoint viewport_position, CSSPix
|
|||
.is_looping = media_element.has_attribute(HTML::AttributeNames::loop),
|
||||
};
|
||||
|
||||
m_navigable->page().did_request_media_context_menu(media_element.unique_id(), top_level_viewport_position, "", modifiers, move(menu));
|
||||
m_navigable->page().did_request_media_context_menu(media_element.unique_id(), top_level_viewport_position, "", modifiers, menu);
|
||||
} else {
|
||||
m_navigable->page().client().page_did_request_context_menu(top_level_viewport_position);
|
||||
}
|
||||
|
|
|
@ -409,13 +409,13 @@ void Page::color_picker_update(Optional<Color> picked_color, HTML::ColorPickerUp
|
|||
}
|
||||
}
|
||||
|
||||
void Page::did_request_file_picker(WeakPtr<HTML::HTMLInputElement> target, HTML::FileFilter accepted_file_types, HTML::AllowMultipleFiles allow_multiple_files)
|
||||
void Page::did_request_file_picker(WeakPtr<HTML::HTMLInputElement> target, HTML::FileFilter const& accepted_file_types, HTML::AllowMultipleFiles allow_multiple_files)
|
||||
{
|
||||
if (m_pending_non_blocking_dialog == PendingNonBlockingDialog::None) {
|
||||
m_pending_non_blocking_dialog = PendingNonBlockingDialog::FilePicker;
|
||||
m_pending_non_blocking_dialog_target = move(target);
|
||||
|
||||
m_client->page_did_request_file_picker(move(accepted_file_types), allow_multiple_files);
|
||||
m_client->page_did_request_file_picker(accepted_file_types, allow_multiple_files);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,10 +467,10 @@ void Page::unregister_media_element(Badge<HTML::HTMLMediaElement>, UniqueNodeID
|
|||
});
|
||||
}
|
||||
|
||||
void Page::did_request_media_context_menu(UniqueNodeID media_id, CSSPixelPoint position, ByteString const& target, unsigned modifiers, MediaContextMenu menu)
|
||||
void Page::did_request_media_context_menu(UniqueNodeID media_id, CSSPixelPoint position, ByteString const& target, unsigned modifiers, MediaContextMenu const& menu)
|
||||
{
|
||||
m_media_context_menu_element_id = media_id;
|
||||
client().page_did_request_media_context_menu(position, target, modifiers, move(menu));
|
||||
client().page_did_request_media_context_menu(position, target, modifiers, menu);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> Page::toggle_media_play_state()
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
void did_request_color_picker(WeakPtr<HTML::HTMLInputElement> target, Color current_color);
|
||||
void color_picker_update(Optional<Color> picked_color, HTML::ColorPickerUpdateState state);
|
||||
|
||||
void did_request_file_picker(WeakPtr<HTML::HTMLInputElement> target, HTML::FileFilter accepted_file_types, HTML::AllowMultipleFiles);
|
||||
void did_request_file_picker(WeakPtr<HTML::HTMLInputElement> target, HTML::FileFilter const& accepted_file_types, HTML::AllowMultipleFiles);
|
||||
void file_picker_closed(Span<HTML::SelectedFile> selected_files);
|
||||
|
||||
void did_request_select_dropdown(WeakPtr<HTML::HTMLSelectElement> target, Web::CSSPixelPoint content_position, Web::CSSPixels minimum_width, Vector<Web::HTML::SelectItem> items);
|
||||
|
@ -188,7 +188,7 @@ public:
|
|||
bool has_user_agent_controls { false };
|
||||
bool is_looping { false };
|
||||
};
|
||||
void did_request_media_context_menu(UniqueNodeID media_id, CSSPixelPoint, ByteString const& target, unsigned modifiers, MediaContextMenu);
|
||||
void did_request_media_context_menu(UniqueNodeID media_id, CSSPixelPoint, ByteString const& target, unsigned modifiers, MediaContextMenu const&);
|
||||
WebIDL::ExceptionOr<void> toggle_media_play_state();
|
||||
void toggle_media_mute_state();
|
||||
WebIDL::ExceptionOr<void> toggle_media_loop_state();
|
||||
|
@ -349,7 +349,7 @@ public:
|
|||
virtual void page_did_request_context_menu(CSSPixelPoint) { }
|
||||
virtual void page_did_request_link_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_request_image_context_menu(CSSPixelPoint, URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Optional<Gfx::Bitmap const*>) { }
|
||||
virtual void page_did_request_media_context_menu(CSSPixelPoint, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Page::MediaContextMenu) { }
|
||||
virtual void page_did_request_media_context_menu(CSSPixelPoint, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers, Page::MediaContextMenu const&) { }
|
||||
virtual void page_did_click_link(URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_middle_click_link(URL::URL const&, [[maybe_unused]] ByteString const& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_request_tooltip_override(CSSPixelPoint, ByteString const&) { }
|
||||
|
@ -370,7 +370,7 @@ public:
|
|||
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL::URL const&, String const&) { return {}; }
|
||||
virtual String page_did_request_cookie(URL::URL const&, Cookie::Source) { return {}; }
|
||||
virtual void page_did_set_cookie(URL::URL const&, Cookie::ParsedCookie const&, Cookie::Source) { }
|
||||
virtual void page_did_update_cookie(Web::Cookie::Cookie) { }
|
||||
virtual void page_did_update_cookie(Web::Cookie::Cookie const&) { }
|
||||
virtual void page_did_expire_cookies_with_time_offset(AK::Duration) { }
|
||||
virtual void page_did_update_resource_count(i32) { }
|
||||
struct NewWebViewResult {
|
||||
|
@ -387,7 +387,7 @@ public:
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/input.html#show-the-picker,-if-applicable
|
||||
virtual void page_did_request_color_picker([[maybe_unused]] Color current_color) { }
|
||||
virtual void page_did_request_file_picker([[maybe_unused]] HTML::FileFilter accepted_file_types, Web::HTML::AllowMultipleFiles) { }
|
||||
virtual void page_did_request_file_picker([[maybe_unused]] HTML::FileFilter const& accepted_file_types, Web::HTML::AllowMultipleFiles) { }
|
||||
virtual void page_did_request_select_dropdown([[maybe_unused]] Web::CSSPixelPoint content_position, [[maybe_unused]] Web::CSSPixels minimum_width, [[maybe_unused]] Vector<Web::HTML::SelectItem> items) { }
|
||||
|
||||
virtual void page_did_finish_text_test([[maybe_unused]] String const& text) { }
|
||||
|
@ -397,7 +397,7 @@ public:
|
|||
|
||||
virtual void page_did_change_theme_color(Gfx::Color) { }
|
||||
|
||||
virtual void page_did_insert_clipboard_entry([[maybe_unused]] String data, [[maybe_unused]] String presentation_style, [[maybe_unused]] String mime_type) { }
|
||||
virtual void page_did_insert_clipboard_entry([[maybe_unused]] StringView data, [[maybe_unused]] StringView presentation_style, [[maybe_unused]] StringView mime_type) { }
|
||||
|
||||
virtual void page_did_change_audio_play_state(HTML::AudioPlayState) { }
|
||||
|
||||
|
|
|
@ -497,9 +497,9 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, Web::UniqueNodeID const
|
|||
}
|
||||
|
||||
MUST(serializer.finish());
|
||||
|
||||
return MUST(builder.to_string());
|
||||
};
|
||||
|
||||
auto serialize_node_box_sizing_json = [](Web::Layout::Node const* layout_node) {
|
||||
if (!layout_node || !layout_node->is_box() || !layout_node->first_paintable() || !layout_node->first_paintable()->is_paintable_box()) {
|
||||
return "{}"_string;
|
||||
|
@ -581,7 +581,7 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, Web::UniqueNodeID const
|
|||
|
||||
auto custom_properties_json = serialize_custom_properties_json(element, pseudo_element);
|
||||
auto node_box_sizing_json = serialize_node_box_sizing_json(pseudo_element_node.ptr());
|
||||
async_did_inspect_dom_node(page_id, true, move(computed_values), move(resolved_values), move(custom_properties_json), move(node_box_sizing_json), "{}"_string, move(fonts_json));
|
||||
async_did_inspect_dom_node(page_id, true, computed_values, resolved_values, custom_properties_json, node_box_sizing_json, "{}"_string, fonts_json);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, Web::UniqueNodeID const
|
|||
auto aria_properties_state_json = serialize_aria_properties_state_json(element);
|
||||
auto fonts_json = serialize_fonts_json(*element.computed_properties());
|
||||
|
||||
async_did_inspect_dom_node(page_id, true, move(computed_values), move(resolved_values), move(custom_properties_json), move(node_box_sizing_json), move(aria_properties_state_json), move(fonts_json));
|
||||
async_did_inspect_dom_node(page_id, true, computed_values, resolved_values, custom_properties_json, node_box_sizing_json, aria_properties_state_json, move(fonts_json));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -840,7 +840,7 @@ void ConnectionFromClient::get_dom_node_html(u64 page_id, Web::UniqueNodeID cons
|
|||
return;
|
||||
}
|
||||
|
||||
async_did_get_dom_node_html(page_id, move(html));
|
||||
async_did_get_dom_node_html(page_id, html);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::take_document_screenshot(u64 page_id)
|
||||
|
|
|
@ -115,8 +115,7 @@ void DevToolsConsoleClient::send_messages(i32 start_index)
|
|||
return;
|
||||
}
|
||||
|
||||
Vector<WebView::ConsoleOutput> messages { m_console_output.span().slice(start_index) };
|
||||
m_client->did_get_unstyled_js_console_messages(start_index, move(messages));
|
||||
m_client->did_get_unstyled_js_console_messages(start_index, m_console_output.span().slice(start_index));
|
||||
}
|
||||
|
||||
// 2.3. Printer(logLevel, args[, options]), https://console.spec.whatwg.org/#printer
|
||||
|
|
|
@ -110,7 +110,7 @@ void InspectorConsoleClient::send_messages(i32 start_index)
|
|||
messages.append(message.data);
|
||||
}
|
||||
|
||||
m_client->did_get_styled_js_console_messages(start_index, move(message_types), move(messages));
|
||||
m_client->did_get_styled_js_console_messages(start_index, message_types, messages);
|
||||
}
|
||||
|
||||
// 2.3. Printer(logLevel, args[, options]), https://console.spec.whatwg.org/#printer
|
||||
|
|
|
@ -426,9 +426,9 @@ void PageClient::page_did_request_image_context_menu(Web::CSSPixelPoint content_
|
|||
client().async_did_request_image_context_menu(m_id, page().css_to_device_point(content_position).to_type<int>(), url, target, modifiers, bitmap);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_media_context_menu(Web::CSSPixelPoint content_position, ByteString const& target, unsigned modifiers, Web::Page::MediaContextMenu menu)
|
||||
void PageClient::page_did_request_media_context_menu(Web::CSSPixelPoint content_position, ByteString const& target, unsigned modifiers, Web::Page::MediaContextMenu const& menu)
|
||||
{
|
||||
client().async_did_request_media_context_menu(m_id, page().css_to_device_point(content_position).to_type<int>(), target, modifiers, move(menu));
|
||||
client().async_did_request_media_context_menu(m_id, page().css_to_device_point(content_position).to_type<int>(), target, modifiers, menu);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_alert(String const& message)
|
||||
|
@ -554,9 +554,9 @@ void PageClient::page_did_set_cookie(URL::URL const& url, Web::Cookie::ParsedCoo
|
|||
}
|
||||
}
|
||||
|
||||
void PageClient::page_did_update_cookie(Web::Cookie::Cookie cookie)
|
||||
void PageClient::page_did_update_cookie(Web::Cookie::Cookie const& cookie)
|
||||
{
|
||||
client().async_did_update_cookie(move(cookie));
|
||||
client().async_did_update_cookie(cookie);
|
||||
}
|
||||
|
||||
void PageClient::page_did_expire_cookies_with_time_offset(AK::Duration offset)
|
||||
|
@ -620,9 +620,9 @@ void PageClient::page_did_request_color_picker(Color current_color)
|
|||
client().async_did_request_color_picker(m_id, current_color);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_file_picker(Web::HTML::FileFilter accepted_file_types, Web::HTML::AllowMultipleFiles allow_multiple_files)
|
||||
void PageClient::page_did_request_file_picker(Web::HTML::FileFilter const& accepted_file_types, Web::HTML::AllowMultipleFiles allow_multiple_files)
|
||||
{
|
||||
client().async_did_request_file_picker(m_id, move(accepted_file_types), allow_multiple_files);
|
||||
client().async_did_request_file_picker(m_id, accepted_file_types, allow_multiple_files);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_select_dropdown(Web::CSSPixelPoint content_position, Web::CSSPixels minimum_width, Vector<Web::HTML::SelectItem> items)
|
||||
|
@ -635,9 +635,9 @@ void PageClient::page_did_change_theme_color(Gfx::Color color)
|
|||
client().async_did_change_theme_color(m_id, color);
|
||||
}
|
||||
|
||||
void PageClient::page_did_insert_clipboard_entry(String data, String presentation_style, String mime_type)
|
||||
void PageClient::page_did_insert_clipboard_entry(StringView data, StringView presentation_style, StringView mime_type)
|
||||
{
|
||||
client().async_did_insert_clipboard_entry(m_id, move(data), move(presentation_style), move(mime_type));
|
||||
client().async_did_insert_clipboard_entry(m_id, data, presentation_style, mime_type);
|
||||
}
|
||||
|
||||
void PageClient::page_did_change_audio_play_state(Web::HTML::AudioPlayState play_state)
|
||||
|
@ -794,9 +794,9 @@ void PageClient::initialize_js_console(Web::DOM::Document& document)
|
|||
document.set_console_client(console_client);
|
||||
}
|
||||
|
||||
void PageClient::did_execute_js_console_input(JsonValue result)
|
||||
void PageClient::did_execute_js_console_input(JsonValue const& result)
|
||||
{
|
||||
client().async_did_execute_js_console_input(m_id, move(result));
|
||||
client().async_did_execute_js_console_input(m_id, result);
|
||||
}
|
||||
|
||||
void PageClient::js_console_input(StringView js_source)
|
||||
|
@ -848,14 +848,14 @@ void PageClient::console_peer_did_misbehave(char const* reason)
|
|||
client().did_misbehave(reason);
|
||||
}
|
||||
|
||||
void PageClient::did_get_styled_js_console_messages(i32 start_index, Vector<String> message_types, Vector<String> messages)
|
||||
void PageClient::did_get_styled_js_console_messages(i32 start_index, ReadonlySpan<String> message_types, ReadonlySpan<String> messages)
|
||||
{
|
||||
client().async_did_get_styled_js_console_messages(m_id, start_index, move(message_types), move(messages));
|
||||
client().async_did_get_styled_js_console_messages(m_id, start_index, message_types, messages);
|
||||
}
|
||||
|
||||
void PageClient::did_get_unstyled_js_console_messages(i32 start_index, Vector<WebView::ConsoleOutput> console_output)
|
||||
void PageClient::did_get_unstyled_js_console_messages(i32 start_index, ReadonlySpan<WebView::ConsoleOutput> console_output)
|
||||
{
|
||||
client().async_did_get_unstyled_js_console_messages(m_id, start_index, move(console_output));
|
||||
client().async_did_get_unstyled_js_console_messages(m_id, start_index, console_output);
|
||||
}
|
||||
|
||||
static void gather_style_sheets(Vector<Web::CSS::StyleSheetIdentifier>& results, Web::CSS::CSSStyleSheet& sheet)
|
||||
|
|
|
@ -86,13 +86,13 @@ public:
|
|||
|
||||
void initialize_js_console(Web::DOM::Document& document);
|
||||
void js_console_input(StringView js_source);
|
||||
void did_execute_js_console_input(JsonValue);
|
||||
void did_execute_js_console_input(JsonValue const&);
|
||||
void run_javascript(StringView js_source);
|
||||
void js_console_request_messages(i32 start_index);
|
||||
void did_output_js_console_message(i32 message_index);
|
||||
void console_peer_did_misbehave(char const* reason);
|
||||
void did_get_styled_js_console_messages(i32 start_index, Vector<String> message_types, Vector<String> messages);
|
||||
void did_get_unstyled_js_console_messages(i32 start_index, Vector<WebView::ConsoleOutput> console_output);
|
||||
void did_get_styled_js_console_messages(i32 start_index, ReadonlySpan<String> message_types, ReadonlySpan<String> messages);
|
||||
void did_get_unstyled_js_console_messages(i32 start_index, ReadonlySpan<WebView::ConsoleOutput> console_output);
|
||||
|
||||
Vector<Web::CSS::StyleSheetIdentifier> list_style_sheets() const;
|
||||
|
||||
|
@ -138,7 +138,7 @@ private:
|
|||
virtual void page_did_request_context_menu(Web::CSSPixelPoint) override;
|
||||
virtual void page_did_request_link_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers) override;
|
||||
virtual void page_did_request_image_context_menu(Web::CSSPixelPoint, URL::URL const&, ByteString const& target, unsigned modifiers, Optional<Gfx::Bitmap const*>) override;
|
||||
virtual void page_did_request_media_context_menu(Web::CSSPixelPoint, ByteString const& target, unsigned modifiers, Web::Page::MediaContextMenu) override;
|
||||
virtual void page_did_request_media_context_menu(Web::CSSPixelPoint, ByteString const& target, unsigned modifiers, Web::Page::MediaContextMenu const&) override;
|
||||
virtual void page_did_start_loading(URL::URL const&, bool) override;
|
||||
virtual void page_did_create_new_document(Web::DOM::Document&) override;
|
||||
virtual void page_did_change_active_document_in_top_level_browsing_context(Web::DOM::Document&) override;
|
||||
|
@ -154,7 +154,7 @@ private:
|
|||
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL::URL const&, String const&) override;
|
||||
virtual String page_did_request_cookie(URL::URL const&, Web::Cookie::Source) override;
|
||||
virtual void page_did_set_cookie(URL::URL const&, Web::Cookie::ParsedCookie const&, Web::Cookie::Source) override;
|
||||
virtual void page_did_update_cookie(Web::Cookie::Cookie) override;
|
||||
virtual void page_did_update_cookie(Web::Cookie::Cookie const&) override;
|
||||
virtual void page_did_expire_cookies_with_time_offset(AK::Duration) override;
|
||||
virtual void page_did_update_resource_count(i32) override;
|
||||
virtual NewWebViewResult page_did_request_new_web_view(Web::HTML::ActivateTab, Web::HTML::WebViewHints, Web::HTML::TokenizedFeature::NoOpener) override;
|
||||
|
@ -163,13 +163,13 @@ private:
|
|||
virtual void page_did_update_navigation_buttons_state(bool back_enabled, bool forward_enabled) override;
|
||||
virtual void request_file(Web::FileRequest) override;
|
||||
virtual void page_did_request_color_picker(Color current_color) override;
|
||||
virtual void page_did_request_file_picker(Web::HTML::FileFilter accepted_file_types, Web::HTML::AllowMultipleFiles) override;
|
||||
virtual void page_did_request_file_picker(Web::HTML::FileFilter const& accepted_file_types, Web::HTML::AllowMultipleFiles) override;
|
||||
virtual void page_did_request_select_dropdown(Web::CSSPixelPoint content_position, Web::CSSPixels minimum_width, Vector<Web::HTML::SelectItem> items) override;
|
||||
virtual void page_did_finish_text_test(String const& text) override;
|
||||
virtual void page_did_set_test_timeout(double milliseconds) override;
|
||||
virtual void page_did_set_browser_zoom(double factor) override;
|
||||
virtual void page_did_change_theme_color(Gfx::Color color) override;
|
||||
virtual void page_did_insert_clipboard_entry(String data, String presentation_style, String mime_type) override;
|
||||
virtual void page_did_insert_clipboard_entry(StringView data, StringView presentation_style, StringView mime_type) override;
|
||||
virtual void page_did_change_audio_play_state(Web::HTML::AudioPlayState) override;
|
||||
virtual void page_did_allocate_backing_stores(i32 front_bitmap_id, Gfx::ShareableBitmap front_bitmap, i32 back_bitmap_id, Gfx::ShareableBitmap back_bitmap) override;
|
||||
virtual IPC::File request_worker_agent() override;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue