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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGTextQuery.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
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp ('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/SVGTextQuery.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp
index d1670c7da4a082ffa86ecd56be4db95cc6898b2f..28abb3e604635e5a22600ba70f59a454c8a2d311 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp
@@ -238,7 +238,7 @@ MetricsList::const_iterator findMetricsForCharacter(const MetricsList& metricsLi
static float calculateGlyphRange(const QueryData* queryData, const SVGTextFragment& fragment, unsigned start, unsigned end)
{
- const MetricsList& metricsList = queryData->textLineLayout.layoutAttributes()->textMetricsValues();
+ const MetricsList& metricsList = queryData->textLineLayout.metricsList();
auto metrics = findMetricsForCharacter(metricsList, fragment, start);
auto endMetrics = findMetricsForCharacter(metricsList, fragment, end);
float glyphRange = 0;
@@ -450,7 +450,7 @@ static inline FloatRect calculateGlyphBoundaries(const QueryData* queryData, con
glyphPosition.move(0, -baseline);
// Use the SVGTextMetrics computed by SVGTextMetricsBuilder.
- const MetricsList& metricsList = queryData->textLineLayout.layoutAttributes()->textMetricsValues();
+ const MetricsList& metricsList = queryData->textLineLayout.metricsList();
auto metrics = findMetricsForCharacter(metricsList, fragment, startPosition);
FloatRect extent = physicalGlyphExtents(queryData, *metrics, glyphPosition);
@@ -551,7 +551,7 @@ static bool characterNumberAtPositionCallback(QueryData* queryData, const SVGTex
// Iterate through the glyphs in this fragment, and check if their extents
// contain the query point.
MetricsList::const_iterator metrics =
- data->textLineLayout.layoutAttributes()->textMetricsValues().begin() + fragment.metricsListOffset;
+ data->textLineLayout.metricsList().begin() + fragment.metricsListOffset;
unsigned fragmentOffset = 0;
float glyphOffset = 0;
while (fragmentOffset < fragment.length) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextMetricsBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698