mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Remove unnecessary lowercase name property from Attr
This commit is contained in:
parent
b7a71ca950
commit
61af399b50
Notes:
github-actions[bot]
2025-11-10 21:56:38 +00:00
Author: https://github.com/tcl3
Commit: 61af399b50
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6779
3 changed files with 1 additions and 4 deletions
|
|
@ -3749,7 +3749,7 @@ static void for_each_element_hash(DOM::Element const& element, auto callback)
|
|||
for (auto const& class_ : element.class_names())
|
||||
callback(class_.hash());
|
||||
element.for_each_attribute([&](auto& attribute) {
|
||||
callback(attribute.lowercase_name().hash());
|
||||
callback(attribute.name().ascii_case_insensitive_hash());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ GC::Ref<Attr> Attr::clone(Document& document) const
|
|||
Attr::Attr(Document& document, QualifiedName qualified_name, String value, Element* owner_element)
|
||||
: Node(document, NodeType::ATTRIBUTE_NODE)
|
||||
, m_qualified_name(move(qualified_name))
|
||||
, m_lowercase_name(MUST(String(m_qualified_name.as_string()).to_lowercase()))
|
||||
, m_value(move(value))
|
||||
, m_owner_element(owner_element)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ public:
|
|||
Optional<FlyString> const& prefix() const { return m_qualified_name.prefix(); }
|
||||
FlyString const& local_name() const { return m_qualified_name.local_name(); }
|
||||
FlyString const& name() const { return m_qualified_name.as_string(); }
|
||||
FlyString const& lowercase_name() const { return m_lowercase_name; }
|
||||
|
||||
String const& value() const { return m_value; }
|
||||
WebIDL::ExceptionOr<void> set_value(String value);
|
||||
|
|
@ -53,7 +52,6 @@ private:
|
|||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
QualifiedName m_qualified_name;
|
||||
FlyString m_lowercase_name;
|
||||
String m_value;
|
||||
GC::Ptr<Element> m_owner_element;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue