[wpt-sync] Sync PR 47640 - Update interpolation between calc-size() values to better preserve percentageness.
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox131 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(8 files)
Sync web-platform-tests PR 47640 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/47640
Details from upstream follow.
David Baron <dbaron@chromium.org> wrote:
Update interpolation between calc-size() values to better preserve percentageness.
This updates the code for interpolation of calc-size() values to match
recent spec changes that correspond to the latest discussions in
https://github.com/w3c/csswg-drafts/issues/10220 .The idea of these changes is that, before we interpolate values with
different basis, we do stronger canonicalization of the basis (rather
than just un-nesting a basis that is a nested calc-size()). This means
that all \<calc-sum> bases with percentages have their canonical basis be
100% and all other \<calc-sum> bases have their canonical basis be any.
This means that a canonical basis is either a sizing keyword, 100%, or
any.This stronger canonicalization code means we can remove a separate
substitution pass, since all of the necessary substitution was already
done during canonicalization.This change also removes some extra checks in
InterpolableLength::CanMergeValues() since
CSSMathExpressionOperation::CreateArithmeticOperationAndSimplifyCalcSize()
also has those checks, and CanMergeValues already needs to call it.The overall result of these changes should be:
better (but still imperfect) preservation of percentageness
a small set of cases that no longer interpolate (a calc-size() whose
basis is a sizing keyword with another whose basis is a \<calc-sum>
containing percentages)following the spec's rules on always canonicalizing before
interpolating rather than optimizing it away in some cases, given that
it is observable (see
wpt/css/css-values/calc-size/animation/calc-size-interpolation-expansion.html)Bug: 313072
Change-Id: Ie302c0440b5645afe2b458cdb672d544a836b946
Reviewed-on: https://chromium-review.googlesource.com/5792344
WPT-Export-Revision: efad45eacd19bc6d59f788cace5f086534b48e53
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 1•3 months ago
|
||
Assignee | ||
Comment 2•3 months ago
|
||
Assignee | ||
Comment 3•3 months ago
|
||
Assignee | ||
Comment 4•3 months ago
|
||
Assignee | ||
Comment 5•3 months ago
|
||
Assignee | ||
Comment 6•3 months ago
|
||
Assignee | ||
Comment 7•3 months ago
|
||
Assignee | ||
Comment 8•3 months ago
|
||
Assignee | ||
Comment 10•3 months ago
|
||
Assignee | ||
Comment 11•3 months ago
|
||
Comment 12•3 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5b5e2137d01b
https://hg.mozilla.org/mozilla-central/rev/fd5fa428acd5
Description
•