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

Unified Diff: Source/web/WebFrame.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/RemoteBridgeFrameOwner.cpp ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrame.cpp
diff --git a/Source/web/WebFrame.cpp b/Source/web/WebFrame.cpp
index 98042f6431e1ae83107a2ba1ef6af0f1cef8498a..f3c00c600bdd3b5160b7e4e84c5afe46633664d4 100644
--- a/Source/web/WebFrame.cpp
+++ b/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"
@@ -136,6 +137,18 @@ void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags)
toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(flags));
}
+void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& frameOwnerProperties)
+{
+ // 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(static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode));
+
+ toRemoteBridgeFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginWidth);
+ toRemoteBridgeFrameOwner(owner)->setMarginHeight(frameOwnerProperties.marginHeight);
+}
+
WebFrame* WebFrame::opener() const
{
return m_opener;
« no previous file with comments | « Source/web/RemoteBridgeFrameOwner.cpp ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698