:in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations
Reported by
cvreb...@gmail.com,
Apr 13 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 Steps to reproduce the problem: 1. Open the attached testcase in Chrome. 2. Observe the background-colors and borders of the <input>s What is the expected behavior? The inputs should have neither a red border nor a red background-color, because they don't have range limitations ( https://html.spec.whatwg.org/multipage/forms.html#have-range-limitations ), because they have neither `min` nor `max` attributes and the HTML spec doesn't define a default minimum or maximum for any of these input types. Therefore, these inputs should fail the 2nd of the 3 conditions required to match :in-range or :out-of-range . Per https://html.spec.whatwg.org/multipage/scripting.html#selector-in-range > The :in-range pseudo-class must match all elements that are [...], have range limitations, and [...] What went wrong? The inputs have red borders and/or red backgrounds, indicating that they matched the :in-range or :out-of-range pseudo-classes despite not having range limitations Did this work before? N/A Chrome version: 52.0.2707.0 Channel: canary OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0
,
Apr 13 2016
,
Apr 13 2016
,
Apr 14 2016
See also http://w3c-test.org/html/semantics/selectors/pseudo-classes/inrange-outofrange.html which now tests this.
,
Jun 3 2016
,
Jun 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a543e0c81913215edafb3337ec88c815ddde8c35 commit a543e0c81913215edafb3337ec88c815ddde8c35 Author: tkent <tkent@chromium.org> Date: Fri Jun 03 07:52:38 2016 :in-range and :out-of-range CSS selectors should check 'have range limitations.' Spec.: https://html.spec.whatwg.org/multipage/scripting.html#selector-in-range These CSS selectors should work only if |min| or |max| attribute has a valid value except for input[type=range] which has default minimum/maximum values. BUG= 603268 Review-Url: https://codereview.chromium.org/2033323002 Cr-Commit-Position: refs/heads/master@{#397654} [delete] https://crrev.com/75f4d6a92c6e94eb090ee44f181dbff933cca359/third_party/WebKit/LayoutTests/imported/wpt/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt [modify] https://crrev.com/a543e0c81913215edafb3337ec88c815ddde8c35/third_party/WebKit/Source/core/html/forms/InputType.cpp [modify] https://crrev.com/a543e0c81913215edafb3337ec88c815ddde8c35/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp [modify] https://crrev.com/a543e0c81913215edafb3337ec88c815ddde8c35/third_party/WebKit/Source/core/html/forms/StepRange.cpp [modify] https://crrev.com/a543e0c81913215edafb3337ec88c815ddde8c35/third_party/WebKit/Source/core/html/forms/StepRange.h [modify] https://crrev.com/a543e0c81913215edafb3337ec88c815ddde8c35/third_party/WebKit/Source/core/html/forms/StepRangeTest.cpp
,
Jun 6 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by manoranj...@chromium.org
, Apr 13 2016