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

Side by Side Diff: Source/web/WebRemoteFrameImpl.cpp

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address nits Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/tests/FrameTestHelpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "web/WebRemoteFrameImpl.h" 6 #include "web/WebRemoteFrameImpl.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/RemoteFrame.h" 9 #include "core/frame/RemoteFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
11 #include "core/page/Page.h" 11 #include "core/page/Page.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "public/platform/WebFloatRect.h" 13 #include "public/platform/WebFloatRect.h"
14 #include "public/platform/WebRect.h" 14 #include "public/platform/WebRect.h"
15 #include "public/web/WebDocument.h" 15 #include "public/web/WebDocument.h"
16 #include "public/web/WebFrameOwnerProperties.h"
16 #include "public/web/WebPerformance.h" 17 #include "public/web/WebPerformance.h"
17 #include "public/web/WebRange.h" 18 #include "public/web/WebRange.h"
18 #include "public/web/WebTreeScopeType.h" 19 #include "public/web/WebTreeScopeType.h"
19 #include "web/RemoteBridgeFrameOwner.h" 20 #include "web/RemoteBridgeFrameOwner.h"
20 #include "web/WebViewImpl.h" 21 #include "web/WebViewImpl.h"
21 #include <v8/include/v8.h> 22 #include <v8/include/v8.h>
22 23
23 namespace blink { 24 namespace blink {
24 25
25 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, WebRemoteFrameCli ent* client) 26 WebRemoteFrame* WebRemoteFrame::create(WebTreeScopeType scope, WebRemoteFrameCli ent* client)
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 ASSERT_NOT_REACHED(); 702 ASSERT_NOT_REACHED();
702 return false; 703 return false;
703 } 704 }
704 705
705 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const 706 WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const
706 { 707 {
707 ASSERT_NOT_REACHED(); 708 ASSERT_NOT_REACHED();
708 return WebString(); 709 return WebString();
709 } 710 }
710 711
711 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons t WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFram e* previousSibling) 712 WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons t WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFram e* previousSibling, const WebFrameOwnerProperties& frameOwnerProperties)
712 { 713 {
713 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client)); 714 WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client));
714 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt = 715 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt =
715 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta tic_cast<SandboxFlags>(sandboxFlags))); 716 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, sta tic_cast<SandboxFlags>(sandboxFlags), frameOwnerProperties));
716 insertAfter(child, previousSibling); 717 insertAfter(child, previousSibling);
717 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may 718 // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may
718 // result in the browser observing two navigations to about:blank (one from the initial 719 // result in the browser observing two navigations to about:blank (one from the initial
719 // frame creation, and one from swapping it into the remote process). FrameL oader might 720 // frame creation, and one from swapping it into the remote process). FrameL oader might
720 // need a special initialization function for this case to avoid that duplic ate navigation. 721 // need a special initialization function for this case to avoid that duplic ate navigation.
721 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom); 722 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom);
722 // Partially related with the above FIXME--the init() call may trigger JS di spatch. However, 723 // Partially related with the above FIXME--the init() call may trigger JS di spatch. However,
723 // if the parent is remote, it should never be detached synchronously... 724 // if the parent is remote, it should never be detached synchronously...
724 ASSERT(child->frame()); 725 ASSERT(child->frame());
725 return child; 726 return child;
726 } 727 }
727 728
728 729
729 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name) 730 void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name)
730 { 731 {
731 setCoreFrame(RemoteFrame::create(m_frameClient.get(), host, owner)); 732 setCoreFrame(RemoteFrame::create(m_frameClient.get(), host, owner));
732 frame()->createView(); 733 frame()->createView();
733 m_frame->tree().setName(name, nullAtom); 734 m_frame->tree().setName(name, nullAtom);
734 } 735 }
735 736
736 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) 737 WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, co nst WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client)
737 { 738 {
738 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop e, client)); 739 WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scop e, client));
739 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt = 740 WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult resu lt =
740 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s tatic_cast<SandboxFlags>(sandboxFlags))); 741 m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, s tatic_cast<SandboxFlags>(sandboxFlags), WebFrameOwnerProperties()));
741 appendChild(child); 742 appendChild(child);
742 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name); 743 child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name);
743 return child; 744 return child;
744 } 745 }
745 746
746 void WebRemoteFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame> frame) 747 void WebRemoteFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<RemoteFrame> frame)
747 { 748 {
748 m_frame = frame; 749 m_frame = frame;
749 } 750 }
750 751
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 : WebRemoteFrame(scope) 809 : WebRemoteFrame(scope)
809 , m_frameClient(RemoteFrameClientImpl::create(this)) 810 , m_frameClient(RemoteFrameClientImpl::create(this))
810 , m_client(client) 811 , m_client(client)
811 #if ENABLE(OILPAN) 812 #if ENABLE(OILPAN)
812 , m_selfKeepAlive(this) 813 , m_selfKeepAlive(this)
813 #endif 814 #endif
814 { 815 {
815 } 816 }
816 817
817 } // namespace blink 818 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/tests/FrameTestHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698