OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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; | |
alexmos
2015/09/16 00:36:47
Was losing the return intentional?
lazyboy
2015/09/17 20:48:39
No, thanks for catching.
| |
597 } | 589 } |
598 | 590 |
599 if (m_canHaveScrollbars || strategy == RulesFromWebContentOnly) { | 591 if (m_canHaveScrollbars || strategy == RulesFromWebContentOnly) { |
600 hMode = ScrollbarAuto; | 592 hMode = ScrollbarAuto; |
601 vMode = ScrollbarAuto; | 593 vMode = ScrollbarAuto; |
602 } else { | 594 } else { |
603 hMode = ScrollbarAlwaysOff; | 595 hMode = ScrollbarAlwaysOff; |
604 vMode = ScrollbarAlwaysOff; | 596 vMode = ScrollbarAlwaysOff; |
605 } | 597 } |
606 | 598 |
(...skipping 3318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3925 | 3917 |
3926 if (!graphicsLayer) | 3918 if (!graphicsLayer) |
3927 return; | 3919 return; |
3928 | 3920 |
3929 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); | 3921 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); |
3930 | 3922 |
3931 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); | 3923 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); |
3932 } | 3924 } |
3933 | 3925 |
3934 } // namespace blink | 3926 } // namespace blink |
OLD | NEW |