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

Unified Diff: Source/core/html/TextFieldInputType.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/TextFieldInputType.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/TextFieldInputType.cpp
diff --git a/Source/core/html/TextFieldInputType.cpp b/Source/core/html/TextFieldInputType.cpp
index a40755597647c9cf0362b6c7482d376da78e34bb..2c76666ccd6925e691ee7ba8d8e728f3b8869299 100644
--- a/Source/core/html/TextFieldInputType.cpp
+++ b/Source/core/html/TextFieldInputType.cpp
@@ -408,7 +408,7 @@ void TextFieldInputType::updatePlaceholderText()
String placeholderText = element()->strippedPlaceholder();
if (placeholderText.isEmpty()) {
if (m_placeholder) {
- m_placeholder->parentNode()->removeChild(m_placeholder.get(), ASSERT_NO_EXCEPTION);
+ m_placeholder->parentNode()->removeChild(m_placeholder.get());
m_placeholder.clear();
}
return;
@@ -416,19 +416,9 @@ void TextFieldInputType::updatePlaceholderText()
if (!m_placeholder) {
m_placeholder = HTMLDivElement::create(element()->document());
m_placeholder->setPart(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
- element()->userAgentShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
+ element()->userAgentShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling());
}
- m_placeholder->setInnerText(placeholderText, ASSERT_NO_EXCEPTION);
- element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_container.get() : m_innerText.get());
-}
-
-void TextFieldInputType::attach()
-{
- InputType::attach();
- // If container exists, the container should not have any content data.
- ASSERT(!m_container || !m_container->renderStyle() || !m_container->renderStyle()->hasContent());
-
- element()->fixPlaceholderRenderer(m_placeholder.get(), m_container ? m_container.get() : m_innerText.get());
+ m_placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION);
}
bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) const
« no previous file with comments | « Source/core/html/TextFieldInputType.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698