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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Daniel Created 5 years, 2 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: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index f4358013708c0d32f9687e52a80a8dbc1ba2d6ba..e3bdb6c6761a66225a6304d2b5e25b2d061a93da 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -232,13 +232,8 @@ void FrameView::init()
m_size = LayoutSize();
// Propagate the marginwidth/height and scrolling modes to the view.
- // FIXME: Do we need to do this for OOPI?
- Element* ownerElement = m_frame->deprecatedLocalOwner();
- if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElement(*ownerElement))) {
- HTMLFrameElementBase* frameElt = toHTMLFrameElementBase(ownerElement);
- if (frameElt->scrollingMode() == ScrollbarAlwaysOff)
- setCanHaveScrollbars(false);
- }
+ if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlwaysOff)
+ setCanHaveScrollbars(false);
}
void FrameView::dispose()
@@ -557,11 +552,8 @@ void FrameView::calculateScrollbarModes(ScrollbarMode& hMode, ScrollbarMode& vMo
}
// Setting scrolling="no" on an iframe element disables scrolling.
- // FIXME: Handle this for OOPI?
- if (const HTMLFrameOwnerElement* owner = m_frame->deprecatedLocalOwner()) {
- if (owner->scrollingMode() == ScrollbarAlwaysOff)
- RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff);
- }
+ if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlwaysOff)
+ RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff);
// Framesets can't scroll.
Node* body = m_frame->document()->body();

Powered by Google App Engine
This is Rietveld 408576698