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

Issue 601633004: Revert "Revert of Fix update of validity cache value, so that it reflects the correct state of any … (Closed)

Created:
6 years, 3 months ago by spartha
Modified:
5 years, 6 months ago
Reviewers:
tkent, keishi
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Revert "Revert of Fix update of validity cache value, so that it reflects the correct state of any FormControlElement. (patchset #14 id:340001 of https://codereview.chromium.org/460343004/)" This reverts commit 5cd4e2dfa19f87866941652dae2fe228b5048be3. BUG=

Patch Set 1 #

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

Messages

Total messages: 4 (1 generated)
spartha
6 years, 3 months ago (2014-09-24 15:08:14 UTC) #2
tkent
https://codereview.chromium.org/601633004/diff/1/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/601633004/diff/1/Source/core/html/HTMLFormControlElement.cpp#newcode501 Source/core/html/HTMLFormControlElement.cpp:501: if (valid() != m_isValid) This is incorrect. Because setNeedsValidityCheck() ...
6 years, 3 months ago (2014-09-25 05:35:55 UTC) #3
spartha
6 years, 3 months ago (2014-09-25 06:38:05 UTC) #4
https://codereview.chromium.org/601633004/diff/1/Source/core/html/HTMLFormCon...
File Source/core/html/HTMLFormControlElement.cpp (right):

https://codereview.chromium.org/601633004/diff/1/Source/core/html/HTMLFormCon...
Source/core/html/HTMLFormControlElement.cpp:501: if (valid() != m_isValid)
On 2014/09/25 05:35:55, tkent (high review load) wrote:
> This is incorrect. Because setNeedsValidityCheck() can be called before all of
> state changes are completed, valid() here may return an incorrect result, and
we
> might miss a necessary setNeedsStyleRecalc() call.
> 
> If style recalc cost is much larger than validation cost, a solution would be
to
> remove the validity lazy evaluation and the validity cache, and call valid()
> every time.  This also can cause performance regression of
> DOM/textarea-{dom,edit}.html performance tests.
As you suggest removing the validity cache should be fine. But actual issue is
with the style recalc. The tricky part is we need style recalc to update the
control's state, and we should avoid over doing it for performance. I cannot
think of a more reliable way to restrict the number style recalcs.

Powered by Google App Engine
This is Rietveld 408576698