Closed Bug 1713961 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 29175 - Correct handling of [0px,1px) values of perspective and perspective().

Categories

(Core :: Web Painting, task, P4)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 29175 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/29175
Details from upstream follow.

b'L. David Baron <dbaron@chromium.org>' wrote:

Correct handling of [0px,1px) values of perspective and perspective().

This makes a number of fixes to handling small values of the perspective
CSS property and the perspective() transform function to match the
css-transforms-2 specification and the resolutions in
https://github.com/w3c/csswg-drafts/issues/413 :

  • Accept zero values of the perspective property at parse time. (They
    were already accepted for the perspective function.)

    Zero values are currently accepted by Gecko, but it treats them as
    the identity matrix (that is, as infinite perspective) rather than
    clamping to 1px.

  • Use -1.0 rather than 0.0 as the internal representation of
    perspective: none.

  • For both rendering and interpolation, treat values smaller than 1px
    as 1px.

    (This is what the spec says to do for rendering and what I believe it
    should say for interpolation; see
    https://github.com/w3c/csswg-drafts/issues/6320.)

  • TODO: Describe other effects (if any?) of cleanup of Blend function.

Parts of this are somewhat risky, since previously
transform: perspective(0) was treated as the identity matrix and
perspective: 0 was a syntax error, whereas this makes both be treated as
very substantial transform (perspective from 1px away). The risk for
handling of values in (0px, 1px) is probably less substantial since
those were already treated as extreme transforms, and this makes them
less extreme.

Fixed: 1205161
Change-Id: Ie11a3d27d32e6ce16c39d670f6423a6710ba0971
Reviewed-on: https://chromium-review.googlesource.com/2924023
WPT-Export-Revision: 67994d951bcd9798f2dd90dc311c898800d85526

Component: web-platform-tests → Web Painting
Product: Testing → Core

CI Results

Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 11 tests

Status Summary

Firefox

OK : 7
PASS: 2195
FAIL: 7

Chrome

OK : 7
PASS: 1919
FAIL: 102

Safari

OK : 7
PASS: 1276
FAIL: 382

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/web-animations/animation-model/animation-types/accumulation-per-property-001.html
font-variation-settings: ""wdth" 1, "wght" 1.1" onto ""wdth" 5": FAIL (Chrome: PASS, Safari: FAIL)
/web-animations/animation-model/animation-types/addition-per-property-001.html
font-variation-settings: ""wdth" 1, "wght" 1.1" onto ""wdth" 5": FAIL (Chrome: PASS, Safari: FAIL)
/web-animations/animation-model/animation-types/interpolation-per-property-002.html
transform: perspective: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-transforms/perspective-zero-2.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-transforms/perspective-zero-3.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-transforms/perspective-zero.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-transforms/transform3d-perspective-005.html: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53868a94072e
[wpt PR 29175] - Correct handling of [0px,1px) values of perspective and perspective()., a=testonly
https://hg.mozilla.org/integration/autoland/rev/4e0dd1858c76
[wpt PR 29175] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.