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

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: 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 ec2a8b2708b75ebc210bbd037792dc91ee4d61ac..808f28618de7ad32080eee7ea7220eb9cb6b51a6 100644
--- a/Source/core/html/TextFieldInputType.cpp
+++ b/Source/core/html/TextFieldInputType.cpp
@@ -418,17 +418,7 @@ void TextFieldInputType::updatePlaceholderText()
m_placeholder->setPart(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
element()->userAgentShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ASSERT_NO_EXCEPTION);
ojan 2013/08/22 18:41:47 Can you make this AttachLazily as part of this pat
}
- 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