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

Unified Diff: Source/core/layout/svg/LayoutSVGContainer.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/LayoutSVGContainer.cpp
diff --git a/Source/core/layout/svg/LayoutSVGContainer.cpp b/Source/core/layout/svg/LayoutSVGContainer.cpp
index 6f7b88eeb13636eb3abac0af295db2bdab769ed9..68e1fbcb327b81c83e6f369d7de07cc3637d15c1 100644
--- a/Source/core/layout/svg/LayoutSVGContainer.cpp
+++ b/Source/core/layout/svg/LayoutSVGContainer.cpp
@@ -24,6 +24,7 @@
#include "config.h"
#include "core/layout/svg/LayoutSVGContainer.h"
+#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutAnalyzer.h"
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/layout/svg/SVGResources.h"
@@ -174,7 +175,8 @@ bool LayoutSVGContainer::nodeAtFloatPoint(HitTestResult& result, const FloatPoin
for (LayoutObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->nodeAtFloatPoint(result, localPoint, hitTestAction)) {
- updateHitTestResult(result, roundedLayoutPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint),
+ boundingRect(result.hitTestLocation().point()));
return true;
}
}
@@ -183,7 +185,8 @@ bool LayoutSVGContainer::nodeAtFloatPoint(HitTestResult& result, const FloatPoin
if (style()->pointerEvents() == PE_BOUNDINGBOX) {
ASSERT(isObjectBoundingBoxValid());
if (objectBoundingBox().contains(localPoint)) {
- updateHitTestResult(result, roundedLayoutPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint),
+ boundingRect(result.hitTestLocation().point()));
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698