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

Unified Diff: content/renderer/devtools/devtools_agent.cc

Issue 2108803006: Fix inspector overlay when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crash when FrameView is null Created 4 years, 5 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 | third_party/WebKit/Source/core/inspector/InspectorHighlight.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/devtools/devtools_agent.cc
diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
index 27b7c32d6b2193a75383d4516e5deccef8c31a03..858e75fd0b95aa98704bc88a7350b9ef0ea5285f 100644
--- a/content/renderer/devtools/devtools_agent.cc
+++ b/content/renderer/devtools/devtools_agent.cc
@@ -22,6 +22,7 @@
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_widget.h"
#include "ipc/ipc_channel.h"
+#include "third_party/WebKit/public/platform/WebFloatRect.h"
#include "third_party/WebKit/public/platform/WebPoint.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDevToolsAgent.h"
@@ -262,7 +263,9 @@ void DevToolsAgent::OnDispatchOnInspectorBackend(int session_id,
}
void DevToolsAgent::OnInspectElement(int x, int y) {
- GetWebAgent()->inspectElementAt(WebPoint(x, y));
+ blink::WebFloatRect point_rect(x, y, 0, 0);
+ frame_->GetRenderWidget()->convertWindowToViewport(&point_rect);
+ GetWebAgent()->inspectElementAt(WebPoint(point_rect.x, point_rect.y));
}
void DevToolsAgent::OnRequestNewWindowACK(bool success) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorHighlight.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698