From 86c0961240ac23b8a7c42472b7c8b2ae2e5d2f69 Mon Sep 17 00:00:00 2001 From: Maciej Date: Sun, 6 Mar 2022 22:23:47 +0100 Subject: [PATCH] LibWeb: Make TextNode::ChunkIterator::try_commit_chunk() const --- Userland/Libraries/LibWeb/Layout/TextNode.cpp | 2 +- Userland/Libraries/LibWeb/Layout/TextNode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.cpp b/Userland/Libraries/LibWeb/Layout/TextNode.cpp index 4374242f3f..a86ecf2533 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.cpp +++ b/Userland/Libraries/LibWeb/Layout/TextNode.cpp @@ -344,7 +344,7 @@ Optional TextNode::ChunkIterator::next() return {}; } -Optional TextNode::ChunkIterator::try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit) +Optional TextNode::ChunkIterator::try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit) const { if (m_layout_mode == LayoutMode::OnlyRequiredLineBreaks && !must_commit) return {}; diff --git a/Userland/Libraries/LibWeb/Layout/TextNode.h b/Userland/Libraries/LibWeb/Layout/TextNode.h index 09a77334ad..fc1599402b 100644 --- a/Userland/Libraries/LibWeb/Layout/TextNode.h +++ b/Userland/Libraries/LibWeb/Layout/TextNode.h @@ -39,7 +39,7 @@ public: Optional next(); private: - Optional try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit = false); + Optional try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit = false) const; const LayoutMode m_layout_mode; const bool m_wrap_lines;