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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2507023002: Support script modify iframe scrolling, marginWidth and marginHeight attr (Closed)
Patch Set: bokan@ comment#19 addressed 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 4ea28a71e472ac90b904ef538954f21f0d609eca..80273895fe8d19c4425e6538a1e7b280d88200a1 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4310,6 +4310,19 @@ HTMLFrameOwnerElement* Document::localOwner() const {
return frame()->deprecatedLocalOwner();
}
+void Document::willChangeFrameOwnerProperties(int marginWidth,
+ int marginHeight,
+ ScrollbarMode scrollingMode) {
+ DCHECK(localOwner());
+
+ if (marginWidth != localOwner()->marginWidth())
+ body()->setIntegralAttribute(marginwidthAttr, marginWidth);
+ if (marginHeight != localOwner()->marginHeight())
+ body()->setIntegralAttribute(marginheightAttr, marginHeight);
+ if (scrollingMode != localOwner()->scrollingMode())
+ view()->setNeedsLayout();
+}
+
bool Document::isInInvisibleSubframe() const {
if (!localOwner())
return false; // this is a local root element

Powered by Google App Engine
This is Rietveld 408576698