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

Issue 85513002: Refactoring: Removing an extra boolean 'm_wasModifiedByUser' from (Closed)

Created:
7 years ago by arpitab_
Modified:
7 years ago
Reviewers:
tkent, esprehn
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refactoring: Removing an extra boolean 'm_wasModifiedByUser' from HTMLInputElement and HTMLTextAreaElement. 'm_wasModifiedByUser' was introduced so that element.validity.tooLong does not return true for values set via JavaScript irrespective of the size of the input value. Thus this bool was set only for user initiated actions on text controls. However, the parent class for both: HTMLTextFormControlElement, holds another boolean member 'm_lastChangeWasUserEdit' which too gets set only while performing user initiated editing actions on the form's text controls. [in the defaultEventHandler of textFormControlElement and only if the eventType is webkitEditableContentChanged.] Thus, instead of maintaining the extra boolean 'm_wasModifiedByUser' in both the HTMLInputElement and the HTMLTextAreaElement classes, we can make use of their parent's 'm_wasModifiedByUser' which holds exactly the same information. This can be verified by executing layout tests such as: fast/forms/ValidityState-tooLong-textarea.html fast/forms/ValidityState-tooLong-input.html fast/forms/validationMessage.html which were modified for verifying the validity of the form text controls. (tooLong etc.) These pass even when using 'm_lastChangeWasUserEdit' instead of 'm_wasModifiedByUser'. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162794

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -13 lines) Patch
M Source/core/html/HTMLInputElement.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 6 chunks +1 line, -7 lines 0 comments Download
M Source/core/html/HTMLTextAreaElement.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLTextAreaElement.cpp View 4 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
arpitab_
7 years ago (2013-11-25 10:18:37 UTC) #1
esprehn
This change looks fine to me, but tkent should probably give the final review.
7 years ago (2013-11-26 09:03:20 UTC) #2
arpitab_
On 2013/11/26 09:03:20, esprehn wrote: > This change looks fine to me, but tkent should ...
7 years ago (2013-11-26 09:23:25 UTC) #3
tkent
Does this CL work well if the value was set by <datalist> popup or autocompletion ...
7 years ago (2013-11-26 09:36:39 UTC) #4
arpitab_
On 2013/11/26 09:36:39, tkent wrote: > Does this CL work well if the value was ...
7 years ago (2013-11-26 13:20:39 UTC) #5
arpitab_
On 2013/11/26 13:20:39, arpitab_ wrote: > On 2013/11/26 09:36:39, tkent wrote: > > Does this ...
7 years ago (2013-11-26 13:30:48 UTC) #6
tkent
Another question. Does this work if: 1. Load a page with <input> 2. Fill the ...
7 years ago (2013-11-27 01:16:59 UTC) #7
arpitab_
On 2013/11/27 01:16:59, tkent wrote: > Another question. Does this work if: > 1. Load ...
7 years ago (2013-11-27 12:20:30 UTC) #8
tkent
Thank you for testing. lgtm.
7 years ago (2013-11-27 23:39:17 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-27 23:45:39 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-28 01:58:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-28 02:03:36 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-28 02:07:21 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-28 02:18:25 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/85513002/1
7 years ago (2013-11-28 02:26:27 UTC) #15
commit-bot: I haz the power
7 years ago (2013-11-28 02:35:25 UTC) #16
Message was sent while issue was closed.
Change committed as 162794

Powered by Google App Engine
This is Rietveld 408576698