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

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

Issue 2507023002: Support script modify iframe scrolling, marginWidth and marginHeight attr (Closed)
Patch Set: remove using namespace Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79ce1ac6b9979b00595c6cfcf32f373238e62f1c..c71218a4de653abefbe2a440e929a7b740810225 100644
--- a/third_party/WebKit/Source/web/WebFrame.cpp
+++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -5,6 +5,7 @@
#include "public/web/WebFrame.h"
#include "bindings/core/v8/WindowProxyManager.h"
+#include "core/HTMLNames.h"
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
@@ -138,6 +139,16 @@ void WebFrame::setFrameOwnerProperties(
// for frames with a remote owner.
RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner());
DCHECK(owner);
+
+ Frame* frame = toImplBase()->frame();
+ DCHECK(frame);
+
+ if (frame->isLocalFrame()) {
+ toLocalFrame(frame)->document()->willChangeFrameOwnerProperties(
+ properties.marginWidth, properties.marginHeight,
+ static_cast<ScrollbarMode>(properties.scrollingMode));
+ }
+
owner->setScrollingMode(properties.scrollingMode);
owner->setMarginWidth(properties.marginWidth);
owner->setMarginHeight(properties.marginHeight);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698