Summary: | :in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Rebert <webkit> | ||||||
Component: | CSS | Assignee: | Benjamin Poulain <benjamin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, commit-queue, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | HasReduction, InRadar, W3CTest | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
URL: | http://w3c-test.org/html/semantics/selectors/pseudo-classes/inrange-outofrange.html | ||||||||
Attachments: |
|
Description
Chris Rebert
2016-04-12 20:07:54 PDT
Now fixed in Chrome: https://codereview.chromium.org/1890633002 Created attachment 281527 [details]
Patch
Comment on attachment 281527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281527&action=review > Source/WebCore/html/BaseDateAndTimeInputType.cpp:98 > + element().setNeedsStyleRecalc(); Is this necessary if the element has no renderer? > Source/WebCore/html/NumberInputType.cpp:305 > + renderer->setNeedsLayoutAndPrefWidthsRecalc(); Is this necessary in addition to the setNeedsStyleRecalc? Why are both required? (In reply to comment #4) > Comment on attachment 281527 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=281527&action=review > > > Source/WebCore/html/BaseDateAndTimeInputType.cpp:98 > > + element().setNeedsStyleRecalc(); > > Is this necessary if the element has no renderer? Definitely! Style is independent from the render tree. You can handle on an offscreen subtree. > > Source/WebCore/html/NumberInputType.cpp:305 > > + renderer->setNeedsLayoutAndPrefWidthsRecalc(); > > Is this necessary in addition to the setNeedsStyleRecalc? Why are both > required? Yes. The style recalc does not have to force a relayout. Here you also need the layout for properties independent from the style. Comment on attachment 281527 [details] Patch Clearing flags on attachment: 281527 Committed r202159: <http://trac.webkit.org/changeset/202159> All reviewed patches have been landed. Closing bug. |