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

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

Issue 2622103002: Generalize browser controls adjustment for arbitrary scrollers. (Closed)
Patch Set: Fixed some comments Created 3 years, 11 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 | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
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 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
8 reserved. 8 reserved.
9 9
10 This library is free software; you can redistribute it and/or 10 This library is free software; you can redistribute it and/or
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // Sets the tickmarks for the FrameView, overriding the default behavior 410 // Sets the tickmarks for the FrameView, overriding the default behavior
411 // which is to display the tickmarks corresponding to find results. 411 // which is to display the tickmarks corresponding to find results.
412 // If |m_tickmarks| is empty, the default behavior is restored. 412 // If |m_tickmarks| is empty, the default behavior is restored.
413 void setTickmarks(const Vector<IntRect>& tickmarks) { 413 void setTickmarks(const Vector<IntRect>& tickmarks) {
414 m_tickmarks = tickmarks; 414 m_tickmarks = tickmarks;
415 invalidatePaintForTickmarks(); 415 invalidatePaintForTickmarks();
416 } 416 }
417 417
418 void invalidatePaintForTickmarks(); 418 void invalidatePaintForTickmarks();
419 419
420 // Since the compositor can resize the viewport due to browser controls and
421 // commit scroll offsets before a WebView::resize occurs, we need to adjust
422 // our scroll extents to prevent clamping the scroll offsets.
423 void setBrowserControlsViewportAdjustment(float);
424 IntSize browserControlsSize() const {
425 return IntSize(0, ceilf(m_browserControlsViewportAdjustment));
426 }
427
428 IntSize maximumScrollOffsetInt() const override; 420 IntSize maximumScrollOffsetInt() const override;
429 421
430 // ScrollableArea interface 422 // ScrollableArea interface
431 void getTickmarks(Vector<IntRect>&) const override; 423 void getTickmarks(Vector<IntRect>&) const override;
432 IntRect scrollableAreaBoundingBox() const override; 424 IntRect scrollableAreaBoundingBox() const override;
433 bool scrollAnimatorEnabled() const override; 425 bool scrollAnimatorEnabled() const override;
434 bool usesCompositedScrolling() const override; 426 bool usesCompositedScrolling() const override;
435 bool shouldScrollOnMainThread() const override; 427 bool shouldScrollOnMainThread() const override;
436 PaintLayer* layer() const override; 428 PaintLayer* layer() const override;
437 GraphicsLayer* layerForScrolling() const override; 429 GraphicsLayer* layerForScrolling() const override;
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 float m_inputEventsScaleFactorForEmulation; 1056 float m_inputEventsScaleFactorForEmulation;
1065 1057
1066 IntSize m_layoutSize; 1058 IntSize m_layoutSize;
1067 IntSize m_initialViewportSize; 1059 IntSize m_initialViewportSize;
1068 bool m_layoutSizeFixedToFrameSize; 1060 bool m_layoutSizeFixedToFrameSize;
1069 1061
1070 Timer<FrameView> m_didScrollTimer; 1062 Timer<FrameView> m_didScrollTimer;
1071 1063
1072 Vector<IntRect> m_tickmarks; 1064 Vector<IntRect> m_tickmarks;
1073 1065
1074 float m_browserControlsViewportAdjustment;
1075
1076 bool m_needsUpdateWidgetGeometries; 1066 bool m_needsUpdateWidgetGeometries;
1077 1067
1078 #if ENABLE(ASSERT) 1068 #if ENABLE(ASSERT)
1079 // Verified when finalizing. 1069 // Verified when finalizing.
1080 bool m_hasBeenDisposed; 1070 bool m_hasBeenDisposed;
1081 #endif 1071 #endif
1082 1072
1083 ScrollbarMode m_horizontalScrollbarMode; 1073 ScrollbarMode m_horizontalScrollbarMode;
1084 ScrollbarMode m_verticalScrollbarMode; 1074 ScrollbarMode m_verticalScrollbarMode;
1085 1075
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 widget.isFrameView()); 1195 widget.isFrameView());
1206 DEFINE_TYPE_CASTS(FrameView, 1196 DEFINE_TYPE_CASTS(FrameView,
1207 ScrollableArea, 1197 ScrollableArea,
1208 scrollableArea, 1198 scrollableArea,
1209 scrollableArea->isFrameView(), 1199 scrollableArea->isFrameView(),
1210 scrollableArea.isFrameView()); 1200 scrollableArea.isFrameView());
1211 1201
1212 } // namespace blink 1202 } // namespace blink
1213 1203
1214 #endif // FrameView_h 1204 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698