LibWeb: Clear grapheme segmenter when invalidating TextNode text

We only set the grapheme segmenter's text once after creating a new
segmenter, so we also need to clear it whenever we invalidate the text.
This commit is contained in:
Jelle Raaijmakers 2024-10-09 18:53:50 +02:00
commit 25516e351e
Notes: github-actions[bot] 2024-10-09 21:08:10 +00:00
3 changed files with 12 additions and 0 deletions

View file

@ -304,6 +304,7 @@ static ErrorOr<String> apply_text_transform(String const& string, CSS::TextTrans
void TextNode::invalidate_text_for_rendering()
{
m_text_for_rendering = {};
m_grapheme_segmenter.clear();
}
String const& TextNode::text_for_rendering() const