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

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

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 9 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 | « Source/core/layout/svg/LayoutSVGShape.h ('k') | Source/core/layout/svg/LayoutSVGText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGShape.cpp
diff --git a/Source/core/layout/svg/LayoutSVGShape.cpp b/Source/core/layout/svg/LayoutSVGShape.cpp
index 50ed48f80e48c23c157435f11ce9eb642deeb320..1b11b2e6e9ca6fde8a8952357f5d7d916e3a06f1 100644
--- a/Source/core/layout/svg/LayoutSVGShape.cpp
+++ b/Source/core/layout/svg/LayoutSVGShape.cpp
@@ -28,7 +28,7 @@
#include "config.h"
#include "core/layout/svg/LayoutSVGShape.h"
-#include "core/layout/HitTestRequest.h"
+#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutAnalyzer.h"
#include "core/layout/PointerEventsHitRules.h"
#include "core/layout/svg/SVGLayoutSupport.h"
@@ -188,7 +188,7 @@ void LayoutSVGShape::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPo
rects.append(rect);
}
-bool LayoutSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
+bool LayoutSVGShape::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
{
// We only draw in the foreground phase, so we only hit-test then.
if (hitTestAction != HitTestForeground)
@@ -198,8 +198,8 @@ bool LayoutSVGShape::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu
if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToParentTransform(), pointInParent, localPoint))
return false;
- PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTING, request, style()->pointerEvents());
- if (nodeAtFloatPointInternal(request, localPoint, hitRules)) {
+ PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTING, result.hitTestRequest(), style()->pointerEvents());
+ if (nodeAtFloatPointInternal(result.hitTestRequest(), localPoint, hitRules)) {
updateHitTestResult(result, roundedLayoutPoint(localPoint));
return true;
}
« no previous file with comments | « Source/core/layout/svg/LayoutSVGShape.h ('k') | Source/core/layout/svg/LayoutSVGText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698