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

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: Switch LocalFrame::m_pluginElements rep to HashSet<HTMLPlugInElement*> 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/web/PopupListBox.h
diff --git a/Source/web/PopupListBox.h b/Source/web/PopupListBox.h
index 9ad8620c9f67c8a07949ee8bc50e37369cc87713..84e3604159b49afe79516e946efa944141eeb1ce 100644
--- a/Source/web/PopupListBox.h
+++ b/Source/web/PopupListBox.h
@@ -88,9 +88,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
@@ -181,6 +181,8 @@ public:
static const int defaultMaxHeight;
+ void trace(Visitor*) OVERRIDE;
+
protected:
virtual void invalidateScrollCornerRect(const IntRect&) override { }
@@ -288,10 +290,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;
@@ -306,11 +308,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