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

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: 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/PopupContainer.cpp
diff --git a/Source/web/PopupContainer.cpp b/Source/web/PopupContainer.cpp
index f39bdc8e0bbb2d5fce34baa43e66226608a0be60..29e1c90ca6b7cb4121e937f16a184b9dee5a23c6 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,18 @@ PopupContainer::PopupContainer(PopupMenuClient* client, bool deviceSupportsTouch
PopupContainer::~PopupContainer()
{
+#if !ENABLE(OILPAN)
+ // FIXME: can ~PopupListBox take care this?
haraken 2014/09/26 09:19:25 I'm not sure if this is a FIXME. Now that the Pop
sof 2014/09/28 15:11:26 It's a non-Oilpan FIXME, but I will just leave it
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 +295,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