| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 , m_wasScrolledByUser(false) | 114 , m_wasScrolledByUser(false) |
| 115 , m_inProgrammaticScroll(false) | 115 , m_inProgrammaticScroll(false) |
| 116 , m_safeToPropagateScrollToParent(true) | 116 , m_safeToPropagateScrollToParent(true) |
| 117 , m_isTrackingPaintInvalidations(false) | 117 , m_isTrackingPaintInvalidations(false) |
| 118 , m_scrollCorner(nullptr) | 118 , m_scrollCorner(nullptr) |
| 119 , m_visibleContentScaleFactor(1) | 119 , m_visibleContentScaleFactor(1) |
| 120 , m_inputEventsScaleFactorForEmulation(1) | 120 , m_inputEventsScaleFactorForEmulation(1) |
| 121 , m_layoutSizeFixedToFrameSize(true) | 121 , m_layoutSizeFixedToFrameSize(true) |
| 122 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) | 122 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) |
| 123 , m_needsUpdateWidgetPositions(false) | 123 , m_needsUpdateWidgetPositions(false) |
| 124 , m_topControlsViewportAdjustment(0) |
| 124 { | 125 { |
| 125 ASSERT(m_frame); | 126 ASSERT(m_frame); |
| 126 init(); | 127 init(); |
| 127 | 128 |
| 128 if (!m_frame->isMainFrame()) | 129 if (!m_frame->isMainFrame()) |
| 129 return; | 130 return; |
| 130 | 131 |
| 131 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); | 132 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); |
| 132 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); | 133 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); |
| 133 } | 134 } |
| (...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3001 | 3002 |
| 3002 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3003 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
| 3003 { | 3004 { |
| 3004 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3005 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
| 3005 if (AXObjectCache* cache = axObjectCache()) { | 3006 if (AXObjectCache* cache = axObjectCache()) { |
| 3006 cache->remove(scrollbar); | 3007 cache->remove(scrollbar); |
| 3007 cache->handleScrollbarUpdate(this); | 3008 cache->handleScrollbarUpdate(this); |
| 3008 } | 3009 } |
| 3009 } | 3010 } |
| 3010 | 3011 |
| 3012 void FrameView::setTopControlsViewportAdjustment(float adjustment) |
| 3013 { |
| 3014 m_topControlsViewportAdjustment = adjustment; |
| 3015 } |
| 3016 |
| 3017 IntPoint FrameView::maximumScrollPosition() const |
| 3018 { |
| 3019 FloatSize visibleContentSizeF = unscaledVisibleContentSize(ExcludeScrollbars
); |
| 3020 visibleContentSizeF.expand(0, -m_topControlsViewportAdjustment); |
| 3021 visibleContentSizeF.scale(1 / visibleContentScaleFactor()); |
| 3022 IntSize visibleSize = expandedIntSize(visibleContentSizeF); |
| 3023 |
| 3024 IntPoint maximumOffset( |
| 3025 contentsWidth() - visibleSize.width() - scrollOrigin().x(), |
| 3026 contentsHeight() - visibleSize.height() - scrollOrigin().y()); |
| 3027 maximumOffset.clampNegativeToZero(); |
| 3028 return maximumOffset; |
| 3029 } |
| 3030 |
| 3011 } // namespace blink | 3031 } // namespace blink |
| OLD | NEW |