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

Unified Diff: Source/core/page/DragController.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/page/ContextMenuController.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 0512bfe6395fa719c2fc6eebebda7a35ddd50240..fff7dfef16ba2d58a32864af9948f4247de7da20 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -314,8 +314,8 @@ static Element* elementUnderMouse(Document* documentUnderMouse, const IntPoint&
LayoutPoint point = roundedLayoutPoint(FloatPoint(p.x() * zoomFactor, p.y() * zoomFactor));
HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
- HitTestResult result(point);
- documentUnderMouse->layoutView()->hitTest(request, result);
+ HitTestResult result(request, point);
+ documentUnderMouse->layoutView()->hitTest(result);
Node* n = result.innerNode();
while (n && !n->isElementNode())
@@ -541,11 +541,10 @@ bool DragController::canProcessDrag(DragData* dragData)
return false;
IntPoint point = m_page->deprecatedLocalMainFrame()->view()->rootFrameToContents(dragData->clientPosition());
- HitTestResult result = HitTestResult(point);
if (!m_page->deprecatedLocalMainFrame()->contentRenderer())
return false;
- result = m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultAtPoint(point);
+ HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultAtPoint(point);
if (!result.innerNonSharedNode())
return false;
« no previous file with comments | « Source/core/page/ContextMenuController.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698