Bug 231741 - Selection changes on modal <dialog> text nodes do not work with the mouse
Summary: Selection changes on modal <dialog> text nodes do not work with the mouse
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: dialog-element 165279
  Show dependency treegraph
 
Reported: 2021-10-14 07:38 PDT by Tim Nguyen (:ntim)
Modified: 2021-10-19 09:49 PDT (History)
12 users (show)

See Also:


Attachments
Patch (23.66 KB, patch)
2021-10-18 02:36 PDT, Tim Nguyen (:ntim)
koivisto: review+
Details | Formatted Diff | Diff
Patch (23.72 KB, patch)
2021-10-18 05:24 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2021-10-14 07:38:36 PDT
I suspect there's a bug with how text selection on inert is implemented.
Comment 1 Radar WebKit Bug Importer 2021-10-17 02:44:42 PDT
<rdar://problem/84342457>
Comment 2 Tim Nguyen (:ntim) 2021-10-18 02:36:01 PDT
Created attachment 441575 [details]
Patch
Comment 3 Antti Koivisto 2021-10-18 04:32:32 PDT
Comment on attachment 441575 [details]
Patch

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

> Source/WebCore/rendering/style/RenderStyle.h:613
> +    UserSelect effectiveUserSelect() const { return effectiveInert() ? UserSelect::None : userSelect(); }

It is confusing since "effectiveUserSelect" sounds like a property but this is just a helper.

Perhaps

bool allowsSelections() const;

or similar. It would also be good to start moving helpers out of RenderStyle

inline bool allowsSelections(const RenderStyle&)

would be another option.
Comment 4 Antti Koivisto 2021-10-18 05:03:12 PDT
Comment on attachment 441575 [details]
Patch

r=me but please find a better name
Comment 5 Tim Nguyen (:ntim) 2021-10-18 05:24:40 PDT
Created attachment 441591 [details]
Patch
Comment 6 Tim Nguyen (:ntim) 2021-10-18 05:26:51 PDT
Committed r284366 (243151@main): <https://commits.webkit.org/243151@main>