mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
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:
parent
feecf89d65
commit
eece7697fd
Notes:
github-actions[bot]
2024-09-06 05:44:12 +00:00
Author: https://github.com/trflynn89
Commit: eece7697fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1292
4 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue