LibWeb: Add concept of boundary point to DOM::AbstractRange

This makes comparing the relative position of boundary points a bit
nicer when one of the boundary points is the range's start or end.
This commit is contained in:
Jelle Raaijmakers 2024-12-18 13:30:19 +01:00 committed by Jelle Raaijmakers
commit e6631a4216
Notes: github-actions[bot] 2024-12-21 18:17:22 +00:00
7 changed files with 88 additions and 102 deletions

View file

@ -22,7 +22,7 @@ enum class RelativeBoundaryPointPosition {
};
// https://dom.spec.whatwg.org/#concept-range-bp-position
RelativeBoundaryPointPosition position_of_boundary_point_relative_to_other_boundary_point(GC::Ref<Node> node_a, u32 offset_a, GC::Ref<Node> node_b, u32 offset_b);
RelativeBoundaryPointPosition position_of_boundary_point_relative_to_other_boundary_point(BoundaryPoint a, BoundaryPoint b);
class Range final : public AbstractRange {
WEB_PLATFORM_OBJECT(Range, AbstractRange);