| Index: Source/core/inspector/InspectorInputAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorInputAgent.cpp b/Source/core/inspector/InspectorInputAgent.cpp
|
| index df01703bdc93bf4af024d2fdb1438a01999dcdd7..6ec0abcac29471a6efdc0269fe55c1562e17e1cf 100644
|
| --- a/Source/core/inspector/InspectorInputAgent.cpp
|
| +++ b/Source/core/inspector/InspectorInputAgent.cpp
|
| @@ -34,7 +34,6 @@
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/inspector/InspectorClient.h"
|
| -#include "core/inspector/InspectorPageAgent.h"
|
| #include "core/page/Chrome.h"
|
| #include "core/page/EventHandler.h"
|
| #include "core/page/Page.h"
|
| @@ -80,19 +79,19 @@
|
| }
|
| };
|
|
|
| -void ConvertInspectorPoint(blink::LocalFrame* frame, const blink::IntPoint& point, blink::IntPoint* convertedPoint, blink::IntPoint* globalPoint)
|
| -{
|
| - *convertedPoint = frame->view()->convertToContainingWindow(point);
|
| - *globalPoint = frame->page()->chrome().rootViewToScreen(blink::IntRect(point, blink::IntSize(0, 0))).location();
|
| +void ConvertInspectorPoint(blink::Page* page, const blink::IntPoint& point, blink::IntPoint* convertedPoint, blink::IntPoint* globalPoint)
|
| +{
|
| + *convertedPoint = page->deprecatedLocalMainFrame()->view()->convertToContainingWindow(point);
|
| + *globalPoint = page->chrome().rootViewToScreen(blink::IntRect(point, blink::IntSize(0, 0))).location();
|
| }
|
|
|
| } // namespace
|
|
|
| namespace blink {
|
|
|
| -InspectorInputAgent::InspectorInputAgent(InspectorPageAgent* pageAgent, InspectorClient* client)
|
| +InspectorInputAgent::InspectorInputAgent(Page* page, InspectorClient* client)
|
| : InspectorBaseAgent<InspectorInputAgent>("Input")
|
| - , m_pageAgent(pageAgent), m_client(client)
|
| + , m_page(page), m_client(client)
|
| {
|
| }
|
|
|
| @@ -164,7 +163,7 @@
|
| // Some platforms may have flipped coordinate systems, but the given coordinates
|
| // assume the origin is in the top-left of the window. Convert.
|
| IntPoint convertedPoint, globalPoint;
|
| - ConvertInspectorPoint(m_pageAgent->inspectedFrame(), IntPoint(x, y), &convertedPoint, &globalPoint);
|
| + ConvertInspectorPoint(m_page, IntPoint(x, y), &convertedPoint, &globalPoint);
|
|
|
| PlatformMouseEvent event(
|
| convertedPoint,
|
| @@ -258,18 +257,18 @@
|
| // Some platforms may have flipped coordinate systems, but the given coordinates
|
| // assume the origin is in the top-left of the window. Convert.
|
| IntPoint convertedPoint, globalPoint;
|
| - ConvertInspectorPoint(m_pageAgent->inspectedFrame(), IntPoint(x, y), &convertedPoint, &globalPoint);
|
| + ConvertInspectorPoint(m_page, IntPoint(x, y), &convertedPoint, &globalPoint);
|
|
|
| SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, convertedPoint, radiusX, radiusY, rotationAngle, force);
|
| event.append(point);
|
| }
|
|
|
| - m_pageAgent->inspectedFrame()->eventHandler().handleTouchEvent(event);
|
| + m_page->deprecatedLocalMainFrame()->eventHandler().handleTouchEvent(event);
|
| }
|
|
|
| void InspectorInputAgent::trace(Visitor* visitor)
|
| {
|
| - visitor->trace(m_pageAgent);
|
| + visitor->trace(m_page);
|
| InspectorBaseAgent::trace(visitor);
|
| }
|
|
|
|
|