Bug 209054

Summary: Remove AffectedByDrag style flag
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, cdumez, cmarcelo, commit-queue, darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kangil.han, kondapallykalyan, macpherson, menard, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
simon.fraser: review+
patch none

Description Antti Koivisto 2020-03-13 08:48:59 PDT
Remove the last remaining user action related AffectedBy flag.
Comment 1 Antti Koivisto 2020-03-13 09:33:53 PDT
Created attachment 393490 [details]
patch
Comment 2 Simon Fraser (smfr) 2020-03-13 10:25:05 PDT
Comment on attachment 393490 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393490&action=review

Dragging is under tested, so some manual testing of this is warranted.

> Source/WebCore/dom/Element.h:318
> +    bool isDragged() const { return isUserActionElement() && isUserActionElementDragged(); }

isDragged is weird. isBeingDragged?

> Source/WebCore/dom/Element.h:324
> +    void setDragged(bool);

setIsBeingDragged?

> Source/WebCore/dom/Node.h:612
> +        ChildrenAffectedByForwardPositionalRules = 1 << 1,
> +        DescendantsAffectedByForwardPositionalRules = 1 << 2,
> +        ChildrenAffectedByBackwardPositionalRules = 1 << 3,
> +        DescendantsAffectedByBackwardPositionalRules = 1 << 4,
> +        ChildrenAffectedByPropertyBasedBackwardPositionalRules = 1 << 5,

I would align the = but that's just me.
Comment 3 Antti Koivisto 2020-03-13 10:46:33 PDT
Created attachment 393504 [details]
patch
Comment 4 WebKit Commit Bot 2020-03-13 11:56:00 PDT
Comment on attachment 393504 [details]
patch

Clearing flags on attachment: 393504

Committed r258416: <https://trac.webkit.org/changeset/258416>
Comment 5 WebKit Commit Bot 2020-03-13 11:56:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-03-13 11:56:22 PDT
<rdar://problem/60427264>
Comment 7 Darin Adler 2020-03-15 17:47:05 PDT
Comment on attachment 393490 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393490&action=review

> Source/WebCore/dom/UserActionElementSet.h:58
>      enum class Flag {

: uint8_t maybe?

> Source/WebCore/dom/UserActionElementSet.h:63
> +        IsActive        = 1 << 0,
> +        InActiveChain   = 1 << 1,
> +        IsHovered       = 1 << 2,
> +        IsFocused       = 1 << 3,
> +        IsDragged       = 1 << 4,

I’m like the opposite of Simon. I would not have lined these up, and it’s just me saying that ;)
Comment 8 Antti Koivisto 2020-03-15 23:44:18 PDT
I'm totally in line-up camp, I just forgot to do it with this enum in the original patch!
Comment 9 Antti Koivisto 2020-03-15 23:46:12 PDT
I wish this was a language feature.
Comment 10 Simon Fraser (smfr) 2020-03-16 09:44:04 PDT
(In reply to Antti Koivisto from comment #9)
> I wish this was a language feature.

We should just clang-format everything!
Comment 11 Antti Koivisto 2020-03-16 10:01:40 PDT
Hand-indenting these is not that hard either.

I meant a C++ feature to generate bit enums without the silly 1 << n dance.