2024-03-18 16:22:27 +13:00
|
|
|
#include <LibURL/URL.h>
|
2022-02-26 17:50:31 +01:00
|
|
|
#include <LibIPC/File.h>
|
2021-07-02 21:40:44 -07:00
|
|
|
#include <LibCore/AnonymousBuffer.h>
|
2022-11-03 12:51:44 -04:00
|
|
|
#include <LibGfx/Rect.h>
|
2021-07-02 21:40:44 -07:00
|
|
|
#include <LibGfx/ShareableBitmap.h>
|
2021-10-26 17:00:10 +01:00
|
|
|
#include <LibWeb/CSS/PreferredColorScheme.h>
|
2022-03-04 16:29:05 +00:00
|
|
|
#include <LibWeb/CSS/Selector.h>
|
2023-12-11 06:53:10 +01:00
|
|
|
#include <LibWeb/HTML/ColorPickerUpdateState.h>
|
2024-02-25 13:02:47 -05:00
|
|
|
#include <LibWeb/HTML/SelectedFile.h>
|
2024-03-05 17:06:32 -05:00
|
|
|
#include <LibWeb/Page/InputEvent.h>
|
2022-11-02 18:02:19 +00:00
|
|
|
#include <LibWeb/WebDriver/ExecuteScript.h>
|
2023-11-19 10:42:11 -05:00
|
|
|
#include <LibWebView/Attribute.h>
|
2021-07-02 21:40:44 -07:00
|
|
|
|
2021-04-25 13:19:53 +02:00
|
|
|
endpoint WebContentServer
|
2020-06-17 17:31:42 +02:00
|
|
|
{
|
2024-02-02 18:00:48 -07:00
|
|
|
get_window_handle(u64 page_id) => (String handle)
|
|
|
|
|
set_window_handle(u64 page_id, String handle) =|
|
2023-03-14 07:05:57 +03:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
connect_to_webdriver(u64 page_id, ByteString webdriver_ipc_path) =|
|
2022-11-08 10:03:07 -05:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
update_system_theme(u64 page_id, Core::AnonymousBuffer theme_buffer) =|
|
|
|
|
|
update_system_fonts(u64 page_id, ByteString default_font_query, ByteString fixed_width_font_query, ByteString window_title_font_query) =|
|
|
|
|
|
update_screen_rects(u64 page_id, Vector<Web::DevicePixelRect> rects, u32 main_screen_index) =|
|
2020-06-17 17:31:42 +02:00
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
load_url(u64 page_id, URL::URL url) =|
|
2024-02-02 18:00:48 -07:00
|
|
|
load_html(u64 page_id, ByteString html) =|
|
2020-06-17 17:31:42 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
add_backing_store(u64 page_id, i32 front_bitmap_id, Gfx::ShareableBitmap front_bitmap, i32 back_bitmap_id, Gfx::ShareableBitmap back_bitmap) =|
|
|
|
|
|
ready_to_paint(u64 page_id) =|
|
2021-01-16 23:15:32 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_viewport_rect(u64 page_id, Web::DevicePixelRect rect) =|
|
2020-06-17 17:31:42 +02:00
|
|
|
|
2024-03-05 17:06:32 -05:00
|
|
|
key_event(u64 page_id, Web::KeyEvent event) =|
|
|
|
|
|
mouse_event(u64 page_id, Web::MouseEvent event) =|
|
2021-01-31 09:06:25 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
debug_request(u64 page_id, ByteString request, ByteString argument) =|
|
|
|
|
|
get_source(u64 page_id) =|
|
|
|
|
|
inspect_dom_tree(u64 page_id) =|
|
|
|
|
|
inspect_dom_node(u64 page_id, i32 node_id, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element) =|
|
|
|
|
|
inspect_accessibility_tree(u64 page_id) =|
|
|
|
|
|
get_hovered_node_id(u64 page_id) =|
|
|
|
|
|
js_console_input(u64 page_id, ByteString js_source) =|
|
|
|
|
|
js_console_request_messages(u64 page_id, i32 start_index) =|
|
2021-07-14 08:32:55 -04:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_dom_node_text(u64 page_id, i32 node_id, String text) =|
|
|
|
|
|
set_dom_node_tag(u64 page_id, i32 node_id, String name) =|
|
|
|
|
|
add_dom_node_attributes(u64 page_id, i32 node_id, Vector<WebView::Attribute> attributes) =|
|
|
|
|
|
replace_dom_node_attribute(u64 page_id, i32 node_id, String name, Vector<WebView::Attribute> replacement_attributes) =|
|
|
|
|
|
create_child_element(u64 page_id, i32 node_id) =|
|
|
|
|
|
create_child_text_node(u64 page_id, i32 node_id) =|
|
|
|
|
|
clone_dom_node(u64 page_id, i32 node_id) =|
|
|
|
|
|
remove_dom_node(u64 page_id, i32 node_id) =|
|
|
|
|
|
get_dom_node_html(u64 page_id, i32 node_id) =|
|
2023-11-19 10:42:11 -05:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
take_document_screenshot(u64 page_id) =|
|
|
|
|
|
take_dom_node_screenshot(u64 page_id, i32 node_id) =|
|
2022-10-18 12:40:14 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
dump_gc_graph(u64 page_id) => (String json)
|
2023-12-12 13:25:06 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
run_javascript(u64 page_id, ByteString js_source) =|
|
2021-08-24 16:56:42 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
dump_layout_tree(u64 page_id) => (ByteString dump)
|
|
|
|
|
dump_paint_tree(u64 page_id) => (ByteString dump)
|
|
|
|
|
dump_text(u64 page_id) => (ByteString dump)
|
2021-09-08 00:55:35 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
get_selected_text(u64 page_id) => (ByteString selection)
|
|
|
|
|
select_all(u64 page_id) =|
|
2021-09-27 11:39:17 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_content_filters(u64 page_id, Vector<String> filters) =|
|
|
|
|
|
set_autoplay_allowed_on_all_websites(u64 page_id) =|
|
|
|
|
|
set_autoplay_allowlist(u64 page_id, Vector<String> allowlist) =|
|
|
|
|
|
set_proxy_mappings(u64 page_id, Vector<ByteString> proxies, HashMap<ByteString,size_t> mappings) =|
|
|
|
|
|
set_preferred_color_scheme(u64 page_id, Web::CSS::PreferredColorScheme color_scheme) =|
|
|
|
|
|
set_has_focus(u64 page_id, bool has_focus) =|
|
|
|
|
|
set_is_scripting_enabled(u64 page_id, bool is_scripting_enabled) =|
|
|
|
|
|
set_device_pixels_per_css_pixel(u64 page_id, float device_pixels_per_css_pixel) =|
|
2022-02-06 19:03:13 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_window_position(u64 page_id, Web::DevicePixelPoint position) =|
|
|
|
|
|
set_window_size(u64 page_id, Web::DevicePixelSize size) =|
|
2022-11-01 14:55:53 -04:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
get_local_storage_entries(u64 page_id) => (OrderedHashMap<String,String> entries)
|
|
|
|
|
get_session_storage_entries(u64 page_id) => (OrderedHashMap<String,String> entries)
|
2022-02-26 17:50:31 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
handle_file_return(u64 page_id, i32 error, Optional<IPC::File> file, i32 request_id) =|
|
2022-09-19 20:50:33 +02:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_system_visibility_state(u64 page_id, bool visible) =|
|
2022-11-15 15:49:36 -05:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
alert_closed(u64 page_id) =|
|
|
|
|
|
confirm_closed(u64 page_id, bool accepted) =|
|
|
|
|
|
prompt_closed(u64 page_id, Optional<String> response) =|
|
|
|
|
|
color_picker_update(u64 page_id, Optional<Color> picked_color, Web::HTML::ColorPickerUpdateState state) =|
|
2024-02-25 13:02:47 -05:00
|
|
|
file_picker_closed(u64 page_id, Vector<Web::HTML::SelectedFile> selected_files) =|
|
2024-02-02 18:00:48 -07:00
|
|
|
select_dropdown_closed(u64 page_id, Optional<String> value) =|
|
2023-05-15 11:17:58 -04:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
toggle_media_play_state(u64 page_id) =|
|
|
|
|
|
toggle_media_mute_state(u64 page_id) =|
|
|
|
|
|
toggle_media_loop_state(u64 page_id) =|
|
|
|
|
|
toggle_media_controls_state(u64 page_id) =|
|
2023-08-21 15:50:31 +01:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
set_user_style(u64 page_id, String source) =|
|
2023-11-23 12:22:23 -05:00
|
|
|
|
2024-02-02 18:00:48 -07:00
|
|
|
enable_inspector_prototype(u64 page_id) =|
|
2020-06-17 17:31:42 +02:00
|
|
|
}
|