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

Unified Diff: Source/core/dom/Document.cpp

Issue 137833018: Remove form control related virtual methods from Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove hopefully unneeded HTMLOptGroupElement.foemControlType 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 | « no previous file | Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index e3199112cca649bf8ae7e40a0ba871602fad2a2f..ff5e580bb70eaf891bee1f518b0ea4f4fbf39d2d 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3363,8 +3363,11 @@ bool Document::setFocusedElement(PassRefPtr<Element> prpNewFocusedElement, Focus
oldFocusedElement->setFocus(false);
// Dispatch a change event for text fields or textareas that have been edited
- if (oldFocusedElement->wasChangedSinceLastFormControlChangeEvent())
- oldFocusedElement->dispatchFormControlChangeEvent();
+ if (oldFocusedElement->isFormControlElement()) {
tkent 2014/01/30 01:38:50 I don't like this change. It increased virtual cal
Inactive 2014/01/30 01:57:22 Did it really increase virtual calls? Sure isFormC
+ HTMLFormControlElement* formControlElement = toHTMLFormControlElement(oldFocusedElement);
+ if (formControlElement->wasChangedSinceLastFormControlChangeEvent())
+ formControlElement->dispatchFormControlChangeEvent();
+ }
// Dispatch the blur event and let the node do any other blur related activities (important for text fields)
// If page lost focus, blur event will have already been dispatched
« no previous file with comments | « no previous file | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698