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

Issue 460343004: Fix update of validity cache value, so that it reflects the correct state of any FormControlElement. (Closed)

Created:
6 years, 4 months ago by spartha
Modified:
6 years, 3 months ago
Reviewers:
keishi, tkent
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix update of validity cache value, so that it reflects the correct state of FormControlElements. This patch does a lazy update of validity, avoiding caching stale value. setNeedsValidityCheck() now does not update validity, but flags it for update. BUG=400618, 403313 TEST=LayoutTests/fast/forms/number/number-validity-badinput.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181422

Patch Set 1 #

Total comments: 3

Patch Set 2 : Addressed Review Comments #

Patch Set 3 : InputTypeView is updated, before call to setNeedsValidityCheck() #

Patch Set 4 : Improved Check #

Patch Set 5 : WIP #

Patch Set 6 : #

Patch Set 7 : Function Namechange removed #

Patch Set 8 : WIP #

Patch Set 9 : WIP2 #

Total comments: 11

Patch Set 10 : Alternate patch #

Patch Set 11 : #

Total comments: 8

Patch Set 12 : Rebase #

Patch Set 13 : +Review comments #

Total comments: 2

Patch Set 14 : Updated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -13 lines) Patch
M LayoutTests/fast/forms/number/number-validity-badinput.html View 2 3 chunks +13 lines, -2 lines 0 comments Download
M LayoutTests/fast/forms/number/number-validity-badinput-expected.txt View 2 1 chunk +9 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFormControlElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormControlElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -6 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTextAreaElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 52 (3 generated)
spartha
6 years, 4 months ago (2014-08-13 14:00:06 UTC) #1
spartha
PTAL!!
6 years, 4 months ago (2014-08-14 05:32:15 UTC) #2
tkent
https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp File Source/core/html/forms/NumberInputType.cpp (right): https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp#newcode240 Source/core/html/forms/NumberInputType.cpp:240: // We need to pick the visibleValue() for the ...
6 years, 4 months ago (2014-08-14 05:39:08 UTC) #3
spartha
On 2014/08/14 05:39:08, tkent wrote: > https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp > File Source/core/html/forms/NumberInputType.cpp (right): > > https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp#newcode240 > ...
6 years, 4 months ago (2014-08-14 08:03:20 UTC) #4
tkent
On 2014/08/14 08:03:20, spartha wrote: > > Can we just add updateView() at the beginning ...
6 years, 4 months ago (2014-08-14 08:17:56 UTC) #5
spartha
Thanks for the review! PTAL https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp File Source/core/html/forms/NumberInputType.cpp (right): https://codereview.chromium.org/460343004/diff/60001/Source/core/html/forms/NumberInputType.cpp#newcode241 Source/core/html/forms/NumberInputType.cpp:241: String standardValue = convertFromVisibleValue(element().hasDirtyValue() ...
6 years, 4 months ago (2014-08-15 12:29:34 UTC) #6
tkent
I'm sorry that I misunderstood hasDirtyValue. I thought it returned false when the value was ...
6 years, 4 months ago (2014-08-15 13:02:00 UTC) #7
spartha
On 2014/08/15 13:02:00, tkent wrote: > I'm sorry that I misunderstood hasDirtyValue. I thought it ...
6 years, 4 months ago (2014-08-15 13:40:44 UTC) #8
spartha
On 2014/08/15 13:40:44, spartha wrote: > On 2014/08/15 13:02:00, tkent wrote: > > I'm sorry ...
6 years, 4 months ago (2014-08-15 13:54:09 UTC) #9
tkent
On 2014/08/15 13:54:09, spartha wrote: > On 2014/08/15 13:40:44, spartha wrote: > > On 2014/08/15 ...
6 years, 4 months ago (2014-08-15 14:11:58 UTC) #10
spartha
On 2014/08/15 14:11:58, tkent wrote: > On 2014/08/15 13:54:09, spartha wrote: > > On 2014/08/15 ...
6 years, 4 months ago (2014-08-16 05:21:21 UTC) #11
tkent
On 2014/08/16 05:21:21, spartha wrote: > There is this function NumberInputType::setValue, which finally gets called ...
6 years, 4 months ago (2014-08-18 01:59:57 UTC) #12
spartha
On 2014/08/18 01:59:57, tkent wrote: > On 2014/08/16 05:21:21, spartha wrote: > > There is ...
6 years, 4 months ago (2014-08-18 14:31:33 UTC) #13
spartha
With this patch, I now call updateView() for InputType textfield before the call to setNeedsValidityCheck(). ...
6 years, 4 months ago (2014-08-19 13:05:42 UTC) #14
tkent
On 2014/08/19 13:05:42, spartha wrote: > With this patch, I now call updateView() for InputType ...
6 years, 4 months ago (2014-08-19 22:53:48 UTC) #15
spartha
On 2014/08/19 22:53:48, tkent wrote: > On 2014/08/19 13:05:42, spartha wrote: > > With this ...
6 years, 4 months ago (2014-08-20 05:53:12 UTC) #16
spartha
On 2014/08/20 05:53:12, spartha wrote: > On 2014/08/19 22:53:48, tkent wrote: > > On 2014/08/19 ...
6 years, 4 months ago (2014-08-20 08:34:48 UTC) #17
spartha
PatchSet 4 adds additional check for calling updateView, in view of the concerns raised. This ...
6 years, 4 months ago (2014-08-20 08:59:07 UTC) #18
tkent
On 2014/08/20 08:34:48, spartha wrote: > Unfortunately, both your proposed solutions have the same problem ...
6 years, 4 months ago (2014-08-21 01:54:15 UTC) #19
spartha
Patchset #6 (id:160001) has been deleted
6 years, 3 months ago (2014-08-26 08:47:00 UTC) #20
spartha
Refactoring the code to address the issue. Text Inputs rely on inner editor value for ...
6 years, 3 months ago (2014-08-26 09:07:36 UTC) #21
tkent
On 2014/08/21 01:54:15, tkent wrote: > On 2014/08/20 08:34:48, spartha wrote: > > Unfortunately, both ...
6 years, 3 months ago (2014-08-26 22:30:19 UTC) #22
spartha
On 2014/08/26 22:30:19, tkent wrote: > On 2014/08/21 01:54:15, tkent wrote: > > On 2014/08/20 ...
6 years, 3 months ago (2014-08-27 03:11:51 UTC) #23
tkent
On 2014/08/27 03:11:51, spartha wrote: > On 2014/08/26 22:30:19, tkent wrote: > > On 2014/08/21 ...
6 years, 3 months ago (2014-08-27 03:46:07 UTC) #24
spartha
On 2014/08/27 03:46:07, tkent wrote: > On 2014/08/27 03:11:51, spartha wrote: > > On 2014/08/26 ...
6 years, 3 months ago (2014-08-27 03:48:40 UTC) #25
spartha
On 2014/08/27 03:48:40, spartha wrote: > On 2014/08/27 03:46:07, tkent wrote: > > On 2014/08/27 ...
6 years, 3 months ago (2014-08-27 03:55:13 UTC) #26
spartha
On 2014/08/27 03:55:13, spartha wrote: > On 2014/08/27 03:48:40, spartha wrote: > > On 2014/08/27 ...
6 years, 3 months ago (2014-08-27 06:06:04 UTC) #27
tkent
The stack trace is interesting. So, we can't resolve this issue by reordering updateView and ...
6 years, 3 months ago (2014-08-28 08:47:30 UTC) #28
spartha
On 2014/08/28 08:47:30, tkent wrote: > The stack trace is interesting. So, we can't resolve ...
6 years, 3 months ago (2014-08-28 10:40:09 UTC) #29
tkent
On 2014/08/28 10:40:09, spartha wrote: > On 2014/08/28 08:47:30, tkent wrote: > > The stack ...
6 years, 3 months ago (2014-09-01 02:33:05 UTC) #30
tkent
On 2014/09/01 02:33:05, tkent wrote: > On 2014/08/28 10:40:09, spartha wrote: > > On 2014/08/28 ...
6 years, 3 months ago (2014-09-01 02:34:44 UTC) #31
spartha
This patch tries to address the lazy validity check. PTAL! https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.cpp File Source/core/html/HTMLTextAreaElement.cpp (left): https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.cpp#oldcode333 ...
6 years, 3 months ago (2014-09-02 14:09:55 UTC) #32
tkent
https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLFormControlElement.cpp#newcode61 Source/core/html/HTMLFormControlElement.cpp:61: , m_validIsDirty(false) Initial value should be |true| conceptually. https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLFormControlElement.cpp#newcode488 ...
6 years, 3 months ago (2014-09-03 02:16:36 UTC) #33
spartha
https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.h File Source/core/html/HTMLTextAreaElement.h (left): https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.h#oldcode131 Source/core/html/HTMLTextAreaElement.h:131: bool m_valueIsUpToDate; On 2014/09/03 02:16:35, tkent wrote: > On ...
6 years, 3 months ago (2014-09-03 06:14:47 UTC) #34
tkent
https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.h File Source/core/html/HTMLTextAreaElement.h (left): https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLTextAreaElement.h#oldcode131 Source/core/html/HTMLTextAreaElement.h:131: bool m_valueIsUpToDate; On 2014/09/03 06:14:47, spartha wrote: > On ...
6 years, 3 months ago (2014-09-03 07:56:43 UTC) #35
spartha
Alternate approach. PTAL! https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/240001/Source/core/html/HTMLFormControlElement.cpp#newcode61 Source/core/html/HTMLFormControlElement.cpp:61: , m_validIsDirty(false) On 2014/09/03 02:16:35, tkent ...
6 years, 3 months ago (2014-09-03 07:58:40 UTC) #36
tkent
If a textarea has neither |required| attribute nor |maxlength| attribute, validation process should not call ...
6 years, 3 months ago (2014-09-03 07:58:47 UTC) #37
tkent
https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp#newcode490 Source/core/html/HTMLFormControlElement.cpp:490: } We should keep the ASSERT if !m_validityIsDirty. https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLTextAreaElement.cpp ...
6 years, 3 months ago (2014-09-03 08:04:44 UTC) #38
spartha
https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp#newcode490 Source/core/html/HTMLFormControlElement.cpp:490: } On 2014/09/03 08:04:44, tkent wrote: > We should ...
6 years, 3 months ago (2014-09-03 08:50:58 UTC) #39
tkent
https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp#newcode490 Source/core/html/HTMLFormControlElement.cpp:490: } On 2014/09/03 08:50:57, spartha wrote: > On 2014/09/03 ...
6 years, 3 months ago (2014-09-03 09:11:27 UTC) #40
spartha
PTAL! https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/280001/Source/core/html/HTMLFormControlElement.cpp#newcode490 Source/core/html/HTMLFormControlElement.cpp:490: } On 2014/09/03 09:11:27, tkent wrote: > On ...
6 years, 3 months ago (2014-09-03 14:47:33 UTC) #41
tkent
https://codereview.chromium.org/460343004/diff/320001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/320001/Source/core/html/HTMLFormControlElement.cpp#newcode481 Source/core/html/HTMLFormControlElement.cpp:481: ASSERT(!m_validityIsDirty); This assertion doesn't make sense. I meant: if ...
6 years, 3 months ago (2014-09-04 04:49:36 UTC) #42
spartha
https://codereview.chromium.org/460343004/diff/320001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/460343004/diff/320001/Source/core/html/HTMLFormControlElement.cpp#newcode481 Source/core/html/HTMLFormControlElement.cpp:481: ASSERT(!m_validityIsDirty); On 2014/09/04 04:49:36, tkent wrote: > This assertion ...
6 years, 3 months ago (2014-09-04 05:20:57 UTC) #43
tkent
lgtm
6 years, 3 months ago (2014-09-04 12:41:07 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/460343004/340001
6 years, 3 months ago (2014-09-04 12:41:44 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/25561)
6 years, 3 months ago (2014-09-04 15:30:08 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sudarshan.p@samsung.com/460343004/340001
6 years, 3 months ago (2014-09-04 20:10:11 UTC) #50
commit-bot: I haz the power
Committed patchset #14 (id:340001) as 181422
6 years, 3 months ago (2014-09-05 00:09:40 UTC) #51
spartha
6 years, 3 months ago (2014-09-20 06:30:31 UTC) #52
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:340001) has been created in
https://codereview.chromium.org/583833007/ by sudarshan.p@samsung.com.

The reason for reverting is: Caused regression in blink_perf. crbug.com/412054 .

Powered by Google App Engine
This is Rietveld 408576698