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

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

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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@gmail.com> 9 * Christian Biesinger <cbiesinger@gmail.com>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 #include "core/css/PseudoStyleRequest.h" 46 #include "core/css/PseudoStyleRequest.h"
47 #include "core/dom/AXObjectCache.h" 47 #include "core/dom/AXObjectCache.h"
48 #include "core/dom/DOMNodeIds.h" 48 #include "core/dom/DOMNodeIds.h"
49 #include "core/dom/Node.h" 49 #include "core/dom/Node.h"
50 #include "core/dom/shadow/ShadowRoot.h" 50 #include "core/dom/shadow/ShadowRoot.h"
51 #include "core/editing/FrameSelection.h" 51 #include "core/editing/FrameSelection.h"
52 #include "core/frame/FrameHost.h" 52 #include "core/frame/FrameHost.h"
53 #include "core/frame/FrameView.h" 53 #include "core/frame/FrameView.h"
54 #include "core/frame/LocalFrame.h" 54 #include "core/frame/LocalFrame.h"
55 #include "core/frame/RootFrameViewport.h"
55 #include "core/frame/Settings.h" 56 #include "core/frame/Settings.h"
56 #include "core/html/HTMLFrameOwnerElement.h" 57 #include "core/html/HTMLFrameOwnerElement.h"
57 #include "core/input/EventHandler.h" 58 #include "core/input/EventHandler.h"
58 #include "core/layout/LayoutFlexibleBox.h" 59 #include "core/layout/LayoutFlexibleBox.h"
59 #include "core/layout/LayoutPart.h" 60 #include "core/layout/LayoutPart.h"
60 #include "core/layout/LayoutScrollbar.h" 61 #include "core/layout/LayoutScrollbar.h"
61 #include "core/layout/LayoutScrollbarPart.h" 62 #include "core/layout/LayoutScrollbarPart.h"
62 #include "core/layout/LayoutTheme.h" 63 #include "core/layout/LayoutTheme.h"
63 #include "core/layout/LayoutView.h" 64 #include "core/layout/LayoutView.h"
64 #include "core/layout/compositing/CompositedLayerMapping.h" 65 #include "core/layout/compositing/CompositedLayerMapping.h"
65 #include "core/layout/compositing/PaintLayerCompositor.h" 66 #include "core/layout/compositing/PaintLayerCompositor.h"
66 #include "core/loader/FrameLoaderClient.h" 67 #include "core/loader/FrameLoaderClient.h"
67 #include "core/page/ChromeClient.h" 68 #include "core/page/ChromeClient.h"
68 #include "core/page/FocusController.h" 69 #include "core/page/FocusController.h"
69 #include "core/page/Page.h" 70 #include "core/page/Page.h"
71 #include "core/page/scrolling/RootScrollerController.h"
70 #include "core/page/scrolling/ScrollingCoordinator.h" 72 #include "core/page/scrolling/ScrollingCoordinator.h"
71 #include "core/paint/PaintLayerFragment.h" 73 #include "core/paint/PaintLayerFragment.h"
72 #include "platform/PlatformGestureEvent.h" 74 #include "platform/PlatformGestureEvent.h"
73 #include "platform/PlatformMouseEvent.h" 75 #include "platform/PlatformMouseEvent.h"
74 #include "platform/graphics/CompositorMutableProperties.h" 76 #include "platform/graphics/CompositorMutableProperties.h"
75 #include "platform/graphics/GraphicsLayer.h" 77 #include "platform/graphics/GraphicsLayer.h"
76 #include "platform/graphics/paint/DrawingRecorder.h" 78 #include "platform/graphics/paint/DrawingRecorder.h"
77 #include "platform/scroll/ScrollAnimatorBase.h" 79 #include "platform/scroll/ScrollAnimatorBase.h"
78 #include "platform/scroll/ScrollbarTheme.h" 80 #include "platform/scroll/ScrollbarTheme.h"
79 #include "public/platform/Platform.h" 81 #include "public/platform/Platform.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // FIXME: Make setSavedLayerScrollOffset take DoubleSize. crbug.com/4142 83. 151 // FIXME: Make setSavedLayerScrollOffset take DoubleSize. crbug.com/4142 83.
150 if (node && node->isElementNode()) 152 if (node && node->isElementNode())
151 toElement(node)->setSavedLayerScrollOffset(flooredIntSize(m_scrollOf fset)); 153 toElement(node)->setSavedLayerScrollOffset(flooredIntSize(m_scrollOf fset));
152 } 154 }
153 155
154 if (LocalFrame* frame = box().frame()) { 156 if (LocalFrame* frame = box().frame()) {
155 if (FrameView* frameView = frame->view()) 157 if (FrameView* frameView = frame->view())
156 frameView->removeResizerArea(box()); 158 frameView->removeResizerArea(box());
157 } 159 }
158 160
161 if (RootScrollerController* controller = box().document().rootScrollerContro ller())
162 controller->didDisposePaintLayerScrollableArea(*this);
163
159 m_scrollbarManager.dispose(); 164 m_scrollbarManager.dispose();
160 165
161 if (m_scrollCorner) 166 if (m_scrollCorner)
162 m_scrollCorner->destroy(); 167 m_scrollCorner->destroy();
163 if (m_resizer) 168 if (m_resizer)
164 m_resizer->destroy(); 169 m_resizer->destroy();
165 170
166 clearScrollAnimators(); 171 clearScrollAnimators();
167 172
168 // Note: it is not safe to call ScrollAnchor::clear if the document is being destroyed, 173 // Note: it is not safe to call ScrollAnchor::clear if the document is being destroyed,
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 1773
1769 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1774 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1770 { 1775 {
1771 for (auto& scrollableArea : *s_needsClamp) 1776 for (auto& scrollableArea : *s_needsClamp)
1772 scrollableArea->clampScrollPositionsAfterLayout(); 1777 scrollableArea->clampScrollPositionsAfterLayout();
1773 delete s_needsClamp; 1778 delete s_needsClamp;
1774 s_needsClamp = nullptr; 1779 s_needsClamp = nullptr;
1775 } 1780 }
1776 1781
1777 } // namespace blink 1782 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698