2024-06-23 17:05:47 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Andreas Kling <andreas@ladybird.org>
|
2024-07-16 12:08:34 +01:00
|
|
|
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
2024-06-23 17:05:47 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
2024-07-16 13:43:42 +01:00
|
|
|
#include <LibWeb/SVG/SVGURIReference.h>
|
2024-06-23 17:05:47 +02:00
|
|
|
|
|
|
|
namespace Web::SVG {
|
|
|
|
|
2024-07-16 13:43:42 +01:00
|
|
|
class SVGAElement final
|
|
|
|
: public SVGGraphicsElement
|
|
|
|
, public SVGURIReferenceMixin<SupportsXLinkHref::Yes> {
|
2024-06-23 17:05:47 +02:00
|
|
|
WEB_PLATFORM_OBJECT(SVGAElement, SVGGraphicsElement);
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DECLARE_ALLOCATOR(SVGAElement);
|
2024-06-23 17:05:47 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual ~SVGAElement() override;
|
|
|
|
|
2025-07-12 02:06:51 +01:00
|
|
|
GC::Ref<SVGAnimatedString> target();
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC::Ref<DOM::DOMTokenList> rel_list();
|
2024-07-16 12:08:34 +01:00
|
|
|
|
2024-12-20 16:35:12 +01:00
|
|
|
virtual GC::Ptr<Layout::Node> create_layout_node(GC::Ref<CSS::ComputedProperties>) override;
|
2024-06-28 14:51:57 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
SVGAElement(DOM::Document&, DOM::QualifiedName);
|
2024-07-16 12:08:34 +01:00
|
|
|
|
2024-06-28 14:51:57 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2024-07-16 12:08:34 +01:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
2025-04-18 10:27:59 +02:00
|
|
|
virtual bool is_svg_a_element() const override { return true; }
|
|
|
|
|
2024-07-16 12:08:34 +01:00
|
|
|
// ^DOM::Element
|
2024-11-14 08:14:16 -05:00
|
|
|
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
2024-08-14 18:45:18 +01:00
|
|
|
virtual i32 default_tab_index_value() const override;
|
2024-07-16 12:08:34 +01:00
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC::Ptr<DOM::DOMTokenList> m_rel_list;
|
2025-07-12 02:06:51 +01:00
|
|
|
|
|
|
|
GC::Ptr<SVGAnimatedString> m_target;
|
2024-06-23 17:05:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2025-04-18 10:27:59 +02:00
|
|
|
|
|
|
|
namespace Web::DOM {
|
2025-05-13 07:06:33 -04:00
|
|
|
|
2025-04-18 10:27:59 +02:00
|
|
|
template<>
|
|
|
|
inline bool Node::fast_is<SVG::SVGAElement>() const { return is_svg_a_element(); }
|
2025-05-13 07:06:33 -04:00
|
|
|
|
2025-04-18 10:27:59 +02:00
|
|
|
}
|