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

Unified Diff: components/html_viewer/html_frame.cc

Issue 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments for tests + merge blink/cr changes. 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 side-by-side diff with in-line comments
Download patch
Index: components/html_viewer/html_frame.cc
diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc
index 1188341ef381556bbbb5063b7a00ad15e8bd8f70..e28c824d38aef7932a56452ac25291f1864001c6 100644
--- a/components/html_viewer/html_frame.cc
+++ b/components/html_viewer/html_frame.cc
@@ -189,7 +189,7 @@ HTMLFrame::HTMLFrame(CreateParams* params)
CHECK(!parent_->IsLocal());
web_frame_ = parent_->web_frame()->toWebRemoteFrame()->createLocalChild(
state_.tree_scope, state_.name, state_.sandbox_flags, this,
- previous_web_frame);
+ previous_web_frame, state_.owner_properties);
CreateLocalRootWebWidget(web_frame_->toWebLocalFrame());
} else if (!parent_->IsLocal()) {
web_frame_ = parent_->web_frame()->toWebRemoteFrame()->createRemoteChild(
@@ -317,7 +317,8 @@ blink::WebFrame* HTMLFrame::createChildFrame(
blink::WebLocalFrame* parent,
blink::WebTreeScopeType scope,
const blink::WebString& frame_name,
- blink::WebSandboxFlags sandbox_flags) {
+ blink::WebSandboxFlags sandbox_flags,
+ const blink::WebFrameOwnerProperties& frame_owner_properties) {
DCHECK(IsLocal()); // Can't create children of remote frames.
DCHECK_EQ(parent, web_frame_);
DCHECK(view_); // If we're local we have to have a view.
@@ -328,6 +329,7 @@ blink::WebFrame* HTMLFrame::createChildFrame(
child_state.name = frame_name;
child_state.tree_scope = scope;
child_state.sandbox_flags = sandbox_flags;
+ child_state.owner_properties = frame_owner_properties;
mojo::Map<mojo::String, mojo::Array<uint8_t>> client_properties;
client_properties.mark_non_null();
ClientPropertiesFromReplicatedFrameState(child_state, &client_properties);
@@ -648,7 +650,8 @@ void HTMLFrame::SwapToLocal(
blink::WebLocalFrame* local_web_frame =
blink::WebLocalFrame::create(state_.tree_scope, this);
local_web_frame->initializeToReplaceRemoteFrame(
- web_frame_->toWebRemoteFrame(), state_.name, state_.sandbox_flags);
+ web_frame_->toWebRemoteFrame(), state_.name, state_.sandbox_flags,
+ state_.owner_properties);
// The swap() ends up calling to frameDetached() and deleting the old.
web_frame_->swap(local_web_frame);
web_frame_ = local_web_frame;

Powered by Google App Engine
This is Rietveld 408576698