1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:57:44 +00:00

LibWeb: Don't include DOM/Attr.h from DOM/Element.h

This required moving Element::for_each_attribute() out of line, but that
seems harmless enough.
This commit is contained in:
Andreas Kling 2023-05-08 06:49:38 +02:00 committed by Jelle Raaijmakers
parent 43616316de
commit 5b5fbecb38
5 changed files with 13 additions and 9 deletions

View file

@ -13,7 +13,6 @@
#include <LibWeb/Bindings/ShadowRootPrototype.h>
#include <LibWeb/Bindings/WindowGlobalMixin.h>
#include <LibWeb/CSS/CSSStyleDeclaration.h>
#include <LibWeb/DOM/Attr.h>
#include <LibWeb/DOM/ChildNode.h>
#include <LibWeb/DOM/NamedNodeMap.h>
#include <LibWeb/DOM/NonDocumentTypeChildNode.h>
@ -118,14 +117,7 @@ public:
int client_width() const;
int client_height() const;
template<typename Callback>
void for_each_attribute(Callback callback) const
{
for (size_t i = 0; i < m_attributes->length(); ++i) {
auto const* attribute = m_attributes->item(i);
callback(attribute->name(), attribute->value());
}
}
void for_each_attribute(Function<void(DeprecatedFlyString const&, DeprecatedString const&)>) const;
bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
Vector<FlyString> const& class_names() const { return m_classes; }