1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

Ladybird+LibWebView: Migrate layout notification to LibWebView callbacks

This commit is contained in:
Timothy Flynn 2023-08-23 10:33:26 -04:00 committed by Tim Flynn
parent 682a5f9b70
commit bf464665a7
10 changed files with 19 additions and 34 deletions

View file

@ -29,6 +29,10 @@ OutOfProcessWebView::OutOfProcessWebView()
create_client();
on_did_layout = [this](auto content_size) {
set_content_size(content_size);
};
on_ready_to_paint = [this]() {
update();
};
@ -184,11 +188,6 @@ void OutOfProcessWebView::notify_server_did_request_cursor_change(Badge<WebConte
set_override_cursor(cursor);
}
void OutOfProcessWebView::notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size)
{
set_content_size(content_size);
}
void OutOfProcessWebView::notify_server_did_request_scroll(Badge<WebContentClient>, i32 x_delta, i32 y_delta)
{
horizontal_scrollbar().increase_slider_by(x_delta);