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

Unified Diff: Source/core/html/HTMLFrameOwnerElement.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/core/html/HTMLFrameOwnerElement.cpp
diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp
index 1833cc61cb2a899e2bb4319a450b82f0a8fdb14b..cb9df157f90df8a71f2824b30d95a9c10b2b7bf3 100644
--- a/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -108,6 +108,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)
{
}
@@ -190,6 +193,33 @@ void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
document().frame()->loader().client()->didChangeSandboxFlags(contentFrame(), flags);
}
+void HTMLFrameOwnerElement::setScrollingMode(ScrollbarMode scrollbarMode)
+{
+ m_scrollingMode = scrollbarMode;
+ // 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()->didChangeScrollingMode(contentFrame(), scrollbarMode);
+}
+
+void HTMLFrameOwnerElement::setMarginWidth(int marginWidth)
+{
+ m_marginWidth = marginWidth;
+ // 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()->didChangeMarginWidth(contentFrame(), m_marginWidth);
+}
+
+void HTMLFrameOwnerElement::setMarginHeight(int marginHeight)
+{
+ m_marginHeight = marginHeight;
+ // 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()->didChangeMarginHeight(contentFrame(), m_marginHeight);
+}
+
bool HTMLFrameOwnerElement::isKeyboardFocusable() const
{
return m_contentFrame && HTMLElement::isKeyboardFocusable();

Powered by Google App Engine
This is Rietveld 408576698