RESOLVED FIXED Bug 156270
:indeterminate pseudo-class should match radios whose group has no checked radio
https://bugs.webkit.org/show_bug.cgi?id=156270
Summary :indeterminate pseudo-class should match radios whose group has no checked radio
Chris Rebert
Reported 2016-04-05 17:56:03 PDT
Created attachment 275732 [details] Screenshot of incorrect rendering in WebKit Nightly Per the HTML spec, the :indeterminate CSS pseudo-class should match (among other cases) when: > * <input> elements whose `type` attribute is in the Radio Button state and whose > radio button group contains no elements whose checkedness state is true. But WebKit doesn't currently make :indeterminate match in that case. Steps to reproduce: 1. Open the testcase in WebKit Nightly. 2. Observe both instances of the word "Green". Expected result: Both words should have a green background-color. (See attached Chrome screenshot.) Actual result: Both words have a white background-color. (See attached WebKit Nightly screenshot.)
Attachments
Screenshot of incorrect rendering in WebKit Nightly (282.49 KB, image/png)
2016-04-05 17:56 PDT, Chris Rebert
no flags
Screenshot of correct rendering in Chrome (87.02 KB, image/png)
2016-04-05 17:56 PDT, Chris Rebert
no flags
Patch (90.50 KB, patch)
2016-06-17 19:05 PDT, Benjamin Poulain
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (585.52 KB, application/zip)
2016-06-17 20:06 PDT, Build Bot
no flags
Patch (91.28 KB, patch)
2016-06-17 20:41 PDT, Benjamin Poulain
no flags
Chris Rebert
Comment 1 2016-04-05 17:56:50 PDT
Created attachment 275733 [details] Screenshot of correct rendering in Chrome
Benjamin Poulain
Comment 2 2016-06-17 19:05:34 PDT
Simon Fraser (smfr)
Comment 3 2016-06-17 19:26:04 PDT
Comment on attachment 281601 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281601&action=review > Source/WebCore/dom/RadioButtonGroups.cpp:82 > + bool hadCheckedButton = !!m_checkedButton; > + bool willHaveCheckedButton = !!button; No need for !! in C++ > Source/WebCore/dom/RadioButtonGroups.cpp:283 > + return !!group->checkedButton(); No need for !!
Benjamin Poulain
Comment 4 2016-06-17 19:59:38 PDT
Thanks for the review. > > Source/WebCore/dom/RadioButtonGroups.cpp:82 > > + bool hadCheckedButton = !!m_checkedButton; > > + bool willHaveCheckedButton = !!button; > > No need for !! in C++ It is just to make the conversion explicit. Especially in this case where m_checkedButton == button is incorrect but !!m_checkedButton == !!button is correct.
Build Bot
Comment 5 2016-06-17 20:06:15 PDT
Comment on attachment 281601 [details] Patch Attachment 281601 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1521146 New failing tests: imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html
Build Bot
Comment 6 2016-06-17 20:06:18 PDT
Created attachment 281602 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Benjamin Poulain
Comment 7 2016-06-17 20:41:54 PDT
WebKit Commit Bot
Comment 8 2016-06-17 22:53:31 PDT
Comment on attachment 281605 [details] Patch Clearing flags on attachment: 281605 Committed r202197: <http://trac.webkit.org/changeset/202197>
WebKit Commit Bot
Comment 9 2016-06-17 22:53:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.