mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
LibWeb: Remove BrowsingContext::scroll_to()
Let's use navigable directly instead of going through browsing context to request a scroll.
This commit is contained in:
parent
0c92c80544
commit
7ad0767aa0
3 changed files with 2 additions and 17 deletions
|
@ -343,19 +343,6 @@ bool BrowsingContext::is_focused_context() const
|
|||
return &m_page->focused_context() == this;
|
||||
}
|
||||
|
||||
void BrowsingContext::scroll_to(CSSPixelPoint position)
|
||||
{
|
||||
// NOTE: Scrolling to a position requires up-to-date layout *unless* we're scrolling to (0, 0)
|
||||
// as (0, 0) is always guaranteed to be a valid scroll position.
|
||||
if (!position.is_zero()) {
|
||||
if (active_document())
|
||||
active_document()->update_layout();
|
||||
}
|
||||
|
||||
if (auto navigable = active_document()->navigable())
|
||||
navigable->perform_scroll_of_viewport(position);
|
||||
}
|
||||
|
||||
JS::GCPtr<BrowsingContext> BrowsingContext::top_level_browsing_context() const
|
||||
{
|
||||
auto const* start = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue