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

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: content_unittests compile fix Created 5 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 6a4669d8c09ce82cae969854af1485561531a555..2ebfe60de62ba50e5aebba25da9a2bec6c22acff 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -255,13 +255,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()
@@ -581,11 +576,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();
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameOwner.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698