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

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: add more trace Created 6 years, 5 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/core/rendering/RenderMenuList.cpp
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index 57ac3b845c3a872b4546cb08d9fab7f77e7551d6..f2dd87be2bdd1b94576d9a8f9a5c5b9412e558ae 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);
}
@@ -540,7 +547,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()));

Powered by Google App Engine
This is Rietveld 408576698