mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibWeb: Move ExceptionOr from DOM/ to WebIDL/
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
This commit is contained in:
parent
c0eda77928
commit
ad04d7ac9b
107 changed files with 441 additions and 440 deletions
|
@ -27,15 +27,15 @@ public:
|
|||
|
||||
// FIXME: There are a ton of methods missing here.
|
||||
|
||||
ExceptionOr<void> set_start(Node& node, u32 offset);
|
||||
ExceptionOr<void> set_end(Node& node, u32 offset);
|
||||
ExceptionOr<void> set_start_before(Node& node);
|
||||
ExceptionOr<void> set_start_after(Node& node);
|
||||
ExceptionOr<void> set_end_before(Node& node);
|
||||
ExceptionOr<void> set_end_after(Node& node);
|
||||
ExceptionOr<void> select_node(Node& node);
|
||||
WebIDL::ExceptionOr<void> set_start(Node& node, u32 offset);
|
||||
WebIDL::ExceptionOr<void> set_end(Node& node, u32 offset);
|
||||
WebIDL::ExceptionOr<void> set_start_before(Node& node);
|
||||
WebIDL::ExceptionOr<void> set_start_after(Node& node);
|
||||
WebIDL::ExceptionOr<void> set_end_before(Node& node);
|
||||
WebIDL::ExceptionOr<void> set_end_after(Node& node);
|
||||
WebIDL::ExceptionOr<void> select_node(Node& node);
|
||||
void collapse(bool to_start);
|
||||
ExceptionOr<void> select_node_contents(Node const&);
|
||||
WebIDL::ExceptionOr<void> select_node_contents(Node const&);
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-range-start_to_start
|
||||
enum HowToCompareBoundaryPoints : u16 {
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
END_TO_START = 3,
|
||||
};
|
||||
|
||||
ExceptionOr<i16> compare_boundary_points(u16 how, Range const& source_range) const;
|
||||
WebIDL::ExceptionOr<i16> compare_boundary_points(u16 how, Range const& source_range) const;
|
||||
|
||||
JS::NonnullGCPtr<Range> inverted() const;
|
||||
JS::NonnullGCPtr<Range> normalized() const;
|
||||
|
@ -61,15 +61,15 @@ public:
|
|||
}
|
||||
|
||||
bool intersects_node(Node const&) const;
|
||||
ExceptionOr<bool> is_point_in_range(Node const&, u32 offset) const;
|
||||
ExceptionOr<i16> compare_point(Node const&, u32 offset) const;
|
||||
WebIDL::ExceptionOr<bool> is_point_in_range(Node const&, u32 offset) const;
|
||||
WebIDL::ExceptionOr<i16> compare_point(Node const&, u32 offset) const;
|
||||
|
||||
ExceptionOr<void> delete_contents();
|
||||
ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> extract_contents();
|
||||
ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> clone_contents();
|
||||
WebIDL::ExceptionOr<void> delete_contents();
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> extract_contents();
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> clone_contents();
|
||||
|
||||
ExceptionOr<void> insert_node(JS::NonnullGCPtr<Node>);
|
||||
ExceptionOr<void> surround_contents(JS::NonnullGCPtr<Node> new_parent);
|
||||
WebIDL::ExceptionOr<void> insert_node(JS::NonnullGCPtr<Node>);
|
||||
WebIDL::ExceptionOr<void> surround_contents(JS::NonnullGCPtr<Node> new_parent);
|
||||
|
||||
String to_string() const;
|
||||
|
||||
|
@ -84,12 +84,12 @@ private:
|
|||
End,
|
||||
};
|
||||
|
||||
ExceptionOr<void> set_start_or_end(Node& node, u32 offset, StartOrEnd start_or_end);
|
||||
ExceptionOr<void> select(Node& node);
|
||||
WebIDL::ExceptionOr<void> set_start_or_end(Node& node, u32 offset, StartOrEnd start_or_end);
|
||||
WebIDL::ExceptionOr<void> select(Node& node);
|
||||
|
||||
ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> extract();
|
||||
ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> clone_the_contents();
|
||||
ExceptionOr<void> insert(JS::NonnullGCPtr<Node>);
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> extract();
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentFragment>> clone_the_contents();
|
||||
WebIDL::ExceptionOr<void> insert(JS::NonnullGCPtr<Node>);
|
||||
|
||||
bool contains_node(Node const&) const;
|
||||
bool partially_contains_node(Node const&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue