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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 80ff79a1e3ec10aa6bda8e121228e161eae2d7f4..969f20ad441e0e7080850a1495e4bc075a9033e5 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -49,6 +49,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/PinchViewport.h"
+#include "core/frame/RemoteFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/SmartClip.h"
#include "core/html/HTMLInputElement.h"
@@ -1584,6 +1585,9 @@ void WebViewImpl::resize(const WebSize& newSize)
if (m_shouldAutoResize || m_size == newSize)
return;
+ if (!mainFrameImpl())
dcheng 2014/06/20 20:49:12 Being less familiar with the rendering paths, is t
nasko 2014/06/20 21:09:53 I'll leave that for Ken to give input on.
kenrb 2014/06/23 15:21:18 Most of the places that access the top-level Frame
+ return;
+
FrameView* view = mainFrameImpl()->frameView();
if (!view)
return;
@@ -2106,7 +2110,11 @@ WebTextInputInfo WebViewImpl::textInputInfo()
{
WebTextInputInfo info;
- LocalFrame* focused = toLocalFrame(focusedWebCoreFrame());
+ Frame* focusedFrame = focusedWebCoreFrame();
+ if (focusedFrame->isRemoteFrame())
+ return info;
+
+ LocalFrame* focused = toLocalFrame(focusedFrame);
if (!focused)
return info;
@@ -2521,7 +2529,10 @@ WebFrame* WebViewImpl::findFrameByName(
WebFrame* WebViewImpl::focusedFrame()
{
- return WebLocalFrameImpl::fromFrame(toLocalFrame(focusedWebCoreFrame()));
+ Frame* frame = focusedWebCoreFrame();
+ if (frame->isRemoteFrame())
dcheng 2014/06/20 20:49:12 You can use WebFrame::fromFrame now, so you don't
nasko 2014/06/20 21:09:53 Yay! ?!
+ return WebRemoteFrameImpl::fromFrame(toRemoteFrame(*frame));
+ return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
void WebViewImpl::setFocusedFrame(WebFrame* frame)

Powered by Google App Engine
This is Rietveld 408576698