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

Unified Diff: Source/core/rendering/RenderMenuList.cpp

Issue 423093002: Oilpan: Prepare to move RenderObject and RenderObjectChildList to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: dispose -> destroy Created 6 years, 4 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
« no previous file with comments | « Source/core/rendering/RenderMenuList.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMenuList.cpp
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index a07945d60ec81df946b13d548e516c437a2e9d5f..7dcec918e209c0c99b0422a251fe8bc7d4da968d 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -53,8 +53,8 @@ using namespace HTMLNames;
RenderMenuList::RenderMenuList(Element* element)
: RenderFlexibleBox(element)
- , m_buttonText(0)
- , m_innerBlock(0)
+ , m_buttonText(nullptr)
+ , m_innerBlock(nullptr)
, m_optionsChanged(true)
, m_optionsWidth(0)
, m_lastActiveIndex(-1)
@@ -70,6 +70,13 @@ RenderMenuList::~RenderMenuList()
m_popup = nullptr;
}
+void RenderMenuList::trace(Visitor* visitor)
+{
+ visitor->trace(m_buttonText);
+ visitor->trace(m_innerBlock);
+ RenderFlexibleBox::trace(visitor);
+}
+
// FIXME: Instead of this hack we should add a ShadowRoot to <select> with no insertion point
// to prevent children from rendering.
bool RenderMenuList::isChildAllowed(RenderObject* object, RenderStyle*) const
@@ -139,7 +146,7 @@ void RenderMenuList::removeChild(RenderObject* oldChild)
{
if (oldChild == m_innerBlock || !m_innerBlock) {
RenderFlexibleBox::removeChild(oldChild);
- m_innerBlock = 0;
+ m_innerBlock = nullptr;
} else
m_innerBlock->removeChild(oldChild);
}
@@ -536,7 +543,7 @@ void RenderMenuList::getItemBackgroundColor(unsigned listIndex, Color& itemBackg
PopupMenuStyle RenderMenuList::menuStyle() const
{
- const RenderObject* o = m_innerBlock ? m_innerBlock : this;
+ const RenderObject* o = m_innerBlock ? m_innerBlock.get() : this;
const RenderStyle* s = o->style();
return PopupMenuStyle(o->resolveColor(CSSPropertyColor), o->resolveColor(CSSPropertyBackgroundColor), s->font(), s->visibility() == VISIBLE,
s->display() == NONE, s->textIndent(), style()->direction(), isOverride(style()->unicodeBidi()));
« no previous file with comments | « Source/core/rendering/RenderMenuList.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698