LibWebView+Ladybird: Move running JavaScript to ViewImplementation

This commit is contained in:
Linus Groh 2023-01-12 20:39:08 +00:00 committed by Andreas Kling
parent 55609f744d
commit 8c11a2c253
Notes: sideshowbarker 2024-07-17 01:47:06 +09:00
6 changed files with 7 additions and 14 deletions

View File

@ -446,11 +446,6 @@ void WebContentView::update_viewport_rect()
request_repaint();
}
void WebContentView::run_javascript(DeprecatedString const& js_source)
{
client().async_run_javascript(js_source);
}
void WebContentView::did_output_js_console_message(i32 message_index)
{
if (m_console_widget)

View File

@ -86,8 +86,6 @@ public:
virtual void focusOutEvent(QFocusEvent*) override;
virtual bool event(QEvent*) override;
void run_javascript(DeprecatedString const& js_source);
void did_output_js_console_message(i32 message_index);
void did_get_js_console_messages(i32 start_index, Vector<DeprecatedString> message_types, Vector<DeprecatedString> messages);

View File

@ -552,11 +552,6 @@ void OutOfProcessWebView::js_console_request_messages(i32 start_index)
client().async_js_console_request_messages(start_index);
}
void OutOfProcessWebView::run_javascript(StringView js_source)
{
client().async_run_javascript(js_source);
}
DeprecatedString OutOfProcessWebView::selected_text()
{
return client().get_selected_text();

View File

@ -36,8 +36,6 @@ public:
void js_console_input(DeprecatedString const& js_source);
void js_console_request_messages(i32 start_index);
void run_javascript(StringView);
DeprecatedString selected_text();
void select_all();

View File

@ -104,4 +104,9 @@ void ViewImplementation::debug_request(DeprecatedString const& request, Deprecat
client().async_debug_request(request, argument);
}
void ViewImplementation::run_javascript(StringView js_source)
{
client().async_run_javascript(js_source);
}
}

View File

@ -48,6 +48,8 @@ public:
void debug_request(DeprecatedString const& request, DeprecatedString const& argument = {});
void run_javascript(StringView);
virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) = 0;
virtual void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) = 0;
virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) = 0;