mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:47:44 +00:00
LibWeb: Add support for range deletion.
This commit is contained in:
parent
bbcc5a9332
commit
43dc47a494
8 changed files with 107 additions and 6 deletions
|
@ -53,4 +53,12 @@ LayoutRange LayoutRange::normalized() const
|
|||
return { m_end, m_start };
|
||||
}
|
||||
|
||||
DOM::Range LayoutRange::to_dom_range() const
|
||||
{
|
||||
if (!is_valid())
|
||||
return {};
|
||||
|
||||
return { m_start.to_dom_position(), m_end.to_dom_position() };
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@ public:
|
|||
|
||||
LayoutRange normalized() const;
|
||||
|
||||
DOM::Range to_dom_range() const;
|
||||
|
||||
private:
|
||||
LayoutPosition m_start;
|
||||
LayoutPosition m_end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue