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

Side by Side Diff: Source/core/frame/FrameView.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 nits 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameOwner.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 } 228 }
229 229
230 void FrameView::init() 230 void FrameView::init()
231 { 231 {
232 reset(); 232 reset();
233 233
234 m_size = LayoutSize(); 234 m_size = LayoutSize();
235 235
236 // Propagate the marginwidth/height and scrolling modes to the view. 236 // Propagate the marginwidth/height and scrolling modes to the view.
237 // FIXME: Do we need to do this for OOPI? 237 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways Off)
238 Element* ownerElement = m_frame->deprecatedLocalOwner(); 238 setCanHaveScrollbars(false);
239 if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElemen t(*ownerElement))) {
240 HTMLFrameElementBase* frameElt = toHTMLFrameElementBase(ownerElement);
241 if (frameElt->scrollingMode() == ScrollbarAlwaysOff)
242 setCanHaveScrollbars(false);
243 }
244 } 239 }
245 240
246 void FrameView::dispose() 241 void FrameView::dispose()
247 { 242 {
248 RELEASE_ASSERT(!isInPerformLayout()); 243 RELEASE_ASSERT(!isInPerformLayout());
249 244
250 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) 245 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
251 scrollAnimator->cancelAnimations(); 246 scrollAnimator->cancelAnimations();
252 cancelProgrammaticScrollAnimation(); 247 cancelProgrammaticScrollAnimation();
253 248
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 vMode = ScrollbarAuto; 576 vMode = ScrollbarAuto;
582 break; 577 break;
583 default: 578 default:
584 // Don't set it at all. 579 // Don't set it at all.
585 ; 580 ;
586 } 581 }
587 } 582 }
588 583
589 void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar Mode& vMode, ScrollbarModesCalculationStrategy strategy) 584 void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar Mode& vMode, ScrollbarModesCalculationStrategy strategy)
590 { 585 {
591 // FIXME: How do we handle this for OOPI? 586 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways Off) {
592 const HTMLFrameOwnerElement* owner = m_frame->deprecatedLocalOwner();
593 if (owner && (owner->scrollingMode() == ScrollbarAlwaysOff)) {
594 hMode = ScrollbarAlwaysOff; 587 hMode = ScrollbarAlwaysOff;
595 vMode = ScrollbarAlwaysOff; 588 vMode = ScrollbarAlwaysOff;
596 return; 589 return;
597 } 590 }
598 591
599 if (m_canHaveScrollbars || strategy == RulesFromWebContentOnly) { 592 if (m_canHaveScrollbars || strategy == RulesFromWebContentOnly) {
600 hMode = ScrollbarAuto; 593 hMode = ScrollbarAuto;
601 vMode = ScrollbarAuto; 594 vMode = ScrollbarAuto;
602 } else { 595 } else {
603 hMode = ScrollbarAlwaysOff; 596 hMode = ScrollbarAlwaysOff;
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
3935 3928
3936 if (!graphicsLayer) 3929 if (!graphicsLayer)
3937 return; 3930 return;
3938 3931
3939 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3932 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3940 3933
3941 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3934 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3942 } 3935 }
3943 3936
3944 } // namespace blink 3937 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameOwner.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698