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

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

Issue 2695493003: Ensure FrameView scrollbars are updated when changing device emulation modes (Closed)
Patch Set: sdfljsldjsf Created 3 years, 10 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) 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 // https://crbug.com/680606. Animation timelines and hosts for scrolling 824 // https://crbug.com/680606. Animation timelines and hosts for scrolling
825 // are normally owned by ScrollingCoordinator, but there is only one 825 // are normally owned by ScrollingCoordinator, but there is only one
826 // of those objects per page. To get around this, we temporarily stash a 826 // of those objects per page. To get around this, we temporarily stash a
827 // unique timeline and host on each OOPIF FrameView. 827 // unique timeline and host on each OOPIF FrameView.
828 void setAnimationTimeline(std::unique_ptr<CompositorAnimationTimeline>); 828 void setAnimationTimeline(std::unique_ptr<CompositorAnimationTimeline>);
829 void setAnimationHost(std::unique_ptr<CompositorAnimationHost>); 829 void setAnimationHost(std::unique_ptr<CompositorAnimationHost>);
830 830
831 // Returns the GeometryMapper associated with the root local frame. 831 // Returns the GeometryMapper associated with the root local frame.
832 GeometryMapper& geometryMapper(); 832 GeometryMapper& geometryMapper();
833 833
834 // The visual viewport can supply scrollbars which affect the existence of
835 // our scrollbars (see: computeScrollbarExistence).
836 void visualViewportScrollbarsChanged();
837
834 protected: 838 protected:
835 // Scroll the content via the compositor. 839 // Scroll the content via the compositor.
836 bool scrollContentsFastPath(const IntSize& scrollDelta); 840 bool scrollContentsFastPath(const IntSize& scrollDelta);
837 841
838 // Scroll the content by invalidating everything. 842 // Scroll the content by invalidating everything.
839 void scrollContentsSlowPath(); 843 void scrollContentsSlowPath();
840 844
841 ScrollBehavior scrollBehaviorStyle() const override; 845 ScrollBehavior scrollBehaviorStyle() const override;
842 846
843 void scrollContentsIfNeeded(); 847 void scrollContentsIfNeeded();
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 // main thread scrolling reasons. 1203 // main thread scrolling reasons.
1200 Vector<int> m_mainThreadScrollingReasonsCounter; 1204 Vector<int> m_mainThreadScrollingReasonsCounter;
1201 1205
1202 // TODO(kenrb): Remove these when https://crbug.com/680606 is resolved. 1206 // TODO(kenrb): Remove these when https://crbug.com/680606 is resolved.
1203 std::unique_ptr<CompositorAnimationTimeline> m_animationTimeline; 1207 std::unique_ptr<CompositorAnimationTimeline> m_animationTimeline;
1204 std::unique_ptr<CompositorAnimationHost> m_animationHost; 1208 std::unique_ptr<CompositorAnimationHost> m_animationHost;
1205 1209
1206 std::unique_ptr<GeometryMapper> m_geometryMapper; 1210 std::unique_ptr<GeometryMapper> m_geometryMapper;
1207 1211
1208 Member<PrintContext> m_printContext; 1212 Member<PrintContext> m_printContext;
1213
1214 FRIEND_TEST_ALL_PREFIXES(WebViewTest, DeviceEmulationResetScrollbars);
1209 }; 1215 };
1210 1216
1211 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) { 1217 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) {
1212 if (m_isVisuallyNonEmpty) 1218 if (m_isVisuallyNonEmpty)
1213 return; 1219 return;
1214 m_visuallyNonEmptyCharacterCount += count; 1220 m_visuallyNonEmptyCharacterCount += count;
1215 // Use a threshold value to prevent very small amounts of visible content from 1221 // Use a threshold value to prevent very small amounts of visible content from
1216 // triggering didMeaningfulLayout. The first few hundred characters rarely 1222 // triggering didMeaningfulLayout. The first few hundred characters rarely
1217 // contain the interesting content of the page. 1223 // contain the interesting content of the page.
1218 static const unsigned visualCharacterThreshold = 200; 1224 static const unsigned visualCharacterThreshold = 200;
(...skipping 20 matching lines...) Expand all
1239 widget.isFrameView()); 1245 widget.isFrameView());
1240 DEFINE_TYPE_CASTS(FrameView, 1246 DEFINE_TYPE_CASTS(FrameView,
1241 ScrollableArea, 1247 ScrollableArea,
1242 scrollableArea, 1248 scrollableArea,
1243 scrollableArea->isFrameView(), 1249 scrollableArea->isFrameView(),
1244 scrollableArea.isFrameView()); 1250 scrollableArea.isFrameView());
1245 1251
1246 } // namespace blink 1252 } // namespace blink
1247 1253
1248 #endif // FrameView_h 1254 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698