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

Unified Diff: Source/platform/scroll/ScrollView.h

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Support renderer-less plugin disposal Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/platform/scroll/ScrollView.h
diff --git a/Source/platform/scroll/ScrollView.h b/Source/platform/scroll/ScrollView.h
index 1a63213971e32ccc22afab426aa87c5d78822d9b..62f9a28613e90c8747a2e4fe39ef01cf89028b77 100644
--- a/Source/platform/scroll/ScrollView.h
+++ b/Source/platform/scroll/ScrollView.h
@@ -30,6 +30,7 @@
#include "platform/PlatformExport.h"
#include "platform/Widget.h"
#include "platform/geometry/IntRect.h"
+#include "platform/heap/Handle.h"
#include "platform/scroll/ScrollTypes.h"
#include "platform/scroll/ScrollableArea.h"
#include "platform/scroll/Scrollbar.h"
@@ -45,6 +46,8 @@ class PLATFORM_EXPORT ScrollView : public Widget, public ScrollableArea {
public:
virtual ~ScrollView();
+ virtual void trace(Visitor*) OVERRIDE;
+
// ScrollableArea functions.
virtual int scrollSize(ScrollbarOrientation) const override;
virtual void setScrollOffset(const IntPoint&) override;
@@ -63,9 +66,11 @@ public:
// Returns a clip rect in host window coordinates. Used to clip the blit on a scroll.
virtual IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars) const = 0;
+ typedef WillBeHeapHashSet<RefPtrWillBeMember<Widget> > ChildrenWidgetSet;
+
// Functions for child manipulation and inspection.
- const HashSet<RefPtr<Widget> >* children() const { return &m_children; }
- virtual void addChild(PassRefPtr<Widget>);
+ const ChildrenWidgetSet* children() const { return &m_children; }
+ virtual void addChild(PassRefPtrWillBeRawPtr<Widget>);
virtual void removeChild(Widget*);
// If the scroll view does not use a native widget, then it will have cross-platform Scrollbars. These functions
@@ -104,7 +109,7 @@ public:
void setClipsRepaints(bool);
// Overridden by FrameView to create custom CSS scrollbars if applicable.
- virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
+ virtual PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
// The visible content rect has a location that is the scrolled offset of the document. The width and height are the viewport width
// and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them to be
@@ -313,15 +318,15 @@ private:
// some cleanup.
void setScrollOffsetFromUpdateScrollbars(const IntSize&);
- RefPtr<Scrollbar> m_horizontalScrollbar;
- RefPtr<Scrollbar> m_verticalScrollbar;
+ RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar;
+ RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
ScrollbarMode m_horizontalScrollbarMode;
ScrollbarMode m_verticalScrollbarMode;
bool m_horizontalScrollbarLock;
bool m_verticalScrollbarLock;
- HashSet<RefPtr<Widget> > m_children;
+ ChildrenWidgetSet m_children;
DoubleSize m_pendingScrollDelta;
DoublePoint m_scrollPosition;

Powered by Google App Engine
This is Rietveld 408576698