mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:37:46 +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:
parent
dd6a0dd0f7
commit
fa99259412
2 changed files with 22 additions and 36 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue