[inert] Force 'user-modify: none' on inert nodes at used-value time #32967
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is done by adding a public ComputedStyle::UsedUserModify() that
returns EUserModify::kNone for inert, and privatizing the existing
ComputedStyle::UserModify() just for friend classes.
Code related to the style resolver, style adjuster, inheritance, etc.
continues using UserModify(), since inert should only change used styles
w3c/csswg-drafts#6685 (comment)
Forcing 'user-modify: none' wasn't explicitly resolved by the CSSWG, but
it solves the inconsistency of editing commands having different
behaviors when executed in a node which is both in inert and editable
subtrees, depending on whether the inert root is a descendant of the
editing root, or an inclusive ancestor.
Forcing 'user-modify: none' is also consistent with Firefox, though it
doesn't have much effect there, it doesn't avoid editability.
Bug: 692360
TEST=external/wpt/inert/inert-and-contenteditable.tentative.html
Change-Id: I4a34b9715272019b0b8daae0fd5ed3e25e38eddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3486876
Reviewed-by: Rune Lillesveen <[email protected]>
Commit-Queue: Oriol Brufau <[email protected]>
Cr-Commit-Position: refs/heads/main@{#974783}