| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 | 547 |
| 553 void FrameView::calculateScrollbarModes(ScrollbarMode& hMode, ScrollbarMode& vMo
de, ScrollbarModesCalculationStrategy strategy) | 548 void FrameView::calculateScrollbarModes(ScrollbarMode& hMode, ScrollbarMode& vMo
de, ScrollbarModesCalculationStrategy strategy) |
| 554 { | 549 { |
| 555 #define RETURN_SCROLLBAR_MODE(mode) \ | 550 #define RETURN_SCROLLBAR_MODE(mode) \ |
| 556 { \ | 551 { \ |
| 557 hMode = vMode = mode; \ | 552 hMode = vMode = mode; \ |
| 558 return; \ | 553 return; \ |
| 559 } | 554 } |
| 560 | 555 |
| 561 // Setting scrolling="no" on an iframe element disables scrolling. | 556 // Setting scrolling="no" on an iframe element disables scrolling. |
| 562 // FIXME: Handle this for OOPI? | 557 if (m_frame->owner() && m_frame->owner()->scrollingMode() == ScrollbarAlways
Off) |
| 563 if (const HTMLFrameOwnerElement* owner = m_frame->deprecatedLocalOwner()) { | 558 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 564 if (owner->scrollingMode() == ScrollbarAlwaysOff) | |
| 565 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | |
| 566 } | |
| 567 | 559 |
| 568 // Framesets can't scroll. | 560 // Framesets can't scroll. |
| 569 Node* body = m_frame->document()->body(); | 561 Node* body = m_frame->document()->body(); |
| 570 if (isHTMLFrameSetElement(body) && body->layoutObject()) | 562 if (isHTMLFrameSetElement(body) && body->layoutObject()) |
| 571 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | 563 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 572 | 564 |
| 573 // Scrollbars can be disabled by FrameView::setCanHaveScrollbars. | 565 // Scrollbars can be disabled by FrameView::setCanHaveScrollbars. |
| 574 if (!m_canHaveScrollbars && strategy != RulesFromWebContentOnly) | 566 if (!m_canHaveScrollbars && strategy != RulesFromWebContentOnly) |
| 575 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); | 567 RETURN_SCROLLBAR_MODE(ScrollbarAlwaysOff); |
| 576 | 568 |
| (...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3919 | 3911 |
| 3920 if (!graphicsLayer) | 3912 if (!graphicsLayer) |
| 3921 return; | 3913 return; |
| 3922 | 3914 |
| 3923 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3915 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
| 3924 | 3916 |
| 3925 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3917 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3926 } | 3918 } |
| 3927 | 3919 |
| 3928 } // namespace blink | 3920 } // namespace blink |
| OLD | NEW |