LibWeb: Implement Node.isEqualNode() for ProcessingInstruction nodes

This commit is contained in:
Andreas Kling 2022-12-13 13:25:26 +01:00
commit b005e816a3
Notes: sideshowbarker 2024-07-17 06:45:52 +09:00

View file

@ -1274,8 +1274,16 @@ bool Node::is_equal_node(Node const* other_node) const
return false; return false;
break; break;
} }
case (u16)NodeType::PROCESSING_INSTRUCTION_NODE: case (u16)NodeType::PROCESSING_INSTRUCTION_NODE: {
TODO(); // Its target and data.
auto& this_processing_instruction = verify_cast<ProcessingInstruction>(*this);
auto& other_processing_instruction = verify_cast<ProcessingInstruction>(*other_node);
if (this_processing_instruction.target() != other_processing_instruction.target())
return false;
if (this_processing_instruction.data() != other_processing_instruction.data())
return false;
break;
}
default: default:
break; break;
} }