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

Unified Diff: third_party/WebKit/Source/web/WebFrame.cpp

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 from Charlie Created 5 years, 2 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: third_party/WebKit/Source/web/WebFrame.cpp
diff --git a/third_party/WebKit/Source/web/WebFrame.cpp b/third_party/WebKit/Source/web/WebFrame.cpp
index a1f3cd60efa89ff2014de9e3dc694cbe09fd68de..78d538b5b8dc542fa10ef4a952cbca81b3f01f27 100644
--- a/third_party/WebKit/Source/web/WebFrame.cpp
+++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -16,6 +16,7 @@
#include "platform/UserGestureIndicator.h"
#include "platform/heap/Handle.h"
#include "public/web/WebElement.h"
+#include "public/web/WebFrameOwnerProperties.h"
#include "public/web/WebSandboxFlags.h"
#include "web/OpenedFrameTracker.h"
#include "web/RemoteBridgeFrameOwner.h"
@@ -146,6 +147,18 @@ void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags)
toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags));
}
+void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& frameOwnerProperties)
dcheng 2015/10/15 06:06:53 Unlike sandbox flags, this is only called on WebLo
lazyboy 2015/10/15 16:56:38 Done.
+{
+ // At the moment, this is only used to replicate frame owner properties
+ // for frames with a remote owner.
+ FrameOwner* owner = toCoreFrame(this)->owner();
+ ASSERT(owner);
+ toRemoteBridgeFrameOwner(owner)->setScrollingMode(frameOwnerProperties.scrollingMode);
+
+ toRemoteBridgeFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginWidth);
+ toRemoteBridgeFrameOwner(owner)->setMarginHeight(frameOwnerProperties.marginHeight);
+}
+
WebFrame* WebFrame::opener() const
{
return m_opener;

Powered by Google App Engine
This is Rietveld 408576698