mirror of
https://github.com/RGBCube/serenity
synced 2025-06-22 05:12:06 +00:00

With this change, chrome no longer has to ask the WebContent process to paint the next frame into a specified bitmap. Instead, it allocates bitmaps and sends them to WebContent, which then lets chrome know when the painting is done. This work is a preparation to move the execution of painting commands into a separate thread. Now, it is much easier to start working on the next frame while the current one is still rendering. This is because WebContent does not have to inform chrome that the current frame is ready before it can request the next frame. Additionally, as a side bonus, we can now eliminate the did_invalidate_content_rect and did_change_selection IPC calls. These were used solely for the purpose of informing chrome that it needed to request a repaint.
104 lines
4.7 KiB
Text
104 lines
4.7 KiB
Text
#include <AK/URL.h>
|
|
#include <LibIPC/File.h>
|
|
#include <LibCore/AnonymousBuffer.h>
|
|
#include <LibGfx/Rect.h>
|
|
#include <LibGfx/ShareableBitmap.h>
|
|
#include <LibWeb/CSS/PreferredColorScheme.h>
|
|
#include <LibWeb/CSS/Selector.h>
|
|
#include <LibWeb/WebDriver/ExecuteScript.h>
|
|
#include <LibWebView/Attribute.h>
|
|
|
|
endpoint WebContentServer
|
|
{
|
|
get_window_handle() => (String handle)
|
|
set_window_handle(String handle) =|
|
|
|
|
connect_to_webdriver(ByteString webdriver_ipc_path) =|
|
|
|
|
update_system_theme(Core::AnonymousBuffer theme_buffer) =|
|
|
update_system_fonts(ByteString default_font_query, ByteString fixed_width_font_query, ByteString window_title_font_query) =|
|
|
update_screen_rects(Vector<Web::DevicePixelRect> rects, u32 main_screen_index) =|
|
|
|
|
load_url(URL url) =|
|
|
load_html(ByteString html) =|
|
|
|
|
add_backing_store(i32 front_bitmap_id, Gfx::ShareableBitmap front_bitmap, i32 back_bitmap_id, Gfx::ShareableBitmap back_bitmap) =|
|
|
|
|
set_viewport_rect(Web::DevicePixelRect rect) =|
|
|
|
|
mouse_down(Web::DevicePixelPoint position, Web::DevicePixelPoint screen_position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
|
mouse_move(Web::DevicePixelPoint position, Web::DevicePixelPoint screen_position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
|
mouse_up(Web::DevicePixelPoint position, Web::DevicePixelPoint screen_position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
|
mouse_wheel(Web::DevicePixelPoint position, Web::DevicePixelPoint screen_position, unsigned button, unsigned buttons, unsigned modifiers, Web::DevicePixels wheel_delta_x, Web::DevicePixels wheel_delta_y) =|
|
|
doubleclick(Web::DevicePixelPoint position, Web::DevicePixelPoint screen_position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
|
|
|
key_down(i32 key, unsigned modifiers, u32 code_point) =|
|
|
key_up(i32 key, unsigned modifiers, u32 code_point) =|
|
|
|
|
debug_request(ByteString request, ByteString argument) =|
|
|
get_source() =|
|
|
inspect_dom_tree() =|
|
|
inspect_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element) => (bool has_style, ByteString computed_style, ByteString resolved_style, ByteString custom_properties, ByteString node_box_sizing, ByteString aria_properties_state)
|
|
inspect_accessibility_tree() =|
|
|
get_hovered_node_id() => (i32 node_id)
|
|
js_console_input(ByteString js_source) =|
|
|
js_console_request_messages(i32 start_index) =|
|
|
|
|
set_dom_node_text(i32 node_id, String text) =|
|
|
set_dom_node_tag(i32 node_id, String name) => (Optional<i32> node_id)
|
|
add_dom_node_attributes(i32 node_id, Vector<WebView::Attribute> attributes) =|
|
|
replace_dom_node_attribute(i32 node_id, String name, Vector<WebView::Attribute> replacement_attributes) =|
|
|
create_child_element(i32 node_id) => (Optional<i32> node_id)
|
|
create_child_text_node(i32 node_id) => (Optional<i32> node_id)
|
|
clone_dom_node(i32 node_id) => (Optional<i32> node_id)
|
|
remove_dom_node(i32 node_id) =|
|
|
get_dom_node_html(i32 node_id) => (Optional<String> html)
|
|
|
|
take_document_screenshot() => (Gfx::ShareableBitmap data)
|
|
take_dom_node_screenshot(i32 node_id) => (Gfx::ShareableBitmap data)
|
|
|
|
dump_gc_graph() => (String json)
|
|
|
|
run_javascript(ByteString js_source) =|
|
|
|
|
dump_layout_tree() => (ByteString dump)
|
|
dump_paint_tree() => (ByteString dump)
|
|
dump_text() => (ByteString dump)
|
|
|
|
get_selected_text() => (ByteString selection)
|
|
select_all() =|
|
|
|
|
set_content_filters(Vector<String> filters) =|
|
|
set_autoplay_allowed_on_all_websites() =|
|
|
set_autoplay_allowlist(Vector<String> allowlist) =|
|
|
set_proxy_mappings(Vector<ByteString> proxies, HashMap<ByteString,size_t> mappings) =|
|
|
set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme) =|
|
|
set_has_focus(bool has_focus) =|
|
|
set_is_scripting_enabled(bool is_scripting_enabled) =|
|
|
set_device_pixels_per_css_pixel(float device_pixels_per_css_pixel) =|
|
|
|
|
set_window_position(Web::DevicePixelPoint position) =|
|
|
set_window_size(Web::DevicePixelSize size) =|
|
|
|
|
get_local_storage_entries() => (OrderedHashMap<String,String> entries)
|
|
get_session_storage_entries() => (OrderedHashMap<String,String> entries)
|
|
|
|
handle_file_return(i32 error, Optional<IPC::File> file, i32 request_id) =|
|
|
|
|
set_system_visibility_state(bool visible) =|
|
|
|
|
alert_closed() =|
|
|
confirm_closed(bool accepted) =|
|
|
prompt_closed(Optional<String> response) =|
|
|
color_picker_closed(Optional<Color> picked_color) =|
|
|
select_dropdown_closed(Optional<String> value) =|
|
|
|
|
toggle_media_play_state() =|
|
|
toggle_media_mute_state() =|
|
|
toggle_media_loop_state() =|
|
|
toggle_media_controls_state() =|
|
|
|
|
set_user_style(String source) =|
|
|
|
|
enable_inspector_prototype() =|
|
|
}
|