Bug 229728 - Add more inert checks for selection-related functionality
Summary: Add more inert checks for selection-related functionality
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (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-08-31 12:32 PDT by Tim Nguyen (:ntim)
Modified: 2021-09-02 09:56 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.49 KB, patch)
2021-09-01 05:26 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (6.15 KB, patch)
2021-09-01 05:36 PDT, Tim Nguyen (:ntim)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (6.69 KB, patch)
2021-09-01 05:48 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (8.29 KB, patch)
2021-09-01 09:18 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (14.54 KB, patch)
2021-09-02 08:56 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.
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>