DescriptionUpdate text field 'change' event logic to match to Firefox.
We tried to do so by r430531, but it was incomplete.
We investigated Firefox behavior in many more cases, and our understanding
is that:
A) Initialize last-value with null.
B) On every user edit, set the value before the edit to last-value if it is null.
C) On every user edit, set last-value to null if it and the new value are same.
D) Dispatch CHANGE event if last-value is not null and it and the current value
are not same.
TextControlElement::m_valueBeforeFirstUserEdit represents last-value.
TextControlElement::setValueBeforeFirstUserEditIfNotSet() represents B, and
TestControlElement::checkIfValueWasReverted() represents C. This CL adds them to
every code path updating value by user edit.
BUG=706370
Review-Url: https://codereview.chromium.org/2796853002
Cr-Commit-Position: refs/heads/master@{#462349}
Committed: https://chromium.googlesource.com/chromium/src/+/90b048661a3949cd38ef690052d6930c230b4100
Patch Set 1 : . #Patch Set 2 : . #Messages
Total messages: 31 (27 generated)
|