| Index: Source/core/html/HTMLFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
|
| index 6f610bbc04af646268e467a57f8569f576eac4a6..3df66ef189b97382390cd0d43608cf3015a8399c 100644
|
| --- a/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -48,6 +48,7 @@ using namespace std;
|
| HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form)
|
| : LabelableElement(tagName, document)
|
| , m_disabled(false)
|
| + , m_isAutofilled(false)
|
| , m_isReadOnly(false)
|
| , m_isRequired(false)
|
| , m_valueMatchesRenderer(false)
|
| @@ -121,6 +122,12 @@ void HTMLFormControlElement::ancestorDisabledStateWasChanged()
|
| disabledAttributeChanged();
|
| }
|
|
|
| +void HTMLFormControlElement::reset()
|
| +{
|
| + setAutofilled(false);
|
| + resetImpl();
|
| +}
|
| +
|
| void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
|
| {
|
| if (name == formAttr) {
|
| @@ -200,6 +207,15 @@ bool HTMLFormControlElement::isAutofocusable() const
|
| return false;
|
| }
|
|
|
| +void HTMLFormControlElement::setAutofilled(bool autofilled)
|
| +{
|
| + if (autofilled == m_isAutofilled)
|
| + return;
|
| +
|
| + m_isAutofilled = autofilled;
|
| + setNeedsStyleRecalc();
|
| +}
|
| +
|
| static bool shouldAutofocusOnAttach(const HTMLFormControlElement* element)
|
| {
|
| if (!element->isAutofocusable())
|
|
|