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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 309473002: [DevTools] Cleanup inspector overlay and make it work with virtual viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 6d0808df3c07b9b3e0a2330d21daaac6cf34936e..02f3e15eae35cc7fb3f648598f313663cb012b3a 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1612,10 +1612,6 @@ void WebViewImpl::resize(const WebSize& newSize)
updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->viewportDescription());
updateMainFrameLayoutSize();
- WebDevToolsAgentPrivate* agentPrivate = devToolsAgentPrivate();
- if (agentPrivate)
- agentPrivate->webViewResized(newSize);
-
// If the virtual viewport pinch mode is enabled, the main frame will be resized
// after layout so it can be sized to the contentsSize.
if (!pinchVirtualViewportEnabled() && mainFrameImpl()->frameView())
@@ -3315,10 +3311,11 @@ void WebViewImpl::inspectElementAt(const WebPoint& point)
HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestRequest::ReadOnly | HitTestRequest::AllowChildFrameContent;
HitTestRequest request(hitType);
- FrameView* frameView = m_page->mainFrame()->view();
- IntPoint transformedPoint(point);
- transformedPoint = transformedPoint - frameView->inputEventsOffsetForEmulation();
- transformedPoint.scale(1 / frameView->inputEventsScaleFactor(), 1 / frameView->inputEventsScaleFactor());
+ WebMouseEvent dummyEvent;
pfeldman 2014/05/29 15:20:30 Why do we have to do this?
dgozman 2014/05/29 15:28:37 We want to hit exactly the same node as mouse even
+ dummyEvent.type = WebInputEvent::MouseDown;
+ dummyEvent.x = point.x;
+ dummyEvent.y = point.y;
+ IntPoint transformedPoint = PlatformMouseEventBuilder(m_page->mainFrame()->view(), dummyEvent).position();
HitTestResult result(m_page->mainFrame()->view()->windowToContents(transformedPoint));
m_page->mainFrame()->contentRenderer()->hitTest(request, result);
Node* node = result.innerNode();
« Source/core/inspector/InspectorOverlay.cpp ('K') | « Source/web/WebDevToolsAgentPrivate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698