mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Don't consider nodes in different namespaces to be equal
Previously, `Node::is_equal_node()` would return true for nodes in different namespaces that were otherwise equal.
This commit is contained in:
parent
319bb6353e
commit
7ab7be694d
Notes:
sideshowbarker
2024-07-19 21:36:05 +09:00
Author: https://github.com/tcl3
Commit: 7ab7be694d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/705
1 changed files with 2 additions and 2 deletions
|
@ -1573,8 +1573,8 @@ bool Node::is_equal_node(Node const* other_node) const
|
|||
return false;
|
||||
// If A is an element, each attribute in its attribute list has an attribute that equals an attribute in B’s attribute list.
|
||||
bool has_same_attributes = true;
|
||||
this_element.for_each_attribute([&](auto& name, auto& value) {
|
||||
if (other_element.get_attribute(name) != value)
|
||||
this_element.for_each_attribute([&](auto const& attribute) {
|
||||
if (other_element.get_attribute_ns(attribute.namespace_uri(), attribute.local_name()) != attribute.value())
|
||||
has_same_attributes = false;
|
||||
});
|
||||
if (!has_same_attributes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue