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

Side by Side Diff: third_party/WebKit/Source/core/paint/ScrollbarManager.cpp

Issue 2501493002: Revert "MainFrame scrollbars should work with RFV instead of FV" (Closed)
Patch Set: Created 4 years, 1 month 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/ScrollbarManager.h" 5 #include "core/paint/ScrollbarManager.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 ScrollbarManager::ScrollbarManager(ScrollableArea& scrollableArea) 9 ScrollbarManager::ScrollbarManager(ScrollableArea& scrollableArea)
10 : m_scrollableArea(&scrollableArea), 10 : m_scrollableArea(&scrollableArea),
11 m_hBarIsAttached(0), 11 m_hBarIsAttached(0),
12 m_vBarIsAttached(0) {} 12 m_vBarIsAttached(0) {}
13 13
14 DEFINE_TRACE(ScrollbarManager) { 14 DEFINE_TRACE(ScrollbarManager) {
15 visitor->trace(m_scrollableArea); 15 visitor->trace(m_scrollableArea);
16 visitor->trace(m_hBar); 16 visitor->trace(m_hBar);
17 visitor->trace(m_vBar); 17 visitor->trace(m_vBar);
18 } 18 }
19 19
20 void ScrollbarManager::setScroller(ScrollableArea* scroller) {
21 DCHECK(m_scrollableArea != scroller);
22 DCHECK(scroller);
23 DCHECK(scroller->isRootFrameViewport() || scroller->isFrameView() ||
24 scroller->isPaintLayerScrollableArea());
25 dispose();
26 m_scrollableArea = scroller;
27 }
28
29 void ScrollbarManager::dispose() { 20 void ScrollbarManager::dispose() {
30 m_hBarIsAttached = m_vBarIsAttached = 0; 21 m_hBarIsAttached = m_vBarIsAttached = 0;
31 destroyScrollbar(HorizontalScrollbar); 22 destroyScrollbar(HorizontalScrollbar);
32 destroyScrollbar(VerticalScrollbar); 23 destroyScrollbar(VerticalScrollbar);
33 } 24 }
34 25
35 } // namespace blink 26 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ScrollbarManager.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698