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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 23671002: Refactoring: Add toWebFrameImpl() interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected as per review commments. Created 7 years, 4 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
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/mac/WebSubstringUtil.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 9c7f9baa726108aa84e977ab7fd54c5e872ebff1..c802861b8e83491283dba3b29d541f153b5c07bd 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2586,7 +2586,7 @@ WebFrame* WebViewImpl::findFrameByName(
{
if (!relativeToFrame)
relativeToFrame = mainFrame();
- Frame* frame = static_cast<WebFrameImpl*>(relativeToFrame)->frame();
+ Frame* frame = toWebFrameImpl(relativeToFrame)->frame();
frame = frame->tree()->find(name);
return WebFrameImpl::fromFrame(frame);
}
@@ -2605,8 +2605,7 @@ void WebViewImpl::setFocusedFrame(WebFrame* frame)
frame->selection()->setFocused(false);
return;
}
- WebFrameImpl* frameImpl = static_cast<WebFrameImpl*>(frame);
- Frame* webcoreFrame = frameImpl->frame();
+ Frame* webcoreFrame = toWebFrameImpl(frame)->frame();
webcoreFrame->page()->focusController().setFocusedFrame(webcoreFrame);
}
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/mac/WebSubstringUtil.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698