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

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

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: Review feedback 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
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/FrameView.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter 300 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter
301 // passed around the FrameView layout methods can be true while this returns 301 // passed around the FrameView layout methods can be true while this returns
302 // false. 302 // false.
303 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } 303 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; }
304 304
305 // Sets the tickmarks for the FrameView, overriding the default behavior 305 // Sets the tickmarks for the FrameView, overriding the default behavior
306 // which is to display the tickmarks corresponding to find results. 306 // which is to display the tickmarks corresponding to find results.
307 // If |m_tickmarks| is empty, the default behavior is restored. 307 // If |m_tickmarks| is empty, the default behavior is restored.
308 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark s; } 308 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark s; }
309 309
310 // Since the compositor can resize the viewport due to top controls and
311 // commit scroll offsets before a WebView::resize occurs, we need to adjust
312 // our scroll extents to prevent clamping the scroll offsets.
313 void setTopControlsViewportAdjustment(float);
314
315 virtual IntPoint maximumScrollPosition() const OVERRIDE;
316
310 // ScrollableArea interface 317 // ScrollableArea interface
311 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE; 318 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
312 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE; 319 virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE;
313 virtual void scrollTo(const IntSize&) OVERRIDE; 320 virtual void scrollTo(const IntSize&) OVERRIDE;
314 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; 321 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
315 virtual bool scrollAnimatorEnabled() const OVERRIDE; 322 virtual bool scrollAnimatorEnabled() const OVERRIDE;
316 virtual bool usesCompositedScrolling() const OVERRIDE; 323 virtual bool usesCompositedScrolling() const OVERRIDE;
317 virtual GraphicsLayer* layerForScrolling() const OVERRIDE; 324 virtual GraphicsLayer* layerForScrolling() const OVERRIDE;
318 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE; 325 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE;
319 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE; 326 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 float m_inputEventsScaleFactorForEmulation; 488 float m_inputEventsScaleFactorForEmulation;
482 489
483 IntSize m_layoutSize; 490 IntSize m_layoutSize;
484 bool m_layoutSizeFixedToFrameSize; 491 bool m_layoutSizeFixedToFrameSize;
485 492
486 Timer<FrameView> m_didScrollTimer; 493 Timer<FrameView> m_didScrollTimer;
487 494
488 Vector<IntRect> m_tickmarks; 495 Vector<IntRect> m_tickmarks;
489 496
490 bool m_needsUpdateWidgetPositions; 497 bool m_needsUpdateWidgetPositions;
498 float m_topControlsViewportAdjustment;
491 }; 499 };
492 500
493 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 501 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
494 { 502 {
495 if (m_isVisuallyNonEmpty) 503 if (m_isVisuallyNonEmpty)
496 return; 504 return;
497 m_visuallyNonEmptyCharacterCount += count; 505 m_visuallyNonEmptyCharacterCount += count;
498 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 506 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
499 // The first few hundred characters rarely contain the interesting content o f the page. 507 // The first few hundred characters rarely contain the interesting content o f the page.
500 static const unsigned visualCharacterThreshold = 200; 508 static const unsigned visualCharacterThreshold = 200;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); 543 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
536 } 544 }
537 private: 545 private:
538 FrameView* m_view; 546 FrameView* m_view;
539 bool m_originalValue; 547 bool m_originalValue;
540 }; 548 };
541 549
542 } // namespace blink 550 } // namespace blink
543 551
544 #endif // FrameView_h 552 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698