Bug 160484 - iOS doesn't support indeterminate checkboxes
Summary: iOS doesn't support indeterminate checkboxes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 9
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
URL: http://output.jsbin.com/hopasu/quiet
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2016-08-02 18:15 PDT by Chris Rebert
Modified: 2018-10-16 10:51 PDT (History)
11 users (show)

See Also:


Attachments
Patch (9.32 KB, patch)
2018-08-03 17:27 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.33 MB, application/zip)
2018-08-03 19:22 PDT, Build Bot
no flags Details
Patch (10.17 KB, patch)
2018-08-06 09:21 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff
Patch (10.09 KB, patch)
2018-08-06 10:19 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rebert 2016-08-02 18:15:55 PDT
Specification:
https://html.spec.whatwg.org/#dom-input-indeterminate

Does this work in other (mobile) browsers?:
Yes; see http://caniuse.com/#feat=indeterminate-checkbox

Steps to reproduce:
1. Open http://output.jsbin.com/hopasu/quiet in iOS Safari

Expected result:
The middle checkbox should be displayed as being indeterminate.
(For comparison, on macOS Safari, the indeterminate status is displayed by
having the checkbox contain a horizontal bar (instead of a check mark) on a blue background.)

Actual result:
The middle checkbox is displayed the same as the unchecked top checkbox.
Comment 1 m.kurz+webkitbugs 2017-03-18 15:48:59 PDT
+1
Comment 2 Radar WebKit Bug Importer 2017-03-20 02:07:16 PDT
<rdar://problem/31143185>
Comment 3 tcrjk0+webkitbugs 2018-05-26 09:48:58 PDT
+1 Still a bug. This should get fixed.
Comment 4 Aditya Keerthi 2018-08-03 17:27:11 PDT
Created attachment 346567 [details]
Patch
Comment 5 Build Bot 2018-08-03 19:22:45 PDT
Comment on attachment 346567 [details]
Patch

Attachment 346567 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/8757357

New failing tests:
fast/forms/indeterminate.html
Comment 6 Build Bot 2018-08-03 19:22:46 PDT
Created attachment 346577 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.4
Comment 7 Aditya Keerthi 2018-08-06 09:21:24 PDT
Created attachment 346631 [details]
Patch
Comment 8 Wenson Hsieh 2018-08-06 09:43:05 PDT
Comment on attachment 346631 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346631&action=review

Looks good! Just a couple of minor comments...

> Source/WebCore/rendering/RenderThemeIOS.mm:374
> +static void drawJoinedLines(CGContextRef context, Vector<CGPoint> points, CGLineCap lineCap, float lineWidth, Color strokeColor)

This should probably be a const Vector<CGPoint>& (or Vector<CGPoint>&& combined with WTFMove at the call site).

> LayoutTests/fast/forms/ios/render-indeterminate-checkbox-expected-mismatch.html:8
> +function runTest()

Nit - it would be simpler to just have `document.querySelector("input").indeterminate = true;` in the script tag without wrapping it in runTest() and waiting until the load event, but this is okay too.
Comment 9 Aditya Keerthi 2018-08-06 10:19:24 PDT
Created attachment 346633 [details]
Patch
Comment 10 WebKit Commit Bot 2018-08-06 11:06:32 PDT
Comment on attachment 346633 [details]
Patch

Clearing flags on attachment: 346633

Committed r234609: <https://trac.webkit.org/changeset/234609>
Comment 11 WebKit Commit Bot 2018-08-06 11:06:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 HM100 2018-09-28 06:13:18 PDT
I don’t see any changes to the indeterminate checkboxes even in iOS 12. Tested it now
Comment 13 HM100 2018-10-16 06:28:45 PDT
(In reply to HM100 from comment #12)
> I don’t see any changes to the indeterminate checkboxes even in iOS 12.
> Tested it now

Has that change rollbacked moments before the iOS12?
Comment 14 Tim Horton 2018-10-16 10:46:56 PDT
(In reply to HM100 from comment #13)
> (In reply to HM100 from comment #12)
> > I don’t see any changes to the indeterminate checkboxes even in iOS 12.
> > Tested it now
> 
> Has that change rollbacked moments before the iOS12?

Trunk WebKit doesn't track a particular iOS release. The bug is fixed in trunk WebKit, but Apple doesn't comment on if/when that will make it into a release.
Comment 15 Wenson Hsieh 2018-10-16 10:51:54 PDT
(In reply to Tim Horton from comment #14)
> (In reply to HM100 from comment #13)
> > (In reply to HM100 from comment #12)
> > > I don’t see any changes to the indeterminate checkboxes even in iOS 12.
> > > Tested it now
> > 
> > Has that change rollbacked moments before the iOS12?
> 
> Trunk WebKit doesn't track a particular iOS release. The bug is fixed in
> trunk WebKit, but Apple doesn't comment on if/when that will make it into a
> release.

Indeed!

We can let you know once this has been released in a public beta; before then, another option is to build trunk WebKit for iOS Simulator (against iOS 12) by following the instructions here: <https://webkit.org/building-webkit>, and try out indeterminate checkboxes on iOS.