1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

LibWeb: Implement Range.extractContents()

Another point on Acid3 coming through! :^)
This commit is contained in:
Andreas Kling 2022-03-21 18:06:28 +01:00
parent 24e25fe3d0
commit 16f4c76da6
3 changed files with 244 additions and 0 deletions

View file

@ -61,6 +61,8 @@ public:
ExceptionOr<bool> is_point_in_range(Node const&, u32 offset) const;
ExceptionOr<i16> compare_point(Node const&, u32 offset) const;
ExceptionOr<NonnullRefPtr<DocumentFragment>> extract_contents();
String to_string() const;
private:
@ -78,6 +80,11 @@ private:
ExceptionOr<void> set_start_or_end(Node& node, u32 offset, StartOrEnd start_or_end);
ExceptionOr<void> select(Node& node);
ExceptionOr<NonnullRefPtr<DocumentFragment>> extract();
bool contains_node(Node const&) const;
bool partially_contains_node(Node const&) const;
};
}