mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibWeb: Add LayoutRange::normalized()
We use this to ensure that we're always working with a selection where the start() is before the end() in document order. That simplifies all the logic around this.
This commit is contained in:
parent
706fc3d1aa
commit
9177eea8fe
5 changed files with 61 additions and 1 deletions
|
@ -78,6 +78,8 @@ public:
|
|||
const LayoutPosition& start() const { return m_start; }
|
||||
const LayoutPosition& end() const { return m_end; }
|
||||
|
||||
LayoutRange normalized() const;
|
||||
|
||||
private:
|
||||
LayoutPosition m_start;
|
||||
LayoutPosition m_end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue