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

Unified Diff: Source/core/dom/TreeScope.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/dom/Document.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScope.cpp
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index 4caf10359dda54444acad553da9d33c780bccdc6..801eafbc6ec8c056517e19f50aa3d1c0749c8d40 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -269,8 +269,8 @@ HitTestResult hitTestInDocument(const Document* document, int x, int y)
return HitTestResult();
HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
- HitTestResult result(hitPoint);
- document->layoutView()->hitTest(request, result);
+ HitTestResult result(request, hitPoint);
+ document->layoutView()->hitTest(result);
return result;
}
@@ -299,8 +299,8 @@ Vector<Element*> TreeScope::elementsFromPoint(int x, int y) const
return elements;
HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased | HitTestRequest::PenetratingList);
- HitTestResult result(hitPoint);
- document.layoutView()->hitTest(request, result);
+ HitTestResult result(request, hitPoint);
+ document.layoutView()->hitTest(result);
Node* lastNode = nullptr;
for (const auto rectBasedNode : result.listBasedTestResult()) {
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698