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; |