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

Unified Diff: Source/core/layout/LayoutImage.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/LayoutImage.h ('k') | Source/core/layout/LayoutInline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutImage.cpp
diff --git a/Source/core/layout/LayoutImage.cpp b/Source/core/layout/LayoutImage.cpp
index 89f997be05fdc7a05f5800ed452943fc16cf154b..d80338ec32d5093f1724a5a98d70abf218110647 100644
--- a/Source/core/layout/LayoutImage.cpp
+++ b/Source/core/layout/LayoutImage.cpp
@@ -294,10 +294,10 @@ HTMLMapElement* LayoutImage::imageMap() const
return i ? i->treeScope().getImageMap(i->fastGetAttribute(usemapAttr)) : 0;
}
-bool LayoutImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
+bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
{
- HitTestResult tempResult(result.hitTestLocation());
- bool inside = LayoutReplaced::nodeAtPoint(request, tempResult, locationInContainer, accumulatedOffset, hitTestAction);
+ HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation());
+ bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, accumulatedOffset, hitTestAction);
if (tempResult.innerNode() && node()) {
if (HTMLMapElement* map = imageMap()) {
@@ -311,8 +311,8 @@ bool LayoutImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
}
}
- if (!inside && request.listBased())
- result.append(tempResult, request);
+ if (!inside && result.hitTestRequest().listBased())
+ result.append(tempResult);
if (inside)
result = tempResult;
return inside;
« no previous file with comments | « Source/core/layout/LayoutImage.h ('k') | Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698