[css] th's text-align:center should be set in UA origin instead of as a preshint
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | verified |
People
(Reporter: Oriol, Assigned: dshin, Mentored)
Details
(Keywords: good-first-bug, perf-alert, Whiteboard: [lang=rust], [wptsync upstream])
Attachments
(1 file)
From https://html.spec.whatwg.org/multipage/rendering.html#tables-2
User agents are expected to have a rule in their user agent style sheet that matches
th
elements that have a parent node whose computed value for the 'text-align' property is its initial value, whose declaration block consists of just a single declaration that sets the 'text-align' property to the value 'center'.
Then, load https://software.hixie.ch/utilities/js/live-dom-viewer/saved/10126
<!DOCTYPE html>
<table style="text-align: initial">
<th style="text-align: revert"></th>
</table>
<script>
var th = document.querySelector("th");
document.body.append(getComputedStyle(th).textAlign);
</script>
Actual: start
Expected: center
The parent has text-align
set to the initial value, so the th
should get text-align: center
in UA origin, so text-align: revert
should roll back to center
.
It seems that Firefox set's text-align: center
as a preshint (which is considered author origin for revert
) rather than in UA origin.
This bug causes 1 failure in http://wpt.live/css/css-cascade/all-prop-revert-noop.html
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
So for that we need to expose the -moz-center-or-inherit
value to UA sheets, replacing the #[css(skip)]
here by something like #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
. Then we need to just remove the TH_RULE
code and implement it in html.css
instead.
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:dholbert, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/caf3fd368a8e Migrate `<th>` `text-align` behaviour from presentation hint to UA CSS. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/33476 for changes under testing/web-platform/tests
Comment 7•2 years ago
|
||
Backed out for causing xpc failures in /test_css-properties-db.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/d5f7b6d474a989619b8fdf2a8332912b9a8e970e
INFO - TEST-START | devtools/shared/tests/xpcshell/test_css-properties-db.js
[task 2022-04-01T21:16:34.490Z] 21:16:34 WARNING - TEST-UNEXPECTED-FAIL | devtools/shared/tests/xpcshell/test_css-properties-db.js | xpcshell return code: 0
[task 2022-04-01T21:16:34.490Z] 21:16:34 INFO - TEST-INFO took 537ms
[task 2022-04-01T21:16:34.490Z] 21:16:34 INFO - >>>>>>>
[task 2022-04-01T21:16:34.492Z] 21:16:34 INFO - PID 8006 | [Parent 8006, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2945
[task 2022-04-01T21:16:34.492Z] 21:16:34 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
Upstream PR was closed without merging
Assignee | ||
Comment 9•2 years ago
|
||
Forgot to update css properties db. Will Fix.
Comment 10•2 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/24ac67f18277 Migrate `<th>` `text-align` behaviour from presentation hint to UA CSS. r=emilio
Comment 11•2 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•2 years ago
|
Comment hidden (obsolete) |
Comment 14•2 years ago
|
||
(In reply to Sandor Molnar from comment #7)
Backed out for causing xpc failures in /test_css-properties-db.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/d5f7b6d474a989619b8fdf2a8332912b9a8e970e
INFO - TEST-START | devtools/shared/tests/xpcshell/test_css-properties-db.js [task 2022-04-01T21:16:34.490Z] 21:16:34 WARNING - TEST-UNEXPECTED-FAIL | devtools/shared/tests/xpcshell/test_css-properties-db.js | xpcshell return code: 0 [task 2022-04-01T21:16:34.490Z] 21:16:34 INFO - TEST-INFO took 537ms [task 2022-04-01T21:16:34.490Z] 21:16:34 INFO - >>>>>>> [task 2022-04-01T21:16:34.492Z] 21:16:34 INFO - PID 8006 | [Parent 8006, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2945 [task 2022-04-01T21:16:34.492Z] 21:16:34 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
== Change summary for alert #33741 (as of Mon, 04 Apr 2022 23:18:42 GMT) ==
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
5% | welcome FirstVisualChange | macosx1015-64-shippable-qr | cold fission webrender | 1,290.00 -> 1,230.00 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=33741
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Probably wrong culprit? How did a backout of a change cause a progression, if the change itself didn't cause the regression?
Comment 16•2 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #15)
Probably wrong culprit? How did a backout of a change cause a progression, if the change itself didn't cause the regression?
Thank you for the reply Emilio. There does seem to be an earlier revision which may have caused the actual trend change. Retriggered the job for the previous revisions.
Comment 17•2 years ago
|
||
Reproducible on Firefox 98.0(20220304153049) on macOS. Verified as fixed on Firefox 100.0(20220428192727) and Nightly 101.0a1(20220501190841) on Win10 64-bits, macOS 11 and Ubuntu 20.04
Comment 18•2 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #15)
Probably wrong culprit? How did a backout of a change cause a progression, if the change itself didn't cause the regression?
Looks like the improvement was actually related to a different bug after all. Sorry for the confusion!
Description
•