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

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

Issue 1844723003: Move metrics list storage to LayoutSVGInlineText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
index 6ea9250307c4ba2e4420039fdb1d8cecc3b9969d..bbff8d05fffd43fb6a7a89e2e1935fa5cadf9c45 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
@@ -296,21 +296,21 @@ bool SVGTextLayoutEngine::currentLogicalCharacterAttributes(SVGTextLayoutAttribu
bool SVGTextLayoutEngine::currentLogicalCharacterMetrics(SVGTextLayoutAttributes*& logicalAttributes, SVGTextMetrics& logicalMetrics)
{
- const Vector<SVGTextMetrics>* textMetricsValues = &logicalAttributes->textMetricsValues();
- unsigned textMetricsSize = textMetricsValues->size();
+ const Vector<SVGTextMetrics>* metricsList = &logicalAttributes->context()->metricsList();
+ unsigned metricsListSize = metricsList->size();
while (true) {
- if (m_logicalMetricsListOffset == textMetricsSize) {
+ if (m_logicalMetricsListOffset == metricsListSize) {
if (!currentLogicalCharacterAttributes(logicalAttributes))
return false;
- textMetricsValues = &logicalAttributes->textMetricsValues();
- textMetricsSize = textMetricsValues->size();
+ metricsList = &logicalAttributes->context()->metricsList();
+ metricsListSize = metricsList->size();
continue;
}
- ASSERT(textMetricsSize);
- ASSERT(m_logicalMetricsListOffset < textMetricsSize);
- logicalMetrics = textMetricsValues->at(m_logicalMetricsListOffset);
+ ASSERT(metricsListSize);
+ ASSERT(m_logicalMetricsListOffset < metricsListSize);
+ logicalMetrics = metricsList->at(m_logicalMetricsListOffset);
if (logicalMetrics.isEmpty() || (!logicalMetrics.width() && !logicalMetrics.height())) {
advanceToNextLogicalCharacter(logicalMetrics);
continue;

Powered by Google App Engine
This is Rietveld 408576698