Chromium Code Reviews| Index: content/renderer/render_frame_impl.cc |
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
| index 8ff540e93bfe07d49b3cacacc4f1a6987ea39c47..be0be6e5f993bc2650b6aee3f65b8697c73571bc 100644 |
| --- a/content/renderer/render_frame_impl.cc |
| +++ b/content/renderer/render_frame_impl.cc |
| @@ -3325,9 +3325,9 @@ void RenderFrameImpl::DidCreateDataSource(blink::WebLocalFrame* frame, |
| blink::WebView* webview = render_view_->webview(); |
| if (content_initiated && webview && webview->MainFrame() && |
| webview->MainFrame()->IsWebLocalFrame() && |
| - webview->MainFrame()->DataSource()) { |
| - DocumentState* old_document_state = |
| - DocumentState::FromDataSource(webview->MainFrame()->DataSource()); |
| + webview->MainFrame()->ToWebLocalFrame()->DataSource()) { |
|
dcheng
2017/06/06 18:49:53
I guess this doesn't work at all in OOPIF =/
Łukasz Anforowicz
2017/06/06 19:31:45
Hmmm... to be honest, I was just trying to preserv
|
| + DocumentState* old_document_state = DocumentState::FromDataSource( |
| + webview->MainFrame()->ToWebLocalFrame()->DataSource()); |
| if (old_document_state) { |
| InternalDocumentStateData* internal_data = |
| InternalDocumentStateData::FromDocumentState(document_state); |
| @@ -4555,10 +4555,11 @@ blink::WebString RenderFrameImpl::UserAgentOverride() { |
| // return early and fix properly as part of https://crbug.com/426555. |
| if (render_view_->webview()->MainFrame()->IsWebRemoteFrame()) |
| return blink::WebString(); |
| + WebLocalFrame* main_frame = |
| + render_view_->webview()->MainFrame()->ToWebLocalFrame(); |
| // If we're in the middle of committing a load, the data source we need |
| // will still be provisional. |
| - WebFrame* main_frame = render_view_->webview()->MainFrame(); |
| WebDataSource* data_source = NULL; |
| if (main_frame->ProvisionalDataSource()) |
| data_source = main_frame->ProvisionalDataSource(); |
| @@ -4741,7 +4742,7 @@ const RenderFrameImpl* RenderFrameImpl::GetLocalRoot() const { |
| // Tell the embedding application that the URL of the active page has changed. |
| void RenderFrameImpl::SendDidCommitProvisionalLoad( |
| - blink::WebFrame* frame, |
| + blink::WebLocalFrame* frame, |
| blink::WebHistoryCommitType commit_type) { |
| DCHECK_EQ(frame_, frame); |
| WebDataSource* ds = frame->DataSource(); |