| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 | 228 |
| 229 void FrameView::init() | 229 void FrameView::init() |
| 230 { | 230 { |
| 231 reset(); | 231 reset(); |
| 232 | 232 |
| 233 m_size = LayoutSize(); | 233 m_size = LayoutSize(); |
| 234 | 234 |
| 235 // Propagate the marginwidth/height and scrolling modes to the view. | 235 // Propagate the marginwidth/height and scrolling modes to the view. |
| 236 // FIXME: Do we need to do this for OOPI? | 236 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways
Off) |
| 237 Element* ownerElement = m_frame->deprecatedLocalOwner(); | 237 setCanHaveScrollbars(false); |
| 238 if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElemen
t(*ownerElement))) { | |
| 239 HTMLFrameElementBase* frameElt = toHTMLFrameElementBase(ownerElement); | |
| 240 if (frameElt->scrollingMode() == ScrollbarAlwaysOff) | |
| 241 setCanHaveScrollbars(false); | |
| 242 } | |
| 243 } | 238 } |
| 244 | 239 |
| 245 void FrameView::dispose() | 240 void FrameView::dispose() |
| 246 { | 241 { |
| 247 RELEASE_ASSERT(!isInPerformLayout()); | 242 RELEASE_ASSERT(!isInPerformLayout()); |
| 248 | 243 |
| 249 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) | 244 if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) |
| 250 scrollAnimator->cancelAnimations(); | 245 scrollAnimator->cancelAnimations(); |
| 251 cancelProgrammaticScrollAnimation(); | 246 cancelProgrammaticScrollAnimation(); |
| 252 | 247 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 546 |
| 552 void FrameView::calculateScrollbarModes(ScrollbarMode& hMode, ScrollbarMode& vMo
de, ScrollbarModesCalculationStrategy strategy) | 547 void FrameView::calculateScrollbarModes(ScrollbarMode& hMode, ScrollbarMode& vMo
de, ScrollbarModesCalculationStrategy strategy) |
| 553 { | 548 { |
| 554 #define RETURN_SCROLLBAR_MODE(mode) \ | 549 #define RETURN_SCROLLBAR_MODE(mode) \ |
| 555 { \ | 550 { \ |
| 556 hMode = vMode = mode; \ | 551 hMode = vMode = mode; \ |
| 557 return; \ | 552 return; \ |
| 558 } | 553 } |
| 559 | 554 |
| 560 // Setting scrolling="no" on an iframe element disables scrolling. | 555 // Setting scrolling="no" on an iframe element disables scrolling. |
| 561 // FIXME: Handle this for OOPI? | 556 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways
Off) |
| 562 if (const HTMLFrameOwnerElement* owner = m_frame->deprecatedLocalOwner()) { | 557 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 563 if (owner->scrollingMode() == ScrollbarAlwaysOff) | |
| 564 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | |
| 565 } | |
| 566 | 558 |
| 567 // Framesets can't scroll. | 559 // Framesets can't scroll. |
| 568 Node* body = m_frame->document()->body(); | 560 Node* body = m_frame->document()->body(); |
| 569 if (isHTMLFrameSetElement(body) && body->layoutObject()) | 561 if (isHTMLFrameSetElement(body) && body->layoutObject()) |
| 570 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | 562 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 571 | 563 |
| 572 // Scrollbars can be disabled by FrameView::setCanHaveScrollbars. | 564 // Scrollbars can be disabled by FrameView::setCanHaveScrollbars. |
| 573 if (!m_canHaveScrollbars && strategy != RulesFromWebContentOnly) | 565 if (!m_canHaveScrollbars && strategy != RulesFromWebContentOnly) |
| 574 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | 566 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 575 | 567 |
| (...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3921 | 3913 |
| 3922 if (!graphicsLayer) | 3914 if (!graphicsLayer) |
| 3923 return; | 3915 return; |
| 3924 | 3916 |
| 3925 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); | 3917 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), paintInvalidationContainer, viewRect); |
| 3926 | 3918 |
| 3927 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3919 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3928 } | 3920 } |
| 3929 | 3921 |
| 3930 } // namespace blink | 3922 } // namespace blink |
| OLD | NEW |