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

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 comments + static_cast for enum conversion 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: Source/web/WebFrame.cpp
diff --git a/Source/web/WebFrame.cpp b/Source/web/WebFrame.cpp
index 98042f6431e1ae83107a2ba1ef6af0f1cef8498a..b9b9d8742c086b52219230ee6f114b386e8dcb8d 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)
+{
+ FrameOwner* owner = toCoreFrame(this)->owner();
+ if (!owner)
alexmos 2015/09/02 21:37:06 When would owner be nullptr? Do we need this chec
lazyboy 2015/09/15 01:40:33 Was not intentionally checking against nullptr, ch
+ return;
+
+ 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;

Powered by Google App Engine
This is Rietveld 408576698