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

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: Add CHECK in TextInputController::HasMarkedText() Created 4 years, 5 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 62a586d0d4df06c569cbfa5fdc8bd6e3bdb48eee..f8e76dd19bfe68b8ef1dc12e012d0df9ce16617b 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2896,9 +2896,15 @@ WebFrame* WebViewImpl::findFrameByName(
return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
-WebFrame* WebViewImpl::focusedFrame()
+WebLocalFrame* WebViewImpl::focusedFrame()
{
- return WebFrame::fromFrame(focusedCoreFrame());
+ Frame* frame = focusedCoreFrame();
+ // TODO(yabinh): focusedCoreFrame() should always return a local frame, and
+ // the following check should be unnecessary.
+ // See crbug.com/625068
+ if (!frame || !frame->isLocalFrame())
+ return nullptr;
+ return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
void WebViewImpl::setFocusedFrame(WebFrame* frame)
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698