mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb+LibWebView+WebContent: Remove unused request_scroll_into_view
`Element::scroll_into_view()` is supposed to be used instead.
This commit is contained in:
parent
f6f80a1a72
commit
9624eca116
Notes:
sideshowbarker
2024-07-16 23:44:30 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/9624eca116 Pull-request: https://github.com/SerenityOS/serenity/pull/22351
@ -255,7 +255,6 @@ public:
|
||||
virtual void page_did_layout() { }
|
||||
virtual void page_did_request_scroll(i32, i32) { }
|
||||
virtual void page_did_request_scroll_to(CSSPixelPoint) { }
|
||||
virtual void page_did_request_scroll_into_view(CSSPixelRect const&) { }
|
||||
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&) { }
|
||||
|
@ -125,13 +125,6 @@ void WebContentClient::did_request_scroll_to(Gfx::IntPoint scroll_position)
|
||||
m_view.on_scroll_to_point(scroll_position);
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_scroll_into_view(Gfx::IntRect const& rect)
|
||||
{
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidRequestScrollIntoView! rect={}", rect);
|
||||
if (m_view.on_scroll_into_view)
|
||||
m_view.on_scroll_into_view(rect);
|
||||
}
|
||||
|
||||
void WebContentClient::did_enter_tooltip_area(Gfx::IntPoint content_position, ByteString const& title)
|
||||
{
|
||||
if (m_view.on_enter_tooltip_area)
|
||||
|
@ -42,7 +42,6 @@ private:
|
||||
virtual void did_change_title(ByteString const&) override;
|
||||
virtual void did_request_scroll(i32, i32) override;
|
||||
virtual void did_request_scroll_to(Gfx::IntPoint) override;
|
||||
virtual void did_request_scroll_into_view(Gfx::IntRect const&) override;
|
||||
virtual void did_enter_tooltip_area(Gfx::IntPoint, ByteString const&) override;
|
||||
virtual void did_leave_tooltip_area() override;
|
||||
virtual void did_hover_link(AK::URL const&) override;
|
||||
|
@ -285,15 +285,6 @@ void PageClient::page_did_request_scroll_to(Web::CSSPixelPoint scroll_position)
|
||||
client().async_did_request_scroll_to(device_scroll_position.to_type<int>());
|
||||
}
|
||||
|
||||
void PageClient::page_did_request_scroll_into_view(Web::CSSPixelRect const& rect)
|
||||
{
|
||||
auto device_pixel_rect = page().enclosing_device_rect(rect);
|
||||
client().async_did_request_scroll_into_view({ device_pixel_rect.x().value(),
|
||||
device_pixel_rect.y().value(),
|
||||
device_pixel_rect.width().value(),
|
||||
device_pixel_rect.height().value() });
|
||||
}
|
||||
|
||||
void PageClient::page_did_enter_tooltip_area(Web::CSSPixelPoint content_position, ByteString const& title)
|
||||
{
|
||||
client().async_did_enter_tooltip_area({ content_position.x().to_int(), content_position.y().to_int() }, title);
|
||||
|
@ -90,7 +90,6 @@ private:
|
||||
virtual Gfx::IntRect page_did_request_fullscreen_window() override;
|
||||
virtual void page_did_request_scroll(i32, i32) override;
|
||||
virtual void page_did_request_scroll_to(Web::CSSPixelPoint) override;
|
||||
virtual void page_did_request_scroll_into_view(Web::CSSPixelRect const&) 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(const URL&) override;
|
||||
|
@ -25,7 +25,6 @@ endpoint WebContentClient
|
||||
did_change_title(ByteString title) =|
|
||||
did_request_scroll(i32 x_delta, i32 y_delta) =|
|
||||
did_request_scroll_to(Gfx::IntPoint scroll_position) =|
|
||||
did_request_scroll_into_view(Gfx::IntRect rect) =|
|
||||
did_enter_tooltip_area(Gfx::IntPoint content_position, ByteString title) =|
|
||||
did_leave_tooltip_area() =|
|
||||
did_hover_link(URL url) =|
|
||||
|
Loading…
Reference in New Issue
Block a user