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

Unified Diff: Source/web/PopupContainer.cpp

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/PopupContainer.cpp
diff --git a/Source/web/PopupContainer.cpp b/Source/web/PopupContainer.cpp
index f39bdc8e0bbb2d5fce34baa43e66226608a0be60..e132bc0fcffbf8635ef2aba3f00eb5fa5f6f8498 100644
--- a/Source/web/PopupContainer.cpp
+++ b/Source/web/PopupContainer.cpp
@@ -84,9 +84,9 @@ static PlatformWheelEvent constructRelativeWheelEvent(const PlatformWheelEvent&
}
// static
-PassRefPtr<PopupContainer> PopupContainer::create(PopupMenuClient* client, bool deviceSupportsTouch)
+PassRefPtrWillBeRawPtr<PopupContainer> PopupContainer::create(PopupMenuClient* client, bool deviceSupportsTouch)
{
- return adoptRef(new PopupContainer(client, deviceSupportsTouch));
+ return adoptRefWillBeNoop(new PopupContainer(client, deviceSupportsTouch));
}
PopupContainer::PopupContainer(PopupMenuClient* client, bool deviceSupportsTouch)
@@ -98,8 +98,17 @@ PopupContainer::PopupContainer(PopupMenuClient* client, bool deviceSupportsTouch
PopupContainer::~PopupContainer()
{
+#if !ENABLE(OILPAN)
if (m_listBox->parent())
m_listBox->setParent(0);
+#endif
+}
+
+void PopupContainer::trace(Visitor* visitor)
+{
+ visitor->trace(m_frameView);
+ visitor->trace(m_listBox);
+ Widget::trace(visitor);
}
IntRect PopupContainer::layoutAndCalculateWidgetRectInternal(IntRect widgetRectInScreen, int targetControlHeight, const FloatRect& windowRect, const FloatRect& screen, bool isRTL, const int rtlOffset, const int verticalOffset, const IntSize& transformOffset, PopupContent* listBox, bool& needToResizeView)
@@ -285,7 +294,7 @@ bool PopupContainer::handleMouseMoveEvent(const PlatformMouseEvent& event)
bool PopupContainer::handleMouseReleaseEvent(const PlatformMouseEvent& event)
{
- RefPtr<PopupContainer> protect(this);
+ RefPtrWillBeRawPtr<PopupContainer> protect(this);
UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
return m_listBox->handleMouseReleaseEvent(
constructRelativeMouseEvent(event, this, m_listBox.get()));

Powered by Google App Engine
This is Rietveld 408576698