1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

LibWeb: Simplify text chunk iteration a little bit

Instead of TextNode::ChunkIterator having two bool members to remember
things across calls to next(), this patch reorganizes the loop in next()
so that preserved newline/whitespace chunks are emitted right away
instead of in an awkward deferred way.
This commit is contained in:
Andreas Kling 2022-03-26 19:58:10 +01:00
parent dd6a0dd0f7
commit fa99259412
2 changed files with 22 additions and 36 deletions

View file

@ -42,8 +42,6 @@ public:
const LayoutMode m_layout_mode;
const bool m_wrap_lines;
const bool m_respect_linebreaks;
bool m_last_was_space { false };
bool m_last_was_newline { false };
Utf8View m_utf8_view;
Utf8View::Iterator m_iterator;
};