From e451f9efec8ba0cfb5549c04ee8e1160409e95b4 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Thu, 24 Feb 2022 12:12:17 -0800 Subject: [PATCH] [inert] Force 'user-modify: none' on inert nodes at used-value time 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 https://github.com/w3c/csswg-drafts/issues/6685#issuecomment-930305697 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 Commit-Queue: Oriol Brufau Cr-Commit-Position: refs/heads/main@{#974783} --- .../inert-and-contenteditable.tentative.html | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 inert/inert-and-contenteditable.tentative.html diff --git a/inert/inert-and-contenteditable.tentative.html b/inert/inert-and-contenteditable.tentative.html new file mode 100644 index 00000000000000..01091d1736e87b --- /dev/null +++ b/inert/inert-and-contenteditable.tentative.html @@ -0,0 +1,54 @@ + + +Inert and contenteditable + + + + + +
+ +
+ {

target

} +
+ +
+ {

target

} +
+ +
+ {

target

} +
+ +
+ {

target

} +
+ + + +