mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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
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