Bug 209054 - Remove AffectedByDrag style flag
Summary: Remove AffectedByDrag style flag
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-13 08:48 PDT by Antti Koivisto
Modified: 2020-03-16 10:01 PDT (History)
17 users (show)

See Also:


Attachments
patch (22.75 KB, patch)
2020-03-13 09:33 PDT, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff
patch (23.04 KB, patch)
2020-03-13 10:46 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.