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

Unified Diff: Source/core/layout/svg/SVGTextLayoutEngine.cpp

Issue 1150383003: Don't iterate past the end of the metrics list (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/SVGTextLayoutEngine.cpp
diff --git a/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/Source/core/layout/svg/SVGTextLayoutEngine.cpp
index 36d860b289ff2f66a0434c57e9e114383caacbb1..79956449be86a1beeb6dde89c195033f827e847d 100644
--- a/Source/core/layout/svg/SVGTextLayoutEngine.cpp
+++ b/Source/core/layout/svg/SVGTextLayoutEngine.cpp
@@ -357,7 +357,7 @@ void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, cons
// Main layout algorithm.
const unsigned boxEndOffset = textBox->start() + textBox->len();
- while (m_visualMetricsIterator.characterOffset() < boxEndOffset) {
+ while (!m_visualMetricsIterator.isAtEnd() && m_visualMetricsIterator.characterOffset() < boxEndOffset) {
const SVGTextMetrics& visualMetrics = m_visualMetricsIterator.metrics();
if (visualMetrics.isEmpty()) {
m_visualMetricsIterator.next();
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698