ladybird/Libraries/LibHTML/DOM/Text.h
Andreas Kling f4f5ede10a LibHTML: Simplify Node::create_layout_node()
There's no need to pass the StyleResolver to this function. Nodes that
need it can just get it from the document.
2019-10-15 15:06:16 +02:00

21 lines
466 B
C++

#pragma once
#include <AK/String.h>
#include <LibHTML/DOM/CharacterData.h>
class Text final : public CharacterData {
public:
explicit Text(Document&, const String&);
virtual ~Text() override;
virtual String tag_name() const override { return "#text"; }
private:
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
};
template<>
inline bool is<Text>(const Node& node)
{
return node.is_text();
}