Index: Source/core/html/HTMLFrameOwnerElement.cpp |
diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp |
index c5e86452bda6fdf90a35d11a7361475580564615..688bb4d1f3e58e2cb6b141dd7de08000337287e8 100644 |
--- a/Source/core/html/HTMLFrameOwnerElement.cpp |
+++ b/Source/core/html/HTMLFrameOwnerElement.cpp |
@@ -109,6 +109,9 @@ HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum |
, m_contentFrame(nullptr) |
, m_widget(nullptr) |
, m_sandboxFlags(SandboxNone) |
+ , m_scrollingMode(ScrollbarAuto) |
+ , m_marginWidth(-1) |
+ , m_marginHeight(-1) |
{ |
} |
@@ -191,11 +194,46 @@ void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags) |
document().frame()->loader().client()->didChangeSandboxFlags(contentFrame(), flags); |
} |
+void HTMLFrameOwnerElement::setScrollingMode(ScrollbarMode scrollbarMode) |
+{ |
+ m_scrollingMode = scrollbarMode; |
+ if (isPluginElement()) |
+ return; |
+ |
+ frameOwnerPropertiesChanged(); |
+} |
+ |
+void HTMLFrameOwnerElement::setMarginWidth(int marginWidth) |
+{ |
+ m_marginWidth = marginWidth; |
+ if (isPluginElement()) |
+ return; |
+ |
+ frameOwnerPropertiesChanged(); |
+} |
+ |
+void HTMLFrameOwnerElement::setMarginHeight(int marginHeight) |
+{ |
+ m_marginHeight = marginHeight; |
+ if (isPluginElement()) |
+ return; |
+ |
+ frameOwnerPropertiesChanged(); |
+} |
+ |
bool HTMLFrameOwnerElement::isKeyboardFocusable() const |
{ |
return m_contentFrame && HTMLElement::isKeyboardFocusable(); |
} |
+void HTMLFrameOwnerElement::frameOwnerPropertiesChanged() |
+{ |
+ // Don't notify about updates if contentFrame() is null, for example when |
+ // the subframe hasn't been created yet. |
+ if (contentFrame()) |
+ document().frame()->loader().client()->didChangeFrameOwnerProperties(contentFrame(), m_scrollingMode, m_marginWidth, m_marginHeight); |
+} |
+ |
void HTMLFrameOwnerElement::dispatchLoad() |
{ |
dispatchEvent(Event::create(EventTypeNames::load)); |