Bug 231741

Summary: Selection changes on modal <dialog> text nodes do not work with the mouse
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: CSSAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, kangil.han, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231962
Bug Depends on:    
Bug Blocks: 84635, 165279    
Attachments:
Description Flags
Patch
koivisto: review+
Patch none

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>