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

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

Issue 2124793002: Use the correct bounding rect in SVGInlineTextBox::nodeAtPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/line/SVGInlineTextBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
index 25ed6c5185200c75db69931ae951ffdb8b729ec4..0a25475cf44e4aeb57c6e128c23755b4688f8252 100644
--- a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
@@ -244,9 +244,8 @@ bool SVGInlineTextBox::nodeAtPoint(HitTestResult& result, const HitTestLocation&
if (hitRules.canHitBoundingBox
|| (hitRules.canHitStroke && (getLineLayoutItem().style()->svgStyle().hasStroke() || !hitRules.requireStroke))
|| (hitRules.canHitFill && (getLineLayoutItem().style()->svgStyle().hasFill() || !hitRules.requireFill))) {
- LayoutPoint boxOrigin(x(), y());
- boxOrigin.moveBy(accumulatedOffset);
- LayoutRect rect(boxOrigin, size());
+ LayoutRect rect(topLeft(), logicalSize());
Stephen Chennney 2016/07/06 14:47:37 You can do "LayoutRect rect(topLeft(), LayoutSize(
fs 2016/07/06 15:00:51 Yes. Done, and dropped method.
+ rect.moveBy(accumulatedOffset);
if (locationInContainer.intersects(rect)) {
LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->getLineLayoutItem());
ASSERT(lineLayoutItem.scalingFactor());

Powered by Google App Engine
This is Rietveld 408576698