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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.h

Issue 2365173002: Detach PaintLayerScrollableArea from RootFrameViewport when disposed. (Closed)
Patch Set: Fixed ASAN failure in previous patch Created 4 years, 2 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/page/scrolling/RootScrollerController.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 // 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 #ifndef RootScrollerController_h 5 #ifndef RootScrollerController_h
6 #define RootScrollerController_h 6 #define RootScrollerController_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class Document; 13 class Document;
14 class Element; 14 class Element;
15 class GraphicsLayer; 15 class GraphicsLayer;
16 class PaintLayer; 16 class PaintLayer;
17 class PaintLayerScrollableArea;
17 class ScrollableArea; 18 class ScrollableArea;
18 class ScrollStateCallback; 19 class ScrollStateCallback;
19 20
20 // Manages the root scroller associated with a given document. The root 21 // Manages the root scroller associated with a given document. The root
21 // scroller causes top controls movement, overscroll effects and prevents 22 // scroller causes top controls movement, overscroll effects and prevents
22 // chaining scrolls up further in the DOM. It can be set from script using 23 // chaining scrolls up further in the DOM. It can be set from script using
23 // document.setRootScroller. 24 // document.setRootScroller.
24 // 25 //
25 // There are two notions of a root scroller in this class: m_rootScroller and 26 // There are two notions of a root scroller in this class: m_rootScroller and
26 // m_effectiveRootScroller. The former is the Element that was set as the root 27 // m_effectiveRootScroller. The former is the Element that was set as the root
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // This returns the Element that's actually being used to control viewport 64 // This returns the Element that's actually being used to control viewport
64 // actions right now. This is different from get() if a root scroller hasn't 65 // actions right now. This is different from get() if a root scroller hasn't
65 // been set, or if the set root scroller isn't currently a valid scroller. 66 // been set, or if the set root scroller isn't currently a valid scroller.
66 Element* effectiveRootScroller() const; 67 Element* effectiveRootScroller() const;
67 68
68 // This class needs to be informed of changes in layout so that it can 69 // This class needs to be informed of changes in layout so that it can
69 // determine if the current root scroller is still valid or if it must be 70 // determine if the current root scroller is still valid or if it must be
70 // replaced by the default root scroller. 71 // replaced by the default root scroller.
71 void didUpdateLayout(); 72 void didUpdateLayout();
72 73
74 // PaintLayerScrollableAreas need to notify this class when they're being
75 // disposed so that we can remove them as the root scroller.
76 void didDisposePaintLayerScrollableArea(PaintLayerScrollableArea&);
77
73 // Returns the PaintLayer associated with the currently effective root 78 // Returns the PaintLayer associated with the currently effective root
74 // scroller. 79 // scroller.
75 PaintLayer* rootScrollerPaintLayer() const; 80 PaintLayer* rootScrollerPaintLayer() const;
76 81
77 private: 82 private:
78 RootScrollerController(Document&); 83 RootScrollerController(Document&);
79 84
80 // Ensures the effective root scroller is currently valid and replaces it 85 // Ensures the effective root scroller is currently valid and replaces it
81 // with the default if not. 86 // with the default if not.
82 void recomputeEffectiveRootScroller(); 87 void recomputeEffectiveRootScroller();
(...skipping 17 matching lines...) Expand all
100 105
101 // The element currently being used as the root scroller in this Document. 106 // The element currently being used as the root scroller in this Document.
102 // If the m_rootScroller is valid this will point to it. Otherwise, it'll 107 // If the m_rootScroller is valid this will point to it. Otherwise, it'll
103 // use a default Element. 108 // use a default Element.
104 WeakMember<Element> m_effectiveRootScroller; 109 WeakMember<Element> m_effectiveRootScroller;
105 }; 110 };
106 111
107 } // namespace blink 112 } // namespace blink
108 113
109 #endif // RootScrollerController_h 114 #endif // RootScrollerController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698