Index: Source/core/layout/svg/SVGTextQuery.cpp |
diff --git a/Source/core/layout/svg/SVGTextQuery.cpp b/Source/core/layout/svg/SVGTextQuery.cpp |
index 46543ffaa507858c41ff97ea518ef1e325513f4e..4e8b6443a92c6bbfc0ece1b010dc8e3686c0dfc6 100644 |
--- a/Source/core/layout/svg/SVGTextQuery.cpp |
+++ b/Source/core/layout/svg/SVGTextQuery.cpp |
@@ -256,7 +256,7 @@ bool SVGTextQuery::subStringLengthCallback(Data* queryData, const SVGTextFragmen |
if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition)) |
return false; |
- SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textLayoutObject, fragment.characterOffset + startPosition, endPosition - startPosition, queryData->textLayoutObject->styleRef().direction()); |
+ SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textLayoutObject, fragment.characterOffset + startPosition, endPosition - startPosition, queryData->textBox->direction()); |
data->subStringLength += queryData->isVerticalText ? metrics.height() : metrics.width(); |
return false; |
} |