Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inert] Force 'user-modify: none' on inert nodes at used-value time #32967

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 24, 2022

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 <futhark@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/main@{#974783}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

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 <futhark@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/main@{#974783}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants