Closed Bug 1783832 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 35394 - [@property] Support viewport units in initial values

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[@property] Support viewport units in initial values

Providing a non-empty CSSToLengthConversionData object in
StyleBuilderConverter::ConvertRegisteredPropertyInitialValue ensures
that viewport units resolve correctly. The bigger problem is
invalidation:

Viewport units in initial values has the same problem as viewport-
dependent media queries: in Document::UpdateStyleAndLayoutTree, we
need to layout the parent frame before we can update the style
and layout tree of the current frame. Therefore this CL adds
StyleEngine::HasViewportDependentPropertyRegistrations and makes a
call to that function in ParentLayoutUpgrade::ShouldUpgrade.

Secondly, we need to recalc the style of any element with the
viewport-dependent initial values. This is in all likelihood almost
all elements, so to cover this we simply invalidate the initial data
and mark all elements for recalc (if appropriate) in StyleEngine::
InvalidateViewportUnitStylesIfNeeded.

Fixed: 1339221
Change-Id: I482add0fa5f6cbfccede16ea182bb8143b3bb12c
Reviewed-on: https://chromium-review.googlesource.com/3817528
WPT-Export-Revision: eddfe7b821b6036e8c108735eb96ac67628466cc

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 2 tests and 24 subtests

Status Summary

Firefox

OK : 2
FAIL: 25

Chrome

OK : 2
FAIL: 25

Safari

OK : 2
FAIL: 25

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-properties-values-api/at-property-viewport-units-dynamic.html [wpt.fyi]
    • @property: viewport units in initial value (dynamic): FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-properties-values-api/at-property-viewport-units.html [wpt.fyi]
    • 10vw is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10vh is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10vi is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10vb is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10vmin is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10vmax is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svw is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svh is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svi is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svb is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svmin is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10svmax is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvw is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvh is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvi is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvb is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvmin is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10lvmax is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvw is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvh is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvi is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvb is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvmin is 20px: FAIL (Chrome: FAIL, Safari: FAIL)
    • 10dvmax is 40px: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ab628bd479b [wpt PR 35394] - [@property] Support viewport units in initial values, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.