Index: Source/web/WebDevToolsAgentImpl.cpp |
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp |
index 758f632575f848ab9878b63715a24ec3f801db6a..0eb0a92f10ff4febc6ac2ca68deb87017ce4fc9d 100644 |
--- a/Source/web/WebDevToolsAgentImpl.cpp |
+++ b/Source/web/WebDevToolsAgentImpl.cpp |
@@ -307,7 +307,7 @@ bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputE |
// compositor-side pinch handling is not enabled. See http://crbug.com/138003. |
bool isPinch = inputEvent.type == WebInputEvent::GesturePinchBegin || inputEvent.type == WebInputEvent::GesturePinchUpdate || inputEvent.type == WebInputEvent::GesturePinchEnd; |
if (isPinch && m_touchEventEmulationEnabled && m_emulateViewportEnabled) { |
- FrameView* frameView = page->mainFrame()->view(); |
+ FrameView* frameView = page->deprecatedLocalMainFrame()->view(); |
PlatformGestureEventBuilder gestureEvent(frameView, *static_cast<const WebGestureEvent*>(&inputEvent)); |
float pageScaleFactor = page->pageScaleFactor(); |
if (gestureEvent.type() == PlatformEvent::GesturePinchBegin) { |
@@ -335,21 +335,21 @@ bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputE |
if (WebInputEvent::isGestureEventType(inputEvent.type) && inputEvent.type == WebInputEvent::GestureTap) { |
// Only let GestureTab in (we only need it and we know PlatformGestureEventBuilder supports it). |
- PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(page->mainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent)); |
- return ic->handleGestureEvent(page->mainFrame(), gestureEvent); |
+ PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent)); |
+ return ic->handleGestureEvent(toLocalFrame(page->mainFrame()), gestureEvent); |
} |
if (WebInputEvent::isMouseEventType(inputEvent.type) && inputEvent.type != WebInputEvent::MouseEnter) { |
// PlatformMouseEventBuilder does not work with MouseEnter type, so we filter it out manually. |
- PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->mainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent)); |
- return ic->handleMouseEvent(page->mainFrame(), mouseEvent); |
+ PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent)); |
+ return ic->handleMouseEvent(toLocalFrame(page->mainFrame()), mouseEvent); |
} |
if (WebInputEvent::isTouchEventType(inputEvent.type)) { |
- PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(page->mainFrame()->view(), *static_cast<const WebTouchEvent*>(&inputEvent)); |
- return ic->handleTouchEvent(page->mainFrame(), touchEvent); |
+ PlatformTouchEvent touchEvent = PlatformTouchEventBuilder(page->deprecatedLocalMainFrame()->view(), *static_cast<const WebTouchEvent*>(&inputEvent)); |
+ return ic->handleTouchEvent(toLocalFrame(page->mainFrame()), touchEvent); |
} |
if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { |
PlatformKeyboardEvent keyboardEvent = PlatformKeyboardEventBuilder(*static_cast<const WebKeyboardEvent*>(&inputEvent)); |
- return ic->handleKeyboardEvent(page->mainFrame(), keyboardEvent); |
+ return ic->handleKeyboardEvent(page->deprecatedLocalMainFrame(), keyboardEvent); |
} |
return false; |
} |
@@ -617,7 +617,7 @@ InspectorController* WebDevToolsAgentImpl::inspectorController() |
LocalFrame* WebDevToolsAgentImpl::mainFrame() |
{ |
if (Page* page = m_webViewImpl->page()) |
- return page->mainFrame(); |
+ return page->deprecatedLocalMainFrame(); |
return 0; |
} |