Cleanup in intrinsic sizing keywords in property_database.js
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(3 files, 2 external files)
When adding new sizing keywords in bug 1909773, I noticed property_database.js has some cleanup to do:
- stale comments about sizing keywords computing to the initial value in certain cases, which they no longer do
- intrinsic sizing keywords being listed in differing orders (particularly the prefixed aliases)
Filing this bug to address both of those, so that bug 1909773 can make consistent keyword-insertions into now-more-similar other_values lists, for the various properties.
| Assignee | ||
Comment 1•2 years ago
•
|
||
The stale comments I'm looking at in particular are:
"max-width": {
...
other_values: [
...
// these four keywords compute to the initial value only when the
// writing mode is vertical, and we're testing with a horizontal
// writing mode
"max-content",
This one was added in bug 1122253, but became no-longer-accurate as of Bug 1496558.
"block-size": {
...
other_values: [
...
// These keywords are treated as initial value.
"max-content",
This comment used to be correct, but it became incorrect as of bug 1322780 (which is actually the bug that added the comment). :) At least: at that point, we started parsing -moz-max-content and properly reporting it (or rather its unprefixed form max-content) in the computed value for the corresponding width or height property (whichever corresponded to block-size). (testing with a node with display:none to actually get the value from style rather than the used value.)
| Assignee | ||
Comment 2•2 years ago
|
||
Just for reference, I'll attach the testcases I wrote locally, to be sure that behavior had in fact changed here.
(They're not the best testcases in the world; they just show various computed values from getComputedStyle, and they show different behavior in builds from before/after the fixes landed for the bugs that I reference in the previous comment, confirming that behavior has indeed changed.)
| Assignee | ||
Comment 3•2 years ago
|
||
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
It was just commented out because it behaves like the initial value in some
cases; but that seems to only have been needed to handle a special case in
test_value_computation.html, which has its own mechanism to work around this.
The workaround in test_value_computation.html was missing "inline-size", so
this patch adds that (otherwise we'd get a new test-failure).
While we're here, I'm also deduplicating the arrays in that test that are
associated with "height" and "block-size" -- those two properties are using the
same list there, so let's just make that more explicit.
Comment 9•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/043786c48c9e
https://hg.mozilla.org/mozilla-central/rev/b0dc0b40b6c4
Description
•