Title: [295516] trunk/Source/WebCore/platform/graphics/TextRun.h
Revision
295516
Author
[email protected]
Date
2022-06-13 23:30:59 -0700 (Mon, 13 Jun 2022)

Log Message

Make TextRun::isolatedCopy copy character data in more cases
https://bugs.webkit.org/show_bug.cgi?id=241581

Reviewed by Simon Fraser.

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

Canonical link: https://commits.webkit.org/251521@main

Modified Paths

Diff

Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (295515 => 295516)


--- trunk/Source/WebCore/platform/graphics/TextRun.h	2022-06-14 04:46:20 UTC (rev 295515)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h	2022-06-14 06:30:59 UTC (rev 295516)
@@ -184,8 +184,10 @@
 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());
+    else
+        clone.m_text = String(clone.m_text.characters16(), clone.m_text.length());
     return clone;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to