1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

LibWeb: Generate a TextPaintable for every Layout::TextNode

This is prep work for moving event handling over to the painting tree.
This commit is contained in:
Andreas Kling 2022-03-10 16:46:44 +01:00
parent aae356baf1
commit 4d98851aea
7 changed files with 68 additions and 1 deletions

View file

@ -14,6 +14,7 @@
#include <LibWeb/Layout/InlineFormattingContext.h>
#include <LibWeb/Layout/Label.h>
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Painting/TextPaintable.h>
namespace Web::Layout {
@ -366,4 +367,9 @@ Optional<TextNode::Chunk> TextNode::ChunkIterator::try_commit_chunk(Utf8View::It
return {};
}
OwnPtr<Painting::Paintable> TextNode::create_paintable() const
{
return Painting::TextPaintable::create(*this);
}
}