`display: revert` may have partially broke between FF 105 and 106
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr102 | --- | unaffected |
| firefox107 | --- | wontfix |
| firefox108 | --- | wontfix |
| firefox109 | --- | wontfix |
| firefox110 | --- | fixed |
People
(Reporter: armen.michaeli, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Steps to reproduce:
- Open the following HTML document in Firefox 106 (Windows, x64):
<!DOCTYPE html>
<html>
<head>
<style>
summary {
display: revert;
}
</style>
</head>
<body>
<details>
<summary>Example</summary>
</details>
</body>
</html>
- Observe
summaryno longer has a list marker (a filled triangle) which it had in Firefox 105
Actual results:
display: revert causes computed value of the display property of the summary element to be block, which seems contrary to how revert is described where it should have the effect as if the property wasn't changed in current style origin -- meaning the user agent stylesheet value should be applied, which in case of with 106 is a certain resource://content-accessible/details.css file now (looking at it in Developer Tools):
summary,
slot[name=internal-main-summary]::slotted(summary) {
display: list-item;
counter-increment: list-item 0;
list-style: disclosure-closed inside;
}
In Firefox 105 which does not exhibit the issue, there is no details.css file, the corresponding default UA style is instead in resource://gre-resources/html.css:
details > summary:is(:first-of-type, :-moz-native-anonymous) {
display: list-item;
counter-increment: list-item 0;
list-style: disclosure-closed inside;
}
Anyway, the URL doesn't have to be the cause of this, but something somewhere else that's related to the changing of the URL somehow, broke the display: revert subtly, I think.
Expected results:
Old behaviour as per Firefox 105 at least, is correct -- display: revert should have the effect as if display was list-item because that value is the one computed from the previous layer which is UA default.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•3 years ago
|
||
Hmm, this is because now that the style is inside the shadow tree, "revert" doesn't revert to that as that's considered author origin, but to the user-agent stylesheet (which now no longer has display: list-item rules).
| Assignee | ||
Comment 3•3 years ago
|
||
| Assignee | ||
Comment 4•3 years ago
|
||
display: revert-layer works as you intend, fwiw.
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 5•3 years ago
|
||
This preserves the revert keyword behavior. This doesn't match the spec
to the letter, see https://github.com/whatwg/html/issues/8610, but I
think it's probably ok to keep behavior for now. Changing to match the
spec would avoid duplicating the details.css summary rule.
Comment 8•3 years ago
|
||
Set release status flags based on info from the regressing bug 1308080
Comment 9•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox109towontfix.
For more information, please visit auto_nag documentation.
| Assignee | ||
Updated•3 years ago
|
Description
•