Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Issue 1961953004: Use the right TextRun length when checking for surrogate pairs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/unpaired-surrogate-with-trailing-char-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
index fb03e762444b41671909d75ed18e42cd4c22826d..5c05772642645297c144ac83287cb1dfe9f4a22b 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
@@ -197,7 +197,7 @@ inline bool isValidSurrogatePair(const TextRun& run, unsigned index)
{
if (!U16_IS_LEAD(run[index]))
return false;
- if (index + 1 >= static_cast<unsigned>(run.charactersLength()))
+ if (index + 1 >= static_cast<unsigned>(run.length()))
return false;
return U16_IS_TRAIL(run[index + 1]);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/unpaired-surrogate-with-trailing-char-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698