Bladeren bron

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

Maciej 3 jaren geleden
bovenliggende
commit
86c0961240
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      Userland/Libraries/LibWeb/Layout/TextNode.cpp
  2. 1 1
      Userland/Libraries/LibWeb/Layout/TextNode.h

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

@@ -344,7 +344,7 @@ Optional<TextNode::Chunk> TextNode::ChunkIterator::next()
     return {};
     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)
     if (m_layout_mode == LayoutMode::OnlyRequiredLineBreaks && !must_commit)
         return {};
         return {};

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

@@ -39,7 +39,7 @@ public:
         Optional<Chunk> next();
         Optional<Chunk> next();
 
 
     private:
     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 LayoutMode m_layout_mode;
         const bool m_wrap_lines;
         const bool m_wrap_lines;