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

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: Rebase; remove InlineBox addition 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/hittest/text-vertical.html ('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/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..b3b9d493e15cf144dc302826f50120edbae7d30c 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(), LayoutSize(logicalWidth(), logicalHeight()));
+ rect.moveBy(accumulatedOffset);
if (locationInContainer.intersects(rect)) {
LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->getLineLayoutItem());
ASSERT(lineLayoutItem.scalingFactor());
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/hittest/text-vertical.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698