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

Issue 616443002: Implement :valid and :invalid pseudoclass for <form> (Closed)

Created:
6 years, 2 months ago by Bartek Nowierski
Modified:
6 years, 2 months ago
Reviewers:
keishi, tkent
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-css, sof, eae+blinkwatch, ed+blinkwatch_opera.com, blink-reviews-dom_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, mlamouri (slow - plz ping)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Implement :valid and :invalid pseudoclass for <form> BUG=360466 TEST=added form-pseudo-valid-style.html layout test Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183185

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add recalculation of the style for the element itself, not just the owning form. #

Patch Set 3 : Add unit tests and some fixes #

Patch Set 4 : Fix the problem with shared element style #

Total comments: 8

Patch Set 5 : Add layout tests, apply feedback from Keishi, add support for removing/inserting elements into the … #

Total comments: 10

Patch Set 6 : Apply keshi's comments #

Total comments: 9

Patch Set 7 : Recalculate form style when a control changes form ownership #

Patch Set 8 : Move code around #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -7 lines) Patch
A LayoutTests/fast/forms/form-pseudo-valid-style.html View 1 2 3 4 5 6 1 chunk +80 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/form-pseudo-valid-style-expected.txt View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
M Source/core/css/SelectorChecker.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/SharedStyleFinder.cpp View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M Source/core/dom/Element.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLFormControlElement.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -1 line 0 comments Download
M Source/core/html/HTMLFormControlElement.cpp View 1 2 3 4 5 6 7 4 chunks +22 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFormElement.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 2 3 4 5 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
keishi
In blink we always add a test if the behavior changes. You'll need to add ...
6 years, 2 months ago (2014-09-29 13:20:44 UTC) #2
Bartek Nowierski
On 2014/09/29 13:20:44, keishi wrote: > In blink we always add a test if the ...
6 years, 2 months ago (2014-10-01 08:22:23 UTC) #3
Bartek Nowierski
https://codereview.chromium.org/616443002/diff/1/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/616443002/diff/1/Source/core/html/HTMLFormControlElement.cpp#newcode497 Source/core/html/HTMLFormControlElement.cpp:497: formOwner()->setNeedsStyleRecalc(SubtreeStyleChange); On 2014/09/29 13:20:43, keishi wrote: > Form controls ...
6 years, 2 months ago (2014-10-01 08:23:01 UTC) #4
keishi
https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElement.cpp File Source/core/html/HTMLFormControlElement.cpp (right): https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElement.cpp#newcode497 Source/core/html/HTMLFormControlElement.cpp:497: // other form elemetns, so recaluclate the entire form's ...
6 years, 2 months ago (2014-10-01 09:25:28 UTC) #5
Bartek Nowierski
We discussed caching validity in the form for performance. If you don't mind, I'd like ...
6 years, 2 months ago (2014-10-02 14:26:43 UTC) #6
keishi
Okay you can add the caching in another CL. https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElementTest.cpp File Source/core/html/HTMLFormControlElementTest.cpp (right): https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElementTest.cpp#newcode79 Source/core/html/HTMLFormControlElementTest.cpp:79: ...
6 years, 2 months ago (2014-10-03 03:44:14 UTC) #7
Bartek Nowierski
https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElementTest.cpp File Source/core/html/HTMLFormControlElementTest.cpp (right): https://codereview.chromium.org/616443002/diff/60001/Source/core/html/HTMLFormControlElementTest.cpp#newcode79 Source/core/html/HTMLFormControlElementTest.cpp:79: EXPECT_TRUE(input2->isValidElement()); On 2014/10/03 03:44:13, keishi wrote: > On 2014/10/02 ...
6 years, 2 months ago (2014-10-03 06:01:33 UTC) #8
keishi
https://codereview.chromium.org/616443002/diff/100001/LayoutTests/fast/forms/form-pseudo-valid-style.html File LayoutTests/fast/forms/form-pseudo-valid-style.html (right): https://codereview.chromium.org/616443002/diff/100001/LayoutTests/fast/forms/form-pseudo-valid-style.html#newcode56 LayoutTests/fast/forms/form-pseudo-valid-style.html:56: input1.setAttribute('type', 'text') nit: semicolon at end https://codereview.chromium.org/616443002/diff/100001/LayoutTests/fast/forms/form-pseudo-valid-style.html#newcode57 LayoutTests/fast/forms/form-pseudo-valid-style.html:57: input1.setAttribute('required', ...
6 years, 2 months ago (2014-10-03 06:34:41 UTC) #9
Bartek Nowierski
https://codereview.chromium.org/616443002/diff/100001/LayoutTests/fast/forms/form-pseudo-valid-style.html File LayoutTests/fast/forms/form-pseudo-valid-style.html (right): https://codereview.chromium.org/616443002/diff/100001/LayoutTests/fast/forms/form-pseudo-valid-style.html#newcode56 LayoutTests/fast/forms/form-pseudo-valid-style.html:56: input1.setAttribute('type', 'text') On 2014/10/03 06:34:41, keishi wrote: > nit: ...
6 years, 2 months ago (2014-10-03 07:16:58 UTC) #10
keishi
LGTM. +tkent You should fill out the CL description. BUG= should be the crbug.com number ...
6 years, 2 months ago (2014-10-03 08:01:59 UTC) #12
tkent
lgtm. Please work on :valid/:invalid support for <fieldset> too.
6 years, 2 months ago (2014-10-03 08:17:23 UTC) #13
tkent
> Please work on :valid/:invalid support for <fieldset> too. By another CL, I meant.
6 years, 2 months ago (2014-10-03 08:18:16 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/616443002/140001
6 years, 2 months ago (2014-10-03 09:13:50 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001) as 183185
6 years, 2 months ago (2014-10-03 10:21:48 UTC) #17
Bartek Nowierski
6 years, 2 months ago (2014-10-07 00:18:30 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/628133004/ by bartekn@chromium.org.

The reason for reverting is:
https://code.google.com/p/chromium/issues/detail?id=420450 "Heap-use-after-free
in blink::RenderBlock::willBeDestroyed".

Powered by Google App Engine
This is Rietveld 408576698