<?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>267679</bug_id>
          
          <creation_ts>2024-01-17 23:51:11 -0800</creation_ts>
          <short_desc>&lt;input type=checkbox switch&gt; paints outside its box and the thumb is slightly misaligned on macOS</short_desc>
          <delta_ts>2024-03-07 14:41:07 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2005782</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-01-17 23:51:11 -0800</bug_when>
    <thetext>As discovered in https://github.com/WebKit/WebKit/pull/22703#issuecomment-1890437523 &lt;input type=checkbox&gt; (and &lt;input type=checkbox switch&gt;) paint outside their box. Given it&apos;s only a couple points per pixel it&apos;s presumably shadows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005860</commentid>
    <comment_count>1</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2024-01-18 08:34:25 -0800</bug_when>
    <thetext>If it&apos;s the shadows this is not a bug.

If it&apos;s the control, then the implication is that these values are wrong:

```
static const int* checkboxMargins(NSControlSize controlSize)
{
    static const int margins[4][4] =
    {
        // top right bottom left
        { 2, 2, 2, 2 },
        { 2, 1, 2, 1 },
        { 0, 0, 1, 0 },
        { 2, 2, 2, 2 },
    };
    return margins[controlSize];
}
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2006112</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-01-19 04:57:32 -0800</bug_when>
    <thetext>It&apos;s only the shadows.

Is there a better way to test that? I guess we should rename the test at least to clarify shadows can leak here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007484</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-01-24 23:52:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/121579531&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019358</commentid>
    <comment_count>4</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-07 09:23:41 -0800</bug_when>
    <thetext>When I add masking for the thumb this goes away, so I suspect this was a real bug after all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019360</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-07 09:31:42 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/25582</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019372</commentid>
    <comment_count>6</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-03-07 10:30:39 -0800</bug_when>
    <thetext>Hmm, there&apos;s still some bleeding on the bots, but noticeably less with that patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019467</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-03-07 14:41:05 -0800</bug_when>
    <thetext>Committed 275808@main (5381f48e7a04): &lt;https://commits.webkit.org/275808@main&gt;

Reviewed commits have been landed. Closing PR #25582 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>