mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibWeb: Make the Node.compareDocumentPosition() return value enum public
This will allow other parts of LibWeb to understand these values.
This commit is contained in:
parent
a925c2dcf2
commit
d4b2544dc5
2 changed files with 11 additions and 10 deletions
|
@ -927,16 +927,6 @@ void Node::remove_all_children(bool suppress_observers)
|
|||
// https://dom.spec.whatwg.org/#dom-node-comparedocumentposition
|
||||
u16 Node::compare_document_position(JS::GCPtr<Node> other)
|
||||
{
|
||||
enum Position : u16 {
|
||||
DOCUMENT_POSITION_EQUAL = 0,
|
||||
DOCUMENT_POSITION_DISCONNECTED = 1,
|
||||
DOCUMENT_POSITION_PRECEDING = 2,
|
||||
DOCUMENT_POSITION_FOLLOWING = 4,
|
||||
DOCUMENT_POSITION_CONTAINS = 8,
|
||||
DOCUMENT_POSITION_CONTAINED_BY = 16,
|
||||
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32,
|
||||
};
|
||||
|
||||
// 1. If this is other, then return zero.
|
||||
if (this == other.ptr())
|
||||
return DOCUMENT_POSITION_EQUAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue