LibWeb: Rename CharacterData's segmenter indicate it is for graphemes

We will be adding a word segmenter as well, so this is to disambiguate
the two.
This commit is contained in:
Timothy Flynn 2024-09-05 09:59:59 -04:00 committed by Andreas Kling
commit eece7697fd
Notes: github-actions[bot] 2024-09-06 05:44:12 +00:00
4 changed files with 12 additions and 12 deletions

View file

@ -41,7 +41,7 @@ bool Position::increment_offset()
auto& node = verify_cast<DOM::Text>(*m_node);
if (auto offset = node.segmenter().next_boundary(m_offset); offset.has_value()) {
if (auto offset = node.grapheme_segmenter().next_boundary(m_offset); offset.has_value()) {
m_offset = *offset;
return true;
}
@ -57,7 +57,7 @@ bool Position::decrement_offset()
auto& node = verify_cast<DOM::Text>(*m_node);
if (auto offset = node.segmenter().previous_boundary(m_offset); offset.has_value()) {
if (auto offset = node.grapheme_segmenter().previous_boundary(m_offset); offset.has_value()) {
m_offset = *offset;
return true;
}