mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:35:08 +00:00
LibHTML+Browser: Support scrolling to anchor with <a href="#foo">
This patch implements basic support for <a href="#foo"> fragment links. To figure out where we actually want to scroll to, we have to do something different based on the layout node's box type. So if it's a regular LayoutBox we can just use the LayoutBox::position(). However, if it's an inline layout node, we use the position of the first line box fragment in the containing block contributed by this layout node or one of its descendants.
This commit is contained in:
parent
202dfbd6cd
commit
c41bae3d54
8 changed files with 100 additions and 13 deletions
|
@ -23,6 +23,7 @@ public:
|
|||
|
||||
void reload();
|
||||
void load(const URL&);
|
||||
void scroll_to_anchor(const StringView&);
|
||||
|
||||
URL url() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue