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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 560623002: Adjust maximum scroll bounds on FrameView to account for top controls. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 , m_wasScrolledByUser(false) 111 , m_wasScrolledByUser(false)
112 , m_inProgrammaticScroll(false) 112 , m_inProgrammaticScroll(false)
113 , m_safeToPropagateScrollToParent(true) 113 , m_safeToPropagateScrollToParent(true)
114 , m_isTrackingPaintInvalidations(false) 114 , m_isTrackingPaintInvalidations(false)
115 , m_scrollCorner(nullptr) 115 , m_scrollCorner(nullptr)
116 , m_visibleContentScaleFactor(1) 116 , m_visibleContentScaleFactor(1)
117 , m_inputEventsScaleFactorForEmulation(1) 117 , m_inputEventsScaleFactorForEmulation(1)
118 , m_layoutSizeFixedToFrameSize(true) 118 , m_layoutSizeFixedToFrameSize(true)
119 , m_didScrollTimer(this, &FrameView::didScrollTimerFired) 119 , m_didScrollTimer(this, &FrameView::didScrollTimerFired)
120 , m_needsUpdateWidgetPositions(false) 120 , m_needsUpdateWidgetPositions(false)
121 , m_topControlsViewportAdjustment(0)
121 { 122 {
122 ASSERT(m_frame); 123 ASSERT(m_frame);
123 init(); 124 init();
124 125
125 if (!m_frame->isMainFrame()) 126 if (!m_frame->isMainFrame())
126 return; 127 return;
127 128
128 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); 129 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
129 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); 130 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
130 } 131 }
(...skipping 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 2976
2976 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 2977 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
2977 { 2978 {
2978 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 2979 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
2979 if (AXObjectCache* cache = axObjectCache()) { 2980 if (AXObjectCache* cache = axObjectCache()) {
2980 cache->remove(scrollbar); 2981 cache->remove(scrollbar);
2981 cache->handleScrollbarUpdate(this); 2982 cache->handleScrollbarUpdate(this);
2982 } 2983 }
2983 } 2984 }
2984 2985
2986 void FrameView::setTopControlsViewportAdjustment(int adjustment)
2987 {
2988 m_topControlsViewportAdjustment = adjustment;
2989 }
2990
2991 IntPoint FrameView::maximumScrollPosition() const
2992 {
2993 IntPoint max = ScrollView::maximumScrollPosition();
2994 max.move(0, m_topControlsViewportAdjustment / visibleContentScaleFactor());
2995 return max;
2996 }
2997
2985 } // namespace blink 2998 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698