| Index: Source/core/html/HTMLInputElement.cpp
|
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
|
| index f14561f81f06a0416f789f4e2a8c18d358011798..4cbb77c6d991682f83159740eeb4c1d6d28b1ee7 100644
|
| --- a/Source/core/html/HTMLInputElement.cpp
|
| +++ b/Source/core/html/HTMLInputElement.cpp
|
| @@ -119,6 +119,7 @@ HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
|
| , m_hasTouchEventHandler(false)
|
| , m_shouldRevealPassword(false)
|
| , m_needsToUpdateViewValue(true)
|
| + , m_isPlaceholderVisible(false)
|
| // |m_inputType| is lazily created when constructed by the parser to avoid
|
| // constructing unnecessarily a text inputType and its shadow subtree, just
|
| // to destroy them when the |type| attribute gets set by the parser to
|
| @@ -700,7 +701,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
|
| } else if (name == valueAttr) {
|
| // We only need to setChanged if the form is looking at the default value right now.
|
| if (!hasDirtyValue()) {
|
| - updatePlaceholderVisibility(false);
|
| + updatePlaceholderVisibility();
|
| setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAttribute(valueAttr));
|
| }
|
| m_needsToUpdateViewValue = true;
|
| @@ -1665,6 +1666,11 @@ bool HTMLInputElement::shouldAppearChecked() const
|
| return checked() && m_inputType->isCheckable();
|
| }
|
|
|
| +void HTMLInputElement::setPlaceholderVisibility(bool visible)
|
| +{
|
| + m_isPlaceholderVisible = visible;
|
| +}
|
| +
|
| bool HTMLInputElement::supportsPlaceholder() const
|
| {
|
| return m_inputType->supportsPlaceholder();
|
|
|