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

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: Update. Created 5 years, 4 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..bf616f0629db22a42352d610f2714fc973809b20 100644
--- a/Source/web/WebFrame.cpp
+++ b/Source/web/WebFrame.cpp
@@ -136,6 +136,30 @@ 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)
+ return;
+
+ ScrollbarMode scrollbarMode = ScrollbarAuto;
+ switch (frameOwnerProperties.scrollingMode) {
+ case WebFrameOwnerProperties::ScrollingModeAuto:
+ scrollbarMode = ScrollbarAuto;
+ break;
+ case WebFrameOwnerProperties::ScrollingModeAlwaysOff:
+ scrollbarMode = ScrollbarAlwaysOff;
+ break;
+ case WebFrameOwnerProperties::ScrollingModeAlwaysOn:
+ scrollbarMode = ScrollbarAlwaysOn;
+ break;
+ }
+ toRemoteBridgeFrameOwner(owner)->setScrollingMode(scrollbarMode);
+
+ 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