mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibWebView+Ladybird: Remove unused on_scroll_into_view callback
Leftover from 9624eca116
This commit is contained in:
parent
6032c06f6b
commit
d87f3a4101
4 changed files with 0 additions and 33 deletions
|
@ -47,24 +47,6 @@ WebViewBridge::WebViewBridge(Vector<Web::DevicePixelRect> screen_rects, float de
|
|||
on_scroll_to_point(position);
|
||||
};
|
||||
|
||||
on_scroll_into_view = [this](auto rect) {
|
||||
if (m_viewport_rect.contains(rect))
|
||||
return;
|
||||
|
||||
auto position = m_viewport_rect.location();
|
||||
|
||||
if (rect.top() < m_viewport_rect.top()) {
|
||||
position.set_y(rect.top());
|
||||
} else if (rect.top() > m_viewport_rect.top() && rect.bottom() > m_viewport_rect.bottom()) {
|
||||
position.set_y(rect.bottom() - m_viewport_rect.height());
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (on_scroll_to_point)
|
||||
on_scroll_to_point(position);
|
||||
};
|
||||
|
||||
on_scroll_to_point = [this](auto position) {
|
||||
if (on_scroll)
|
||||
on_scroll(to_widget_position(position));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue