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

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 null check in spellcheck_provider.cc and add some log 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 2eac61d453e9e9a00c611cfd55c42181fd4b3c33..0515cae5ff7d84a26f0d41a0c39aab87facd5ecc 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2906,9 +2906,17 @@ WebFrame* WebViewImpl::findFrameByName(
return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
-WebFrame* WebViewImpl::focusedFrame()
+WebLocalFrame* WebViewImpl::focusedFrame()
{
- return WebFrame::fromFrame(focusedCoreFrame());
+ Frame* frame = focusedCoreFrame();
+ if (!frame)
+ LOG(ERROR) << "hyb: frame is null";
+ if (!frame->isLocalFrame())
+ LOG(ERROR) << "hyb: frame is not local frame";
+
+ 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