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

Unified Diff: Source/core/html/HTMLFormControlElement.cpp

Issue 137833018: Remove form control related virtual methods from Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add HTMLFormControlElement.setFocus as suggested Created 6 years, 11 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/HTMLFormControlElement.h ('k') | Source/core/html/HTMLOptGroupElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormControlElement.cpp
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
index 03d1912a59322d9cd1a3befbaa851ac12dc7a83d..5ab1b2a693b1f88b730487508358ccebc806bc4d 100644
--- a/Source/core/html/HTMLFormControlElement.cpp
+++ b/Source/core/html/HTMLFormControlElement.cpp
@@ -254,11 +254,6 @@ void HTMLFormControlElement::removedFrom(ContainerNode* insertionPoint)
FormAssociatedElement::removedFrom(insertionPoint);
}
-bool HTMLFormControlElement::wasChangedSinceLastFormControlChangeEvent() const
-{
- return m_wasChangedSinceLastFormControlChangeEvent;
-}
-
void HTMLFormControlElement::setChangedSinceLastFormControlChangeEvent(bool changed)
{
m_wasChangedSinceLastFormControlChangeEvent = changed;
@@ -507,4 +502,12 @@ String HTMLFormControlElement::nameForAutofill() const
return trimmedName;
}
+void HTMLFormControlElement::setFocus(bool flag)
+{
+ LabelableElement::setFocus(flag);
+
+ if (!flag && wasChangedSinceLastFormControlChangeEvent())
+ dispatchFormControlChangeEvent();
+}
+
} // namespace Webcore
« no previous file with comments | « Source/core/html/HTMLFormControlElement.h ('k') | Source/core/html/HTMLOptGroupElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698