[wpt-sync] Sync PR 65106 - [css-modules] Expose and apply shared stylesheets
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65106 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65106
Details from upstream follow.
Kurt Catti-Schmidt <kschmi@microsoft.com> wrote:
[css-modules] Expose and apply shared stylesheets
This change adds CSSStyleSheets to module import \<link rel=stylesheet>
tags. No behavior changes to legacy href stylesheets.Adds WPT tentative tests validating import-map-resolved specifiers,
modulepreload warm-cache sharing, and network fetch/redirect/failure
module-map behavior.The module-stylesheet-fetch-helpers.js helper file was renamed
module-stylesheet-helpers.js, as it is now doing more than just fetch
helpers.Change-Id: I39b2ae1a7af6e9e86e5b9f19ee970a54457865b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8384819
Commit-Queue: Kurt Catti-Schmidt \<kschmi@microsoft.com>
Reviewed-by: Dan Clark \<daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1743081}
| Assignee | ||
Comment 1•10 days ago
|
||
PR 65106 applied with additional changes from upstream: b8bd0bc4fca63d7846a5994baa7461789d789a28
| Assignee | ||
Updated•10 days ago
|
| Assignee | ||
Comment 2•10 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=123169
| Assignee | ||
Comment 3•10 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 20 tests and 2 subtests
Status Summary
Firefox
OK : 1
FAIL : 4
TIMEOUT: 38
NOTRUN : 46
Chrome
OK : 1
PASS : 3
FAIL : 1
TIMEOUT: 38
NOTRUN : 46
Safari
OK : 1
FAIL : 3
TIMEOUT: 38
NOTRUN : 47
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-basic.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- A module stylesheet link resolves, connects, and applies styles.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - A module stylesheet link is exposed via styleSheets, not adoptedStyleSheets.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - The import attribute takes precedence over href.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Module links expose pending, completed, and cached CSS module fetches.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- A module stylesheet link resolves, connects, and applies styles.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-cache-lifetime.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- A module link retries a failed fetch after the server recovers.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - A connected clone shares the original module link's sheet.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- A module link retries a failed fetch after the server recovers.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-classic-sharing.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Module links expose one shared CSSOM object; classic links do not.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - replaceSync recalculates styles for shared module links and adopted sheets.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - insertRule recalculates styles for shared module links and adopted sheets.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - declaration recalculates styles for shared module links and adopted sheets.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Module links expose one shared CSSOM object; classic links do not.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-classification.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- A module stylesheet link with type=null uses import.:
FAIL(Chrome:PASS, Safari:FAIL) - A module stylesheet link with type="" uses import.:
FAIL(Chrome:PASS, Safari:TIMEOUT) - A module stylesheet link with type="text/css" uses import.:
FAIL(Chrome:PASS, Safari:NOTRUN) - A module stylesheet link with type="text/plain" uses import.:
TIMEOUT(Chrome:TIMEOUT, Safari:NOTRUN) - Removing import before insertion selects classic fetching.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Restoring import before insertion selects module fetching.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Changing to preload before insertion selects the appropriate fetching mode.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Restoring stylesheet before insertion selects the appropriate fetching mode.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A nonempty import attribute takes precedence over a valid href.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- A module stylesheet link with type=null uses import.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-constructed.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Module sheets are ownerless; classic sheets are link-owned.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - @import is ignored (dropped, not fetched) in CSS module sheets.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Module sheets are ownerless; classic sheets are link-owned.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-document-context.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- A module link in a document without a window fires an asynchronous error.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - A module link inserted after iframe detachment can be reprocessed without crashing.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A module link pending during iframe detachment can be reprocessed without crashing.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- A module link in a document without a window fires an asynchronous error.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-encoding.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- UTF-8 CSS module versus classic response charset, BOM false:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - UTF-8 CSS module versus classic response charset, BOM true:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- UTF-8 CSS module versus classic response charset, BOM false:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-failure-events.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Resolution failure for "" fires asynchronously.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Removing a link cancels its queued failure for "".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Changing import cancels the queued failure for "".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Resolution failure for "unmapped-specifier" fires asynchronously.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Removing a link cancels its queued failure for "unmapped-specifier".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Changing import cancels the queued failure for "unmapped-specifier".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Resolution failure for "https://[invalid]/" fires asynchronously.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Removing a link cancels its queued failure for "https://[invalid]/".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Changing import cancels the queued failure for "https://[invalid]/".:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Resolution failure for "" fires asynchronously.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-fetch.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Unresolvable module specifier fires error and connects no sheet.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Non-CSS MIME type fires error and connects no sheet.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A malformed absolute URL fires error and connects no sheet.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A CSS response with HTTP status 404 fires error.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A CSS response with HTTP status 503 fires error.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A revoked CSS blob URL fires error and connects no sheet.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A successful CSS module fetch fires load.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Unresolvable module specifier fires error and connects no sheet.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-implicit-scope.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Empty-prelude @scope in a module sheet is rooted at the shadow host.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Duplicate module links retain an implicit scope until the last reference is removed.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Empty-prelude @scope in a module sheet is rooted at the shadow host.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-import-map.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Import-map addresses keep the base URL used when the map was parsed.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Late import maps can satisfy previously-unresolved bare specifiers.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Import-map addresses keep the base URL used when the map was parsed.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-module-map-reuse.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- JavaScript loads a CSS module first: the other consumer reuses the module map.:
TIMEOUT(Chrome:TIMEOUT, Safari:FAIL) - link loads a CSS module first: the other consumer reuses the module map.:
NOTRUN(Chrome:NOTRUN, Safari:TIMEOUT) - A script-added import map resolves a module link and shares its module with JavaScript.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- JavaScript loads a CSS module first: the other consumer reuses the module map.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-modulepreload.html [wpt.fyi]
- modulepreload as=style, a module stylesheet link, and JavaScript import() share one CSSStyleSheet.:
FAIL(Chrome:FAIL, Safari:FAIL)
- modulepreload as=style, a module stylesheet link, and JavaScript import() share one CSSStyleSheet.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-network.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- A network CSS module connects after fetching and shares its identity.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - A failed network fetch fires error and connects no sheet.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - A redirected CSS module loads and resolves relative URLs from its response.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- A network CSS module connects after fetching and shares its identity.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-ordering.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- document.styleSheets preserves interleaved shared module and classic entries after moving and removing links.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - document.styleSheets orders shared module links around a classic sheet that finishes fetching first.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - shadowRoot.styleSheets preserves interleaved shared module and classic entries after moving and removing links.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - shadowRoot.styleSheets orders shared module links around a classic sheet that finishes fetching first.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- document.styleSheets preserves interleaved shared module and classic entries after moving and removing links.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-pending-import-removal.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Removing import while a connected module link's successful fetch is pending ignores its completion.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Removing import while a connected module link's failed fetch is pending ignores its completion.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Removing import while a connected module link's successful fetch is pending ignores its completion.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-reference-lifetime.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Async replace, declaration mutation, deleteRule, and disabled survive mixed reference removal.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)
- Async replace, declaration mutation, deleteRule, and disabled survive mixed reference removal.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-request-counts.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- link first, cached consumers share one request:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - link first, pending consumers share one request:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - import first, cached consumers share one request:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - import first, pending consumers share one request:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - Request counter negative control does not merge ordinary fetches:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- link first, cached consumers share one request:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-scopes.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Moving a module link transfers its stylesheet and mutation invalidation to the new tree scope.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Mixed duplicate adoptions and module links retain independent counted tree-scope references.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Moving a module link transfers its stylesheet and mutation invalidation to the new tree scope.:
- /html/semantics/document-metadata/the-link-element/tentative/module-stylesheet-shared-identity.html [wpt.fyi]:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT)- Distinct specifiers resolving to a data URL share sheet identity.:
TIMEOUT(Chrome:TIMEOUT, Safari:TIMEOUT) - Distinct specifiers resolving to a static CSS file share sheet identity.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- Distinct specifiers resolving to a data URL share sheet identity.:
Comment 5•8 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e24756008788
https://hg.mozilla.org/mozilla-central/rev/76db0ad93bd7
Description
•