<?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>213086</bug_id>
          
          <creation_ts>2020-06-11 11:20:50 -0700</creation_ts>
          <short_desc>DragState::type should be Optional&lt;DragSourceAction&gt; instead of OptionSet&lt;DragSourceAction&gt;</short_desc>
          <delta_ts>2024-03-01 17:22:17 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>212885</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>darin</cc>
    
    <cc>thorton</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1661659</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2020-06-11 11:20:50 -0700</bug_when>
    <thetext>Per Darin&apos;s feedback in Bug 212885 Comment #12, DragState::type should be Optional&lt;DragSourceAction&gt; instead of OptionSet&lt;DragSourceAction&gt;.

&apos;&apos;&apos;
Refactoring this to be explicitly &quot;OptionSet&quot; when before it was not explicit is making the confusion worse, so I think we need to straighten this out first.

I guess there is some code can set the type to more than one thing. But this seems disorganized and messy. I think it’s not really a general set. It’s just one type plus possibly &quot;selection&quot;. Seems really messy. I suppose you aren’t making it worse, but all this &quot;hasExactlyOneBitSet&quot; stuff is just what happens when we make the data structure too confusing. Clearly the &quot;selection&quot; is an independent flag, and need not be included in an option set.
&apos;&apos;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1661671</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2020-06-11 11:37:02 -0700</bug_when>
    <thetext>Note that when DragState::type is changed from OptionSet&lt;&gt; to Optional&lt;&gt;, then WTF::Optional&lt;&gt;::hasExactlyOneBitSet() and WTF::Optional&lt;&gt;::toSingleValue() may also be removed.

The need for both of these methods are also indicative of the need to change DragState::type to Optional&lt;&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018152</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-03-01 17:22:17 -0800</bug_when>
    <thetext>Still have this - https://searchfox.org/wubkat/rev/c7ee831c38599255e3ae78a2b28b71968615107f/Source/WebCore/page/DragState.h#38</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>