From 56d14d57013af3d1f7efbf957b2632b0390d2e0f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 5 Jul 2020 14:50:38 +0200 Subject: LibWeb: Move fragment link handling to Frame Activating a "#foo" fragment link will now be handled internally by the Frame instead of involving the widget layer. If the viewport needs to be scrolled as a result, we will simply ask the PageClient to scroll a new rect into view. --- Applications/Browser/Tab.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Applications') diff --git a/Applications/Browser/Tab.cpp b/Applications/Browser/Tab.cpp index 7c56f4ad7d..66888a8625 100644 --- a/Applications/Browser/Tab.cpp +++ b/Applications/Browser/Tab.cpp @@ -159,13 +159,8 @@ Tab::Tab() auto url = m_page_view->document()->complete_url(href); on_tab_open_request(url); } else { - if (href.starts_with("#")) { - auto anchor = href.substring_view(1, href.length() - 1); - m_page_view->scroll_to_anchor(anchor); - } else { - auto url = m_page_view->document()->complete_url(href); - m_page_view->load(url); - } + auto url = m_page_view->document()->complete_url(href); + m_page_view->load(url); } }; -- cgit v1.2.3