diff options
author | Andreas Kling <kling@serenityos.org> | 2023-01-11 19:48:53 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-12 19:55:10 +0100 |
commit | b79bc25a1f8be2ed7ad64e555b8679e169a7101b (patch) | |
tree | e21d4cb69569f63687e58a7936f9f25f4bed9b7b /Userland/Libraries/LibWeb/DOM/ARIAMixin.idl | |
parent | 1c4328902d3d2ca9b519ded17a7acb9cb105969e (diff) | |
download | serenity-b79bc25a1f8be2ed7ad64e555b8679e169a7101b.zip |
LibWeb: Use DOM Selection instead of ad-hoc layout tree selection
Before this patch, we were expressing the current selection as a range
between two points in the layout tree. This was a made-up concept I
called LayoutRange (2x LayoutPosition) and as it turns out, we don't
actually need it!
Instead, we can just use the Selection API from the Selection API spec.
This API expresses selection in terms of the DOM, and we already had
many of the building blocks implemented.
To ensure that selections get visually updated when the underlying Range
of an active Selection is programmatically manipulated, Range now has
an "associated Selection". If a range is updated while associated with
a selection, we recompute layout tree selection states and repaint the
page to make it user-visible.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/ARIAMixin.idl')
0 files changed, 0 insertions, 0 deletions