Commit 8a0d3081 authored by lazyboy@chromium.org's avatar lazyboy@chromium.org

On remote frame's (re)attachment, connect its widget.

A remote frame can be detached by setting its .style.display = 'none'.
  If we attach it again by setting its .style.display = '', the frame
  becomes widget/FrameView-less. This CL sets the widget of the frame.

BUG=517291
Test=With --site-per-process, navigate an <iframe> to cross site.
  See that resizing the frame works correctly, e.g.:
    document.querySelector('iframe').style.width = '400px';
  Now hide the iframe, and then make it visible:
    document.querySelector('iframe').style.display = 'none';
    document.querySelector('iframe').style.display = '';
  See that resizing the frame still works correctly. It will fail
    without this CL.

Review URL: https://codereview.chromium.org/1309343002

git-svn-id: svn://svn.chromium.org/blink/trunk@201161 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3115fe29
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "core/frame/FrameView.h" #include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/frame/RemoteFrame.h" #include "core/frame/RemoteFrame.h"
#include "core/frame/RemoteFrameView.h"
#include "core/html/parser/HTMLParserIdioms.h" #include "core/html/parser/HTMLParserIdioms.h"
#include "core/layout/LayoutPart.h" #include "core/layout/LayoutPart.h"
#include "core/loader/FrameLoader.h" #include "core/loader/FrameLoader.h"
...@@ -170,6 +171,8 @@ void HTMLFrameElementBase::attach(const AttachContext& context) ...@@ -170,6 +171,8 @@ void HTMLFrameElementBase::attach(const AttachContext& context)
if (Frame* frame = contentFrame()) { if (Frame* frame = contentFrame()) {
if (frame->isLocalFrame()) if (frame->isLocalFrame())
setWidget(toLocalFrame(frame)->view()); setWidget(toLocalFrame(frame)->view());
else if (frame->isRemoteFrame())
setWidget(toRemoteFrame(frame)->view());
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment