WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
213086
DragState::type should be Optional<DragSourceAction> instead of OptionSet<DragSourceAction>
https://bugs.webkit.org/show_bug.cgi?id=213086
Summary
DragState::type should be Optional<DragSourceAction> instead of OptionSet<Dra...
David Kilzer (:ddkilzer)
Reported
2020-06-11 11:20:50 PDT
Per Darin's feedback in
Bug 212885 Comment #12
, DragState::type should be Optional<DragSourceAction> instead of OptionSet<DragSourceAction>. ''' Refactoring this to be explicitly "OptionSet" 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 "selection". Seems really messy. I suppose you aren’t making it worse, but all this "hasExactlyOneBitSet" stuff is just what happens when we make the data structure too confusing. Clearly the "selection" is an independent flag, and need not be included in an option set. '''
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2020-06-11 11:37:02 PDT
Note that when DragState::type is changed from OptionSet<> to Optional<>, then WTF::Optional<>::hasExactlyOneBitSet() and WTF::Optional<>::toSingleValue() may also be removed. The need for both of these methods are also indicative of the need to change DragState::type to Optional<>.
Ahmad Saleem
Comment 2
2024-03-01 17:22:17 PST
Still have this -
https://searchfox.org/wubkat/rev/c7ee831c38599255e3ae78a2b28b71968615107f/Source/WebCore/page/DragState.h#38
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug