Index: Source/core/html/HTMLTextAreaElement.cpp |
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp |
index 06f755ea766cd311f89ec136ec74af046a6ef6eb..f053929ce39ff032cb516695b6a958a8b188d8f2 100644 |
--- a/Source/core/html/HTMLTextAreaElement.cpp |
+++ b/Source/core/html/HTMLTextAreaElement.cpp |
@@ -522,13 +522,13 @@ bool HTMLTextAreaElement::shouldUseInputMethod() |
HTMLElement* HTMLTextAreaElement::placeholderElement() const |
{ |
- return m_placeholder; |
+ return Handle<HTMLElement>(m_placeholder).raw(); |
} |
void HTMLTextAreaElement::attach() |
{ |
HTMLTextFormControlElement::attach(); |
- fixPlaceholderRenderer(m_placeholder, innerTextElement()); |
+ fixPlaceholderRenderer(Handle<HTMLElement>(m_placeholder).raw(), innerTextElement()); |
} |
bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const |
@@ -546,23 +546,24 @@ void HTMLTextAreaElement::updatePlaceholderText() |
String placeholderText = strippedPlaceholder(); |
if (placeholderText.isEmpty()) { |
if (m_placeholder) { |
- userAgentShadowRoot()->removeChild(m_placeholder, ASSERT_NO_EXCEPTION); |
- m_placeholder = 0; |
+ userAgentShadowRoot()->removeChild(Handle<HTMLElement>(m_placeholder).raw(), ASSERT_NO_EXCEPTION); |
+ m_placeholder = nullptr; |
} |
return; |
} |
if (!m_placeholder) { |
Handle<HTMLDivElement> placeholder = HTMLDivElement::create(document()); |
- m_placeholder = placeholder.raw(); |
+ m_placeholder = placeholder; |
m_placeholder->setPseudo(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral)); |
- userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION); |
+ userAgentShadowRoot()->insertBefore(Handle<HTMLElement>(m_placeholder).raw(), innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION); |
} |
m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION); |
- fixPlaceholderRenderer(m_placeholder, innerTextElement()); |
+ fixPlaceholderRenderer(Handle<HTMLElement>(m_placeholder).raw(), innerTextElement()); |
} |
void HTMLTextAreaElement::acceptHeapVisitor(Visitor* visitor) const |
{ |
+ visitor->visit(m_placeholder); |
HTMLTextFormControlElement::acceptHeapVisitor(visitor); |
} |