summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLInputElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLInputElement.cpp')
-rw-r--r--WebCore/html/HTMLInputElement.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index bbc9f43..31d2cc2 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -751,9 +751,6 @@ bool HTMLInputElement::shouldUseInputMethod() const
void HTMLInputElement::handleFocusEvent()
{
InputElement::dispatchFocusEvent(this, this);
-
- if (isTextField())
- m_autofilled = false;
}
void HTMLInputElement::handleBlurEvent()
@@ -1432,6 +1429,7 @@ void HTMLInputElement::setChecked(bool nowChecked, bool sendChangeEvent)
m_useDefaultChecked = false;
m_checked = nowChecked;
+ setNeedsValidityCheck();
setNeedsStyleRecalc();
updateCheckedRadioButtons();
@@ -1495,7 +1493,7 @@ String HTMLInputElement::value() const
String value = m_data.value();
if (value.isNull()) {
- value = sanitizeValue(getAttribute(valueAttr));
+ value = sanitizeValue(fastGetAttribute(valueAttr));
// If no attribute exists, extra handling may be necessary.
// For Checkbox Types just use "on" or "" based off the checked() state of the control.
@@ -1950,6 +1948,9 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
updatePlaceholderVisibility(false);
InputElement::setValueFromRenderer(m_data, this, this, value);
setNeedsValidityCheck();
+
+ // Clear autofill flag (and yellow background) on user edit.
+ setAutofilled(false);
}
void HTMLInputElement::setFileListFromRenderer(const Vector<String>& paths)
@@ -2353,7 +2354,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
// Form may never have been present, or may have been destroyed by code responding to the change event.
if (formForSubmission)
- formForSubmission->submitImplicitly(evt, isTextField());
+ formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission());
evt->setDefaultHandled();
return;