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 |