mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb: Remove did_request_scroll_to IPC call
No longer used after moving scrollbar painting into WebContent.
This commit is contained in:
parent
cc3d95a356
commit
94eacf6da7
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/94eacf6da7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/21
@ -288,7 +288,6 @@ public:
|
||||
virtual void page_did_unhover_link() { }
|
||||
virtual void page_did_change_favicon(Gfx::Bitmap const&) { }
|
||||
virtual void page_did_layout() { }
|
||||
virtual void page_did_request_scroll_to(CSSPixelPoint) { }
|
||||
virtual void page_did_request_alert(String const&) { }
|
||||
virtual void page_did_request_confirm(String const&) { }
|
||||
virtual void page_did_request_prompt(String const&, String const&) { }
|
||||
|
@ -154,7 +154,6 @@ public:
|
||||
Function<void()> on_navigate_forward;
|
||||
Function<void()> on_refresh;
|
||||
Function<void(Gfx::Bitmap const&)> on_favicon_change;
|
||||
Function<void(Gfx::IntPoint)> on_scroll_to_point;
|
||||
Function<void(Gfx::StandardCursor)> on_cursor_change;
|
||||
Function<void(Gfx::IntPoint, ByteString const&)> on_enter_tooltip_area;
|
||||
Function<void()> on_leave_tooltip_area;
|
||||
|
@ -149,14 +149,6 @@ void WebContentClient::did_change_url(u64 page_id, URL::URL const& url)
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_scroll_to(u64 page_id, Gfx::IntPoint scroll_position)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_scroll_to_point)
|
||||
view->on_scroll_to_point(scroll_position);
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentClient::did_enter_tooltip_area(u64 page_id, Gfx::IntPoint content_position, ByteString const& title)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
|
@ -46,7 +46,6 @@ private:
|
||||
virtual void did_layout(u64 page_id, Gfx::IntSize) override;
|
||||
virtual void did_change_title(u64 page_id, ByteString const&) override;
|
||||
virtual void did_change_url(u64 page_id, URL::URL const&) override;
|
||||
virtual void did_request_scroll_to(u64 page_id, Gfx::IntPoint) override;
|
||||
virtual void did_enter_tooltip_area(u64 page_id, Gfx::IntPoint, ByteString const&) override;
|
||||
virtual void did_leave_tooltip_area(u64 page_id) override;
|
||||
virtual void did_hover_link(u64 page_id, URL::URL const&) override;
|
||||
|
@ -309,19 +309,6 @@ Gfx::IntRect PageClient::page_did_request_fullscreen_window()
|
||||
return client().did_request_fullscreen_window(m_id);
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_scroll_to(Web::CSSPixelPoint scroll_position)
|
||||
{
|
||||
// NOTE: The viewport scroll position is updated preemptively, so that subsequent
|
||||
// viewport offset calculation could use new offset even before actual
|
||||
// scroll on browser side happens.
|
||||
auto viewport = page().top_level_traversable()->viewport_rect();
|
||||
viewport.set_location(scroll_position);
|
||||
page().top_level_traversable()->set_viewport_size(viewport.size());
|
||||
|
||||
auto device_scroll_position = page().css_to_device_point(scroll_position);
|
||||
client().async_did_request_scroll_to(m_id, device_scroll_position.to_type<int>());
|
||||
}
|
||||
|
||||
void PageClient::page_did_enter_tooltip_area(Web::CSSPixelPoint content_position, ByteString const& title)
|
||||
{
|
||||
auto device_position = page().css_to_device_point(content_position);
|
||||
|
@ -107,7 +107,6 @@ private:
|
||||
virtual Gfx::IntRect page_did_request_maximize_window() override;
|
||||
virtual Gfx::IntRect page_did_request_minimize_window() override;
|
||||
virtual Gfx::IntRect page_did_request_fullscreen_window() override;
|
||||
virtual void page_did_request_scroll_to(Web::CSSPixelPoint) override;
|
||||
virtual void page_did_enter_tooltip_area(Web::CSSPixelPoint, ByteString const&) override;
|
||||
virtual void page_did_leave_tooltip_area() override;
|
||||
virtual void page_did_hover_link(URL::URL const&) override;
|
||||
|
@ -29,7 +29,6 @@ endpoint WebContentClient
|
||||
did_layout(u64 page_id, Gfx::IntSize content_size) =|
|
||||
did_change_title(u64 page_id, ByteString title) =|
|
||||
did_change_url(u64 page_id, URL::URL url) =|
|
||||
did_request_scroll_to(u64 page_id, Gfx::IntPoint scroll_position) =|
|
||||
did_enter_tooltip_area(u64 page_id, Gfx::IntPoint content_position, ByteString title) =|
|
||||
did_leave_tooltip_area(u64 page_id) =|
|
||||
did_hover_link(u64 page_id, URL::URL url) =|
|
||||
|
Loading…
Reference in New Issue
Block a user