1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11: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:
Andreas Kling 2020-07-05 14:50:38 +02:00
parent 2b80a45f82
commit 56d14d5701
7 changed files with 39 additions and 49 deletions

View file

@ -54,7 +54,6 @@ public:
void reload();
bool load(const URL&);
void scroll_to_anchor(const StringView&);
URL url() const;
@ -110,10 +109,10 @@ private:
virtual void page_did_leave_tooltip_area() override;
virtual void page_did_hover_link(const URL&) override;
virtual void page_did_unhover_link() override;
virtual void page_did_request_scroll_to_anchor(const String& fragment) override;
virtual void page_did_invalidate(const Gfx::IntRect&) override;
virtual void page_did_change_favicon(const Gfx::Bitmap&) override;
virtual void page_did_layout() override;
virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override;
void layout_and_sync_size();