Bug 239514

Summary: Implement `auto` value as a computed value for `user-select` and stop making it inherited
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: CSSAssignee: Tim Nguyen (:ntim) <ntim>
Status: NEW ---    
Severity: Normal CC: changseok, emilio, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, joepeck, kondapallykalyan, macpherson, menard, pdr, philipj, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 208677    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch ews-feeder: commit-queue-

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>