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

Unified Diff: Source/core/html/HTMLTextAreaElement.cpp

Issue 23035007: Replace HTMLTextFormControlElement::fixPlaceholderRenderer with an override of RenderTextControl::a… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Just delete the test Created 7 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/html/HTMLTextAreaElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextAreaElement.cpp
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index c02e8fb211e1b91fafbb38b3ba78dec1fd53718e..4bba65f345b25a7798aa5d4544e6daed1129b31a 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -519,12 +519,6 @@ HTMLElement* HTMLTextAreaElement::placeholderElement() const
return m_placeholder;
}
-void HTMLTextAreaElement::attach(const AttachContext& context)
-{
- HTMLTextFormControlElement::attach(context);
- fixPlaceholderRenderer(m_placeholder, innerTextElement());
-}
-
bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const
{
return isReadOnly();
@@ -540,7 +534,7 @@ void HTMLTextAreaElement::updatePlaceholderText()
String placeholderText = strippedPlaceholder();
if (placeholderText.isEmpty()) {
if (m_placeholder) {
- userAgentShadowRoot()->removeChild(m_placeholder, ASSERT_NO_EXCEPTION);
+ userAgentShadowRoot()->removeChild(m_placeholder);
m_placeholder = 0;
}
return;
@@ -549,10 +543,9 @@ void HTMLTextAreaElement::updatePlaceholderText()
RefPtr<HTMLDivElement> placeholder = HTMLDivElement::create(document());
m_placeholder = placeholder.get();
m_placeholder->setPart(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
- userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
+ userAgentShadowRoot()->insertBefore(m_placeholder, innerTextElement()->nextSibling());
}
- m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
- fixPlaceholderRenderer(m_placeholder, innerTextElement());
+ m_placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION);
}
}
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.h ('k') | Source/core/html/HTMLTextFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698