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

Unified Diff: Source/web/PopupListBox.h

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase upto and resolve r182737 conflict. Created 6 years, 3 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/web/PopupListBox.h
diff --git a/Source/web/PopupListBox.h b/Source/web/PopupListBox.h
index d5300680506077aa5062f3d4af59ba668e82b901..67e5fd73d7a425196ed445f1fea196fe6d7b3660 100644
--- a/Source/web/PopupListBox.h
+++ b/Source/web/PopupListBox.h
@@ -87,9 +87,9 @@ struct PopupItem {
// This class manages the scrollable content inside a <select> popup.
class PopupListBox FINAL : public Widget, public ScrollableArea, public PopupContent {
public:
- static PassRefPtr<PopupListBox> create(PopupMenuClient* client, bool deviceSupportsTouch, PopupContainer* container)
+ static PassRefPtrWillBeRawPtr<PopupListBox> create(PopupMenuClient* client, bool deviceSupportsTouch, PopupContainer* container)
{
- return adoptRef(new PopupListBox(client, deviceSupportsTouch, container));
+ return adoptRefWillBeNoop(new PopupListBox(client, deviceSupportsTouch, container));
}
// Widget
@@ -180,6 +180,8 @@ public:
static const int defaultMaxHeight;
+ void trace(Visitor*) OVERRIDE;
+
protected:
virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { }
@@ -287,10 +289,10 @@ private:
// The scrollbar which has mouse capture. Mouse events go straight to this
// if not null.
- RefPtr<Scrollbar> m_capturingScrollbar;
+ RefPtrWillBeMember<Scrollbar> m_capturingScrollbar;
// The last scrollbar that the mouse was over. Used for mouseover highlights.
- RefPtr<Scrollbar> m_lastScrollbarUnderMouse;
+ RefPtrWillBeMember<Scrollbar> m_lastScrollbarUnderMouse;
// The string the user has typed so far into the popup. Used for typeAheadFind.
String m_typedString;
@@ -305,11 +307,14 @@ private:
int m_maxWindowWidth;
// To forward last mouse release event.
- RefPtrWillBePersistent<Element> m_focusedElement;
+ RefPtrWillBeMember<Element> m_focusedElement;
- PopupContainer* m_container;
+ // Oilpan: the container owns/wraps this listbox. A (strong)
+ // Member can be used for the back reference without extending the
+ // container's lifetime; the two objects live equally long.
+ RawPtrWillBeMember<PopupContainer> m_container;
- RefPtr<Scrollbar> m_verticalScrollbar;
+ RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
IntSize m_contentsSize;
IntPoint m_scrollOffset;
};

Powered by Google App Engine
This is Rietveld 408576698