mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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.
This commit is contained in:
parent
2b80a45f82
commit
56d14d5701
Notes:
sideshowbarker
2024-07-19 05:08:25 +09:00
Author: https://github.com/awesomekling
Commit: 56d14d5701
7 changed files with 39 additions and 49 deletions
|
@ -71,6 +71,7 @@ public:
|
|||
EventHandler& event_handler() { return m_event_handler; }
|
||||
const EventHandler& event_handler() const { return m_event_handler; }
|
||||
|
||||
void scroll_to(const Gfx::IntPoint&);
|
||||
void scroll_to_anchor(const String&);
|
||||
|
||||
Frame& main_frame() { return m_main_frame; }
|
||||
|
@ -82,6 +83,7 @@ public:
|
|||
Gfx::IntPoint to_main_frame_position(const Gfx::IntPoint&);
|
||||
Gfx::IntRect to_main_frame_rect(const Gfx::IntRect&);
|
||||
|
||||
|
||||
private:
|
||||
explicit Frame(Element& host_element, Frame& main_frame);
|
||||
explicit Frame(Page&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue