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())); |