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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove most of the null checks except the one in spellcheck_provider.cc Created 4 years, 6 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
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 625d58164ab50d2df97cfe09e8052624b8fe0fc9..c5332b9e025ee191360a8ee40fb475c8b6b8046e 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2905,9 +2905,12 @@ WebFrame* WebViewImpl::findFrameByName(
return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
-WebFrame* WebViewImpl::focusedFrame()
+WebLocalFrame* WebViewImpl::focusedFrame()
{
- return WebFrame::fromFrame(focusedCoreFrame());
+ Frame* frame = focusedCoreFrame();
+ if (!frame || !frame->isLocalFrame())
+ return nullptr;
+ return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
void WebViewImpl::setFocusedFrame(WebFrame* frame)

Powered by Google App Engine
This is Rietveld 408576698