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

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

Issue 2005023005: Use the right TextRun length when checking for surrogate pairs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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/SVGTextMetricsBuilder.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
index 82557fd256b0ee7a5c9c215f0f728d91cb41f306..49681b6edbef7b8000c81ddb46a569901be0dc1b 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp
@@ -40,7 +40,7 @@ inline bool characterStartsSurrogatePair(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