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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 347143002: DevTools: Screencast view scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unused variable Created 6 years, 6 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 | « no previous file | Source/devtools/front_end/ScreencastView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 8541804f0f6467bcea4ba1efcdfc9ebb8935fb92..86b52850781349fa0de17a758b905e0d1d38b2c8 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -1411,8 +1411,12 @@ void InspectorDOMAgent::getNodeForLocation(ErrorString* errorString, int x, int
{
if (!pushDocumentUponHandlelessOperation(errorString))
return;
-
- Node* node = hoveredNodeForPoint(m_document->frame(), IntPoint(x, y), false);
+ HitTestRequest request(HitTestRequest::Move | HitTestRequest::ReadOnly | HitTestRequest::AllowChildFrameContent);
+ HitTestResult result(IntPoint(x, y));
+ m_document->frame()->contentRenderer()->hitTest(request, result);
+ Node* node = result.innerPossiblyPseudoNode();
+ while (node && node->nodeType() == Node::TEXT_NODE)
+ node = node->parentNode();
if (!node) {
*errorString = "No node found at given location";
return;
« no previous file with comments | « no previous file | Source/devtools/front_end/ScreencastView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698