Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
index 093c5a1cc6fac6339ba94bb542ac444086f4c763..552d24b57c8264f2e23011114ca63ef62f3c5705 100644 |
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
@@ -93,7 +93,7 @@ WebFrameWidget* WebFrameWidget::Create(WebWidgetClient* client, |
WebView* web_view, |
WebLocalFrame* main_frame) { |
DCHECK(client) << "A valid WebWidgetClient must be supplied."; |
- return new WebViewFrameWidget(*client, ToWebViewImpl(*web_view), |
+ return new WebViewFrameWidget(*client, static_cast<WebViewBase&>(*web_view), |
slangley
2017/05/02 06:25:33
The only concrete type inherits WebViewBase, so a
|
ToWebLocalFrameImpl(*main_frame)); |
} |
@@ -789,13 +789,13 @@ void WebFrameWidgetImpl::HandleMouseDown(LocalFrame& main_frame, |
const WebMouseEvent& event) { |
// TODO(slangley): Remove this downcast to WebViewImpl once we lift this |
// code into core. |
- WebViewImpl* view_impl = ToWebViewImpl(View()); |
+ WebViewBase* view_impl = View(); |
// If there is a popup open, close it as the user is clicking on the page |
// (outside of the popup). We also save it so we can prevent a click on an |
// element from immediately reopening the same popup. |
RefPtr<WebPagePopupImpl> page_popup; |
if (event.button == WebMouseEvent::Button::kLeft) { |
- page_popup = view_impl->GetPagePopup(); |
+ page_popup = ToWebPagePopupImpl(view_impl->GetPagePopup()); |
view_impl->HidePopups(); |
} |
@@ -824,7 +824,8 @@ void WebFrameWidgetImpl::HandleMouseDown(LocalFrame& main_frame, |
main_frame.GetEventHandler().TakeLastMouseDownGestureToken(); |
if (view_impl->GetPagePopup() && page_popup && |
- view_impl->GetPagePopup()->HasSamePopupClient(page_popup.Get())) { |
+ ToWebPagePopupImpl(view_impl->GetPagePopup()) |
+ ->HasSamePopupClient(page_popup.Get())) { |
// That click triggered a page popup that is the same as the one we just |
// closed. It needs to be closed. |
view_impl->HidePopups(); |
@@ -902,9 +903,8 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent( |
DCHECK(client_); |
WebInputEventResult event_result = WebInputEventResult::kNotHandled; |
bool event_cancelled = false; |
- // TODO(slangley): Remove this downcast to WebViewImpl once we lift this |
- // code into core. |
- WebViewImpl* view_impl = ToWebViewImpl(View()); |
+ |
+ WebViewBase* view_impl = View(); |
switch (event.GetType()) { |
case WebInputEvent::kGestureScrollBegin: |
case WebInputEvent::kGestureScrollEnd: |
@@ -918,7 +918,8 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent( |
// When we close a popup because of a GestureTapDown, we also save it so |
// we can prevent the following GestureTap from immediately reopening the |
// same popup. |
- view_impl->SetLastHiddenPagePopup(view_impl->GetPagePopup()); |
+ view_impl->SetLastHiddenPagePopup( |
+ ToWebPagePopupImpl(view_impl->GetPagePopup())); |
View()->HidePopups(); |
case WebInputEvent::kGestureTapCancel: |
View()->SetLastHiddenPagePopup(nullptr); |