out-of-range selector doesn't work with peer node
Reported by
mike.e...@gmail.com,
Dec 6 2016
|
|||||||
Issue descriptionChrome Version : 52.0.2743.82 (Official Build) m (32-bit) URLs (if applicable) : http://codepen.io/eegz/pen/qqYNwB Other browsers tested: Add OK or FAIL, along with the version, after other browsers where you have tested this issue: Safari: Firefox: OK IE: FAIL What steps will reproduce the problem? (1) Create an element with a peer (2) Create a selector .checkRange:out-of-range + span (3) Assign .checkRange to first element (4) Selector works on initial page load (5) Change value to out-of-range (6) Selector doesn't work What is the expected result? out-of-range selector doesn't activate. What happens instead? nothing Please provide any additional information below. Attach a screenshot if possible. Attached a code pen url above. Here is the sample code: ============================================================== <!DOCTYPE HTML5> <html> <head> <style> .checkRange:in-range + span { visibility: hidden; } .checkRange:out-of-range + span { visibility: visible; } </style> </head> <body> <input class="checkRange" type="number" min="5" max="10" value="20"/> <span>out of range</span> </body> </html> ============================================================== The <span> shows initially, but when you set the input to an out-of-range value, the span does not hide. Works on Firefox 49.0.1.
,
Dec 7 2016
Good Build : 40.0.2200.0 (Revision : 301243) Bad Build : 40.0.2202.0 (Revision : 301335) You are probably looking for a change made after 301274 (known good), but no later than 301275 (first known bad). NOTE: There is a Blink roll in the range, you might also want to do a Blink bisect. CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/af3c28a48df70525b927813b08b27407f4138fe0..548ad559ffc23af17b2ebc2e0f1f7ca95a3897bd From the above CL , suspecting the following change Suspect URL : https://chromium.googlesource.com/chromium/blink/+/94af4b12c4e4e2fe2f32c039effa3f159292b368 From the CL above, assigning the issue to the concern owner @dsinclair - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Review URL: https://codereview.chromium.org/679593004 Thanks !
,
Dec 7 2016
Rune's changes look suspicious.
,
Dec 7 2016
,
Dec 7 2016
The test works if you use the spinner or set the value in script. It does not work if you enter the number manually. The forms code does not call pseudoStateChanged() for in-range/out-of-range in those cases. tkent@: do you know where a suitable place for pseudoStateChanged() calls would be in that case?
,
Dec 7 2016
TextFieldInputType::subtreeHasChanged() calls pseudoStateChanged for :valid and :invalid, but not for :in-range and :out-of-range.
,
Dec 8 2016
Thanks, I also had to change one more place to support style invalidation for setAttribute and the value DOM api. https://codereview.chromium.org/2556423002/
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/edda97ea6721a9be143ed1e8b74f9117878ee94e commit edda97ea6721a9be143ed1e8b74f9117878ee94e Author: rune <rune@opera.com> Date: Fri Dec 09 01:38:24 2016 Missing style invalidation for :in-range and :out-of-range. Added pseudoStateChanged calls for those pseudos where we already did so for :valid and :invalid. R=tkent@chromium.org BUG= 671745 Review-Url: https://codereview.chromium.org/2556423002 Cr-Commit-Position: refs/heads/master@{#437415} [add] https://crrev.com/edda97ea6721a9be143ed1e8b74f9117878ee94e/third_party/WebKit/LayoutTests/fast/css/invalidation/in-and-out-of-range-pseudo.html [modify] https://crrev.com/edda97ea6721a9be143ed1e8b74f9117878ee94e/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp [modify] https://crrev.com/edda97ea6721a9be143ed1e8b74f9117878ee94e/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
,
Dec 9 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by manoranj...@chromium.org
, Dec 6 2016