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

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: address comments from Alex Created 5 years, 3 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 c5e86452bda6fdf90a35d11a7361475580564615..d11d2919576f5f9485ab0e92b8168dad0daf0d6d 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,6 +194,39 @@ void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
document().frame()->loader().client()->didChangeSandboxFlags(contentFrame(), flags);
}
+void HTMLFrameOwnerElement::setScrollingMode(ScrollbarMode scrollbarMode)
+{
+ m_scrollingMode = scrollbarMode;
+ if (isPluginElement())
+ return;
+ // 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);
alexmos 2015/09/16 00:36:47 You're using three separate IPCs to propagate thes
lazyboy 2015/09/17 20:48:39 I've made renderer->browser one IPC too, with the
alexmos 2015/09/21 16:58:07 Is there a way to avoid storing them on RenderFram
lazyboy 2015/09/21 18:04:51 changed all functions to one: didChangeFrameOwnerP
+}
+
+void HTMLFrameOwnerElement::setMarginWidth(int marginWidth)
+{
+ m_marginWidth = marginWidth;
+ if (isPluginElement())
+ return;
+ // 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;
+ if (isPluginElement())
+ return;
+ // 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