mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 03:39:04 +00:00
LibWeb: Implement Node.isEqualNode() for ProcessingInstruction nodes
This commit is contained in:
parent
8b0ace6289
commit
b005e816a3
Notes:
sideshowbarker
2024-07-17 06:45:52 +09:00
Author: https://github.com/awesomekling
Commit: b005e816a3
Pull-request: https://github.com/SerenityOS/serenity/pull/16469
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/emilio
1 changed files with 10 additions and 2 deletions
|
@ -1274,8 +1274,16 @@ bool Node::is_equal_node(Node const* other_node) const
|
|||
return false;
|
||||
break;
|
||||
}
|
||||
case (u16)NodeType::PROCESSING_INSTRUCTION_NODE:
|
||||
TODO();
|
||||
case (u16)NodeType::PROCESSING_INSTRUCTION_NODE: {
|
||||
// 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:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue