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

Unified Diff: Source/core/layout/svg/LayoutSVGRoot.cpp

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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: Source/core/layout/svg/LayoutSVGRoot.cpp
diff --git a/Source/core/layout/svg/LayoutSVGRoot.cpp b/Source/core/layout/svg/LayoutSVGRoot.cpp
index e2f0277b019095c13e0cd549e3b3cb3869c2ed96..8413cee836aea3b1157456b33351c88a3346f30a 100644
--- a/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -396,7 +396,7 @@ bool LayoutSVGRoot::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
for (LayoutObject* child = lastChild(); child; child = child->previousSibling()) {
// FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet.
if (child->nodeAtFloatPoint(result, localPoint, hitTestAction)) {
- updateHitTestResult(result, pointInBorderBox);
+ updateHitTestResult(result, pointInBorderBox, boundingRect(locationInContainer.point()));
if (!result.addNodeToListBasedTestResult(child->node(), locationInContainer))
return true;
}
@@ -412,7 +412,7 @@ bool LayoutSVGRoot::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
// If we'd return true here in the 'Foreground' phase, we are not able to detect these hits anymore.
LayoutRect boundsRect(accumulatedOffset + location(), size());
if (locationInContainer.intersects(boundsRect)) {
- updateHitTestResult(result, pointInBorderBox);
+ updateHitTestResult(result, pointInBorderBox, boundsRect);
if (!result.addNodeToListBasedTestResult(node(), locationInContainer, boundsRect))
return true;
}

Powered by Google App Engine
This is Rietveld 408576698