Bug 229728

Summary: Add more inert checks for selection-related functionality
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, kangil.han, koivisto, kondapallykalyan, pdr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 84635, 165279    
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch none

Comment 1 Tim Nguyen (:ntim) 2021-09-01 05:26:37 PDT
Created attachment 437020 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2021-09-01 05:36:54 PDT
Created attachment 437021 [details]
Patch
Comment 3 Tim Nguyen (:ntim) 2021-09-01 05:48:51 PDT
Created attachment 437022 [details]
Patch
Comment 4 Tim Nguyen (:ntim) 2021-09-01 09:18:37 PDT
Created attachment 437036 [details]
Patch
Comment 5 Antti Koivisto 2021-09-02 07:59:03 PDT
Comment on attachment 437036 [details]
Patch

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

> Source/WebCore/dom/Position.cpp:945
>  bool Position::nodeIsUserSelectNone(Node* node)
>  {
> -    return node && node->renderer() && node->renderer()->style().userSelect() == UserSelect::None;
> +    if (!node)
> +        return false;
> +    if (node->isInert())
> +        return true;
> +    return node->renderer() && node->renderer()->style().userSelect() == UserSelect::None;
>  }

The name of the function no longer matches what it does ("nodeIsInertOrUserSelectNone"). How about renaming it to something more accurate?
Comment 6 Tim Nguyen (:ntim) 2021-09-02 08:56:12 PDT
Created attachment 437156 [details]
Patch
Comment 7 EWS 2021-09-02 09:39:55 PDT
Committed r281930 (241239@main): <https://commits.webkit.org/241239@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437156 [details].
Comment 8 Radar WebKit Bug Importer 2021-09-02 09:40:47 PDT
<rdar://problem/82679366>