Skip to content
Browse files
Make TextRun::isolatedCopy copy character data in more cases

Reviewed by Simon Fraser.

* Source/WebCore/platform/graphics/TextRun.h:
(WebCore::TextRun::isolatedCopy const):

Canonical link:
git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
heycam committed Jun 14, 2022
1 parent 623a598 commit 98129b5af85678352fb70aa76215e0119333405b
Showing 1 changed file with 4 additions and 2 deletions.
@@ -184,8 +184,10 @@ inline void TextRun::setTabSize(bool allow, const TabSize& size)
inline TextRun TextRun::isolatedCopy() const
TextRun clone = *this;
if (m_text.impl() && m_text.impl()->isExternal())
clone.m_text = m_text.isolatedCopy();
if (clone.m_text.is8Bit())
clone.m_text = String(clone.m_text.characters8(), clone.m_text.length());
clone.m_text = String(clone.m_text.characters16(), clone.m_text.length());
return clone;

0 comments on commit 98129b5

Please sign in to comment.