Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index 11aee9851407c8114a8d29859590bd77e3434991..123eb5cd17a70ad8a522e4e4312df3c9f2644d5a 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -245,6 +245,13 @@ namespace content { |
namespace { |
+int GetRoutingIDForFrame(blink::WebFrame* child_frame) { |
+ if (child_frame->isWebRemoteFrame()) |
+ return RenderFrameProxy::FromWebFrame(child_frame)->routing_id(); |
+ |
+ return RenderFrameImpl::FromWebFrame(child_frame)->GetRoutingID(); |
+} |
+ |
const char kDefaultAcceptHeader[] = |
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/" |
"*;q=0.8"; |
@@ -585,7 +592,8 @@ void RenderFrameImpl::CreateFrame( |
int proxy_routing_id, |
const FrameReplicationState& replicated_state, |
CompositorDependencies* compositor_deps, |
- const FrameMsg_NewFrame_WidgetParams& widget_params) { |
+ const FrameMsg_NewFrame_WidgetParams& widget_params, |
+ const blink::WebFrameOwnerProperties& frame_owner_properties) { |
blink::WebLocalFrame* web_frame; |
RenderFrameImpl* render_frame; |
if (proxy_routing_id == MSG_ROUTING_NONE) { |
@@ -609,6 +617,7 @@ void RenderFrameImpl::CreateFrame( |
replicated_state.scope, WebString::fromUTF8(replicated_state.name), |
replicated_state.sandbox_flags, render_frame, |
previous_sibling_web_frame); |
+ web_frame->setFrameOwnerProperties(frame_owner_properties); |
alexmos
2015/09/02 21:42:09
This will transfer updated properties for cross-si
lazyboy
2015/09/15 19:30:56
You're right, this case didn't use to work.
since
|
} else { |
RenderFrameProxy* proxy = |
RenderFrameProxy::FromRoutingID(proxy_routing_id); |
@@ -2197,14 +2206,14 @@ blink::WebFrame* RenderFrameImpl::createChildFrame( |
blink::WebLocalFrame* parent, |
blink::WebTreeScopeType scope, |
const blink::WebString& name, |
- blink::WebSandboxFlags sandbox_flags) { |
+ blink::WebSandboxFlags sandbox_flags, |
+ const blink::WebFrameOwnerProperties& frameOwnerProperties) { |
// Synchronously notify the browser of a child frame creation to get the |
// routing_id for the RenderFrame. |
int child_routing_id = MSG_ROUTING_NONE; |
Send(new FrameHostMsg_CreateChildFrame( |
- routing_id_, scope, |
- base::UTF16ToUTF8(base::StringPiece16(name)), sandbox_flags, |
- &child_routing_id)); |
+ routing_id_, scope, base::UTF16ToUTF8(base::StringPiece16(name)), |
+ sandbox_flags, frameOwnerProperties, &child_routing_id)); |
// Allocation of routing id failed, so we can't create a child frame. This can |
// happen if this RenderFrameImpl's IPCs are being filtered when in swapped |
@@ -2327,19 +2336,33 @@ void RenderFrameImpl::didChangeName(blink::WebLocalFrame* frame, |
void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, |
blink::WebSandboxFlags flags) { |
- int frame_routing_id = MSG_ROUTING_NONE; |
- if (child_frame->isWebRemoteFrame()) { |
- frame_routing_id = |
- RenderFrameProxy::FromWebFrame(child_frame)->routing_id(); |
- } else { |
- frame_routing_id = |
- RenderFrameImpl::FromWebFrame(child_frame)->GetRoutingID(); |
- } |
- |
+ int frame_routing_id = GetRoutingIDForFrame(child_frame); |
Send(new FrameHostMsg_DidChangeSandboxFlags(routing_id_, frame_routing_id, |
flags)); |
} |
+void RenderFrameImpl::didChangeScrollingMode( |
+ blink::WebFrame* child_frame, |
+ blink::WebFrameOwnerProperties::ScrollingMode scrolling_mode) { |
+ int frame_routing_id = GetRoutingIDForFrame(child_frame); |
+ Send(new FrameHostMsg_DidChangeScrollingMode(routing_id_, frame_routing_id, |
+ scrolling_mode)); |
+} |
+ |
+void RenderFrameImpl::didChangeMarginWidth(blink::WebFrame* child_frame, |
+ int marginWidth) { |
+ int frame_routing_id = GetRoutingIDForFrame(child_frame); |
+ Send(new FrameHostMsg_DidChangeMarginWidth(routing_id_, frame_routing_id, |
+ marginWidth)); |
+} |
+ |
+void RenderFrameImpl::didChangeMarginHeight(blink::WebFrame* child_frame, |
+ int marginHeight) { |
+ int frame_routing_id = GetRoutingIDForFrame(child_frame); |
+ Send(new FrameHostMsg_DidChangeMarginHeight(routing_id_, frame_routing_id, |
+ marginHeight)); |
+} |
+ |
void RenderFrameImpl::didMatchCSS( |
blink::WebLocalFrame* frame, |
const blink::WebVector<blink::WebString>& newly_matching_selectors, |