mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +00:00
LibWeb: Store "text for rendering" in TextPaintable
Instead of TextPaintable fragments being an offset+length view into the layout node, they are now a view into the paintable instead. This removes an awkward time window where we'd have bogus state in text fragments after layout invalidation but before relayout. It also makes the code slightly nicer in general, since there's less mixing of layout and painting concepts.
This commit is contained in:
parent
2be47c3d7a
commit
dd8504c68d
Notes:
sideshowbarker
2024-07-17 01:13:25 +09:00
Author: https://github.com/awesomekling
Commit: dd8504c68d
Pull-request: https://github.com/SerenityOS/serenity/pull/23626
9 changed files with 54 additions and 43 deletions
|
@ -466,7 +466,7 @@ Optional<TextNode::Chunk> TextNode::ChunkIterator::try_commit_chunk(Utf8View::It
|
|||
|
||||
JS::GCPtr<Painting::Paintable> TextNode::create_paintable() const
|
||||
{
|
||||
return Painting::TextPaintable::create(*this);
|
||||
return Painting::TextPaintable::create(*this, text_for_rendering());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue