Closed Bug 1438065 Opened 6 years ago Closed 6 years ago

[wpt-sync] PR 9509 - [css-layout-api] Implement the guts of the javascript layout runner.

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: mozilla.org, Unassigned)

Details

(Whiteboard: [wptsync downstream])

This implements the hooks from the LayoutCustom object into a web
developer defined layout class.

See: https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback

Currently the only useful thing this does to allow the web developer to
return an "auto" block-size, e.g.

registerLayout('foo', class {
  *intrinsicSizes() {}
  *layout() {
    return { autoBlockSize: Math.random() * 100; } // FUN!
  }
});

The engine calculates the inline-size, and adjusts the block-size for the
web developer. This is a simplification on the current API as spec'd but
we'll see what the HoudiniTF thinks of this approach.

The other large behaviour change is appropriate "fallback" handling when
something goes wrong. See "fallback" tests.

Bug: 726125
Change-Id: I08cd2e439f4321bd534a4e3f7222fbdb898e1785
Reviewed-on: https://chromium-review.googlesource.com/917423
WPT-Export-Revision: 914fbcb57a23d1c76994cd0bb7781c35e2da5103
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 3 tests
TIMEOUT: 3

These new tests don't PASS on all platforms
/css/css-layout-api/constructor-error-fallback.https.html: TIMEOUT
/css/css-layout-api/layout-error-fallback.https.html: TIMEOUT
/css/css-layout-api/layout-return-fallback.https.html: TIMEOUT
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/100c532c4e0e
[wpt PR 9509] - [css-layout-api] Implement the guts of the javascript layout runner., a=testonly
https://hg.mozilla.org/mozilla-central/rev/100c532c4e0e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.