Browse Source

LibWeb: Make TextNode::ChunkIterator::try_commit_chunk() const

Maciej 3 years ago
parent
commit
86c0961240

+ 1 - 1
Userland/Libraries/LibWeb/Layout/TextNode.cpp

@@ -344,7 +344,7 @@ Optional<TextNode::Chunk> TextNode::ChunkIterator::next()
     return {};
 }
 
-Optional<TextNode::Chunk> TextNode::ChunkIterator::try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit)
+Optional<TextNode::Chunk> 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 {};

+ 1 - 1
Userland/Libraries/LibWeb/Layout/TextNode.h

@@ -39,7 +39,7 @@ public:
         Optional<Chunk> next();
 
     private:
-        Optional<Chunk> try_commit_chunk(Utf8View::Iterator const& start, Utf8View::Iterator const& end, bool has_breaking_newline, bool must_commit = false);
+        Optional<Chunk> 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;