<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>148675</bug_id>
          
          <creation_ts>2015-09-01 06:51:53 -0700</creation_ts>
          <short_desc>Can’t arbitrarily resize radios / checkboxes</short_desc>
          <delta_ts>2022-07-31 21:57:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>Safari 9</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.11</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robin Whittleton">robin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>ap</cc>
    
    <cc>dino</cc>
    
    <cc>jonlee</cc>
    
    <cc>karlcow</cc>
    
    <cc>lea</cc>
    
    <cc>martin</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tom.byers</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1122524</commentid>
    <comment_count>0</comment_count>
    <who name="Robin Whittleton">robin</who>
    <bug_when>2015-09-01 06:51:53 -0700</bug_when>
    <thetext>I did some research on how radios and checkboxes resize in various browsers: https://gdstechnology.blog.gov.uk/2015/08/27/making-radio-buttons-and-checkboxes-easier-to-use/

It appears that on OS X by default radios and checkboxes are fixed to either a normal or a small size (&lt;14px). Screenshots:

Safari 8: https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/osx_10.10_safari.png
Safari 9: https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/osx_10.11_safari.png
Chrome: https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/osx_10.10_chrome.png

Firefox makes an attempt to resize if requested but looks blurry, presumably because it’s only using the one raster image:

https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/osx_10.10_firefox.png

It’s possible to get one size bigger by tricking Safari into using the @2x radio image using transform:scale(2), but this only seems to work on non-retina machines (see Lea Verou’s bug #58524).

It would be great to be able to resize radios and checkboxes to fit the text around them. Our workaround is to handroll custom inputs, but these require extra maintenance and only work for us rather than the whole development community. Is Webkit on OS X tied to raster inputs, and if so is there work in progress to update these to vectors and unlock the size?

It’s worth pointing out that Windows (desktop and mobile), Android and iOS all have vector widgets for checkboxes and radios; OS X is lagging here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122526</commentid>
    <comment_count>1</comment_count>
    <who name="Robin Whittleton">robin</who>
    <bug_when>2015-09-01 07:22:19 -0700</bug_when>
    <thetext>Bug #147405 allows scaling of radios / checkboxes while pinch zooming, albeit with a blur due to the raster sources. Is this something that could be adopted for this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122527</commentid>
    <comment_count>2</comment_count>
      <attachid>260362</attachid>
    <who name="Robin Whittleton">robin</who>
    <bug_when>2015-09-01 07:30:29 -0700</bug_when>
    <thetext>Created attachment 260362
Radio / checkbox resizing testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122773</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-09-01 22:33:04 -0700</bug_when>
    <thetext>Isn&apos;t this just a duplicate of bug 147405? Shipping a newer WebKit as part of Safari is not something that we would track in Bugzilla.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122798</commentid>
    <comment_count>4</comment_count>
    <who name="Robin Whittleton">robin</who>
    <bug_when>2015-09-02 01:13:23 -0700</bug_when>
    <thetext>Not as far as I understand it. Pre bug #147405, Safari would not scale radios/checkboxes outside of the two default sizes (3 if on a non-retina screen as it treats the @2x asset as a third larger size). That bug changes the behavior such that regardless of zoom level radios / checkboxes remain at their ‘natural’ size (i.e. consistent with the size of the text).

This bug is an enhancement request to allow web developers to set a specific size for radios/checkboxes using CSS. On other platforms this is generally the default behaviour these days. For example, Edge on Windows 10 or Safari on iOS:

https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/win_10_edge.png
https://gdstechnology.blog.gov.uk/wp-content/uploads/sites/31/2015/08/ios_8_safari.png

The only browser to allow this behaviour on OS X is Firefox. Its implementation causes the radios/checkboxes to go slightly fuzzy at non-default sizes, something that could be amended a bit by scaling the @2x asset I guess. Either way, a little blurring is a small price to pay for the increased usability. If this issue can be fixed without blurring then even better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264235</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-01-05 14:21:53 -0800</bug_when>
    <thetext>&lt;rdar://problem/29889889&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>260362</attachid>
            <date>2015-09-01 07:30:29 -0700</date>
            <delta_ts>2015-09-01 07:30:29 -0700</delta_ts>
            <desc>Radio / checkbox resizing testcase</desc>
            <filename>input_test.html</filename>
            <type>text/html</type>
            <size>3447</size>
            <attacher name="Robin Whittleton">robin</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGNoYXJzZXQ9InV0
Zi04IiAvPgo8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRo
LC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