Bug 239514 - Implement `auto` value as a computed value for `user-select` and stop making it inherited
Summary: Implement `auto` value as a computed value for `user-select` and stop making ...
Status: NEW
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: 208677
  Show dependency treegraph
 
Reported: 2022-04-19 12:08 PDT by Tim Nguyen (:ntim)
Modified: 2022-04-27 16:27 PDT (History)
17 users (show)

See Also:


Attachments
Patch (22.04 KB, patch)
2022-04-21 02:51 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (22.03 KB, patch)
2022-04-21 02:53 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (22.04 KB, patch)
2022-04-21 03:43 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (22.83 KB, patch)
2022-04-21 06:43 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (30.28 KB, patch)
2022-04-22 02:56 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (30.32 KB, patch)
2022-04-22 03:38 PDT, Tim Nguyen (:ntim)
ews-feeder: commit-queue-
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) 2022-04-19 12:08:00 PDT
user-select: auto should compute to `user-select: auto` not `text`

`user-select` also isn't an inherited property, the `auto` should take care of the "inheritance".
Comment 1 Tim Nguyen (:ntim) 2022-04-19 12:32:01 PDT
Here's how user-select: auto is defined:

https://drafts.csswg.org/css-ui-4/#valdef-user-select-auto

The used value of auto is determined as follows:
* On the ::before and ::after pseudo-elements, the used value is none
* If the element is an editable element, the used value is contain
* Otherwise, if the used value of user-select on the parent of this element is all, the used value is all
* Otherwise, if the used value of user-select on the parent of this element is none, the used value is none
* Otherwise, the used value is text
> Note: This unusual combination of a non-inherited property with an initial value of auto whose used value depends on the parent element makes it possible to create what is effectively selective inheritance. This was initially proposed by Microsoft in IE to introduce a behavior similar to inheritance except that the contain value does not inherit.
Comment 2 Tim Nguyen (:ntim) 2022-04-21 02:51:27 PDT
Created attachment 458046 [details]
Patch
Comment 3 Tim Nguyen (:ntim) 2022-04-21 02:53:53 PDT
Created attachment 458047 [details]
Patch
Comment 4 Tim Nguyen (:ntim) 2022-04-21 03:43:58 PDT
Created attachment 458051 [details]
Patch
Comment 5 Tim Nguyen (:ntim) 2022-04-21 06:43:44 PDT
Created attachment 458057 [details]
Patch
Comment 6 Tim Nguyen (:ntim) 2022-04-22 02:56:46 PDT
Created attachment 458126 [details]
Patch
Comment 7 Tim Nguyen (:ntim) 2022-04-22 03:38:16 PDT
Created attachment 458133 [details]
Patch
Comment 8 Radar WebKit Bug Importer 2022-04-26 12:08:13 PDT
<rdar://problem/92350088>