<?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>263968</bug_id>
          
          <creation_ts>2023-10-31 07:57:14 -0700</creation_ts>
          <short_desc>Remove SwitchThumbElement and SwitchTrackElement</short_desc>
          <delta_ts>2024-01-25 01:09:31 -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>DOM</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>
          
          <blocked>259380</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Anne van Kesteren">annevk</assigned_to>
          <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1988836</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-10-31 07:57:14 -0700</bug_when>
    <thetext>Antti tells me internal element subclasses are an anti-pattern. And given how we have been slowly shifting the approach we might not need them after all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990515</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-11-07 06:58:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/118056124&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1993769</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-11-19 12:28:30 -0800</bug_when>
    <thetext>They aren&apos;t necessary if you&apos;re not using any of the resolveCustomStyle stuff.

See: https://searchfox.org/wubkat/rev/114aa2c8594807cbc34dd5dff48a9e2addfd1e00/Source/WebCore/html/ColorInputType.cpp#148,155 on how you can create a &lt;div&gt; with a PseudoId associated to it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998320</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-12-09 07:43:17 -0800</bug_when>
    <thetext>Note that I&apos;m not entirely sure it&apos;s possible to remove these. We probably need resolveCustomStyle() to set

    grid-area: 1/1;

conditionally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998325</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-12-09 08:31:13 -0800</bug_when>
    <thetext>(In reply to Anne van Kesteren from comment #3)
&gt; Note that I&apos;m not entirely sure it&apos;s possible to remove these. We probably
&gt; need resolveCustomStyle() to set
&gt; 
&gt;     grid-area: 1/1;
&gt; 
&gt; conditionally.

The problem here is that WebKit is using display: inline-grid for a form control in the first place. Changing the display value should not break the form control layout. (Fwiw, WebKit has a similar issue with date inputs and display: inline-flex)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998550</commentid>
    <comment_count>5</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-12-10 23:16:37 -0800</bug_when>
    <thetext>Could you elaborate on that? It&apos;s not clear to me how that works for appearance:auto. I can see someone being able to change the outer display value, but the inner display value has to be grid, no? Perhaps for appearance:auto that part has to be !important.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998868</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-12-11 19:52:32 -0800</bug_when>
    <thetext>(In reply to Anne van Kesteren from comment #5)
&gt; Could you elaborate on that? It&apos;s not clear to me how that works for
&gt; appearance:auto. I can see someone being able to change the outer display
&gt; value, but the inner display value has to be grid, no? Perhaps for
&gt; appearance:auto that part has to be !important.

This seems to be set on the web exposed element:

https://searchfox.org/wubkat/rev/3943142d2ef1777fc8977e6158eb10e053c3f8ca/Source/WebCore/css/htmlSwitchControl.css#27-30

We shouldn&apos;t be able to break the layout of the switch by setting a different display type on the input itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2004711</commentid>
    <comment_count>7</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-01-12 10:04:26 -0800</bug_when>
    <thetext>Given the approach taken in bug 267334 I&apos;ve become more convinced we can remove these elements. For a future appearance:base we could use StyleAppearance::BaseThumb or some such and some corresponding adjustBaseThumbStyle() method. Or reconcile it with SwitchThumb and branch on the host. Various options.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2006336</commentid>
    <comment_count>8</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-01-20 02:46:10 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/23013</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2006351</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-20 04:53:40 -0800</bug_when>
    <thetext>Committed 273262@main (75760f40e328): &lt;https://commits.webkit.org/273262@main&gt;

Reviewed commits have been landed. Closing PR #23013 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007492</commentid>
    <comment_count>10</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-01-25 01:09:31 -0800</bug_when>
    <thetext>Committed 272448.356@safari-7618-branch (2e9a891e4ccc): &lt;https://commits.webkit.org/272448.356@safari-7618-branch&gt;

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

    </bug>

</bugzilla>