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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index c44b227186644837c5a4a628e8e496940d1075d4..3ff2914920492d893e77e9502ec6b5d9488d0ba6 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4404,6 +4404,20 @@ HTMLFrameOwnerElement* Document::localOwner() const {
return frame()->deprecatedLocalOwner();
}
+void Document::willChangeFrameOwnerProperties(int marginWidth,
+ int marginHeight,
+ ScrollbarMode scrollingMode) {
+ DCHECK(frame() && frame()->owner());
+ FrameOwner* owner = frame()->owner();
+
+ if (marginWidth != owner->marginWidth())
+ body()->setIntegralAttribute(marginwidthAttr, marginWidth);
+ if (marginHeight != owner->marginHeight())
+ body()->setIntegralAttribute(marginheightAttr, marginHeight);
+ if (scrollingMode != owner->scrollingMode())
+ view()->setNeedsLayout();
+}
+
bool Document::isInInvisibleSubframe() const {
if (!localOwner())
return false; // this is a local root element
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698