Chromium Code Reviews| Index: Source/core/layout/svg/LayoutSVGInlineText.cpp |
| diff --git a/Source/core/layout/svg/LayoutSVGInlineText.cpp b/Source/core/layout/svg/LayoutSVGInlineText.cpp |
| index 69553b53f7abf9be827f39d611b7d3ff8fb6bca5..c7ee7be1498ce4b4cb6ed495a2fda79d181700b4 100644 |
| --- a/Source/core/layout/svg/LayoutSVGInlineText.cpp |
| +++ b/Source/core/layout/svg/LayoutSVGInlineText.cpp |
| @@ -184,7 +184,7 @@ PositionWithAffinity LayoutSVGInlineText::positionForPoint(const LayoutPoint& po |
| fragment.buildFragmentTransform(fragmentTransform); |
| fragmentRect = fragmentTransform.mapRect(fragmentRect); |
| - float distance = powf(fragmentRect.x() - absolutePoint.x(), 2) + |
| + float distance = powf(fragmentRect.x() + fragmentRect.width() / 2 - absolutePoint.x(), 2) + |
|
fs
2015/04/21 10:46:20
Looks like this could now be:
float distance = (f
|
| powf(fragmentRect.y() + fragmentRect.height() / 2 - absolutePoint.y(), 2); |
| if (distance < closestDistance) { |