Commit Graph
5194 Commits
Author SHA1 Message Date
ldm0 99dca4d7e2 fix(workers): intercept async XHR with the native client controller 2026-11-20 22:48:02 +08:00
ldm0 e95cb69ef4 fix(xhr): intercept synchronous requests with the native client controller 2026-11-20 22:48:02 +08:00
ldm0 bc312d4773 fix(workers): route module imports through native client settings 2026-11-20 22:48:02 +08:00
ldm0 6651c5a2e0 fix(service-workers): inherit parent control in srcdoc documents 2026-11-20 22:48:02 +08:00
ldm0 afd22bb70b fix(dialog): execute built-in button commands
Run the native show-modal, close, and request-close steps after an
uncanceled command event. Preserve the invoker on dialog toggle events,
read the optional button value after command dispatch, and recheck the
open state after beforetoggle so a nested close keeps its result.
2026-11-20 22:48:02 +08:00
ldm0 5b055afc87 fix(workers): honor SharedWorker extended lifetime
Retain an opted-in worker after its last client leaves, including during
script loading. Use the browser-context resource executor to schedule the
same idle duration as ServiceWorker and expire it on the owner lane.
Reattachment updates the deadline, and stale timeouts cannot remove a
replacement or an attached worker.

Retain one renderer owner for the service lane while extended-lifetime
hosts exist, so script completions and timeouts continue to run even when
the browser context has no open page targets.
2026-11-20 22:48:02 +08:00
ldm0 6c14fc3562 fix(typed-om): expose computed vertical-align 2026-11-20 22:48:02 +08:00
ldm0 edc788e3af fix(typed-om): reify text-size-adjust percentages 2026-11-20 22:48:02 +08:00
ldm0 3e86f0e97e fix(typed-om): reify numeric column counts 2026-11-20 22:48:02 +08:00
ldm0 7b8cd599f4 fix(typed-om): reify built-in font palette keywords 2026-11-20 22:48:02 +08:00
ldm0 8f0fb02dac fix(typed-om): reify canonical font style keywords without losing angles 2026-11-20 22:48:02 +08:00
ldm0 c73a1d628a fix(typed-om): reify single scoped identifiers without splitting lists 2026-11-20 22:48:02 +08:00
ldm0 9837fb8e9c fix(typed-om): reify historical font alternates as keywords 2026-11-20 22:48:02 +08:00
ldm0 e43d62af43 fix(typed-om): expose native default keywords and computed identifiers
Reify empty native lists as their declared CSS keyword without requiring
their elements to implement Typed OM. Preserve opaque compound values and
correct scalar default keywords and computed single transition identifiers.

Pin the matching native implementation and cover parsing, inline and rule
writes, escaped identifiers, computed values and atomic type validation.
2026-11-20 22:48:02 +08:00
ldm0 9f3bf71265 fix(typed-om): preserve specified step easing keywords
Keep step-start and step-end in the native specified easing AST until
computation, while retaining their expanded CSSOM serialization. Read and
write the declaration-owned AST through Typed OM, including initial inline
and stylesheet parsing, rule wrapper synchronization and append().

Keep functional and mixed easing lists as property-associated opaque values.
Cover parsing, mutation, computation and native rule rebuilding in regression
tests. Update the exact Stylo revision to the matching native implementation.
2026-11-20 22:48:02 +08:00
ldm0 13de4c77c9 fix(dom): update main document readiness at live parser EOF
Apply the native interactive transition and dispatch readystatechange before
a script-created main parser returns from EOF. Preserve queued DCL and load
delivery and discard parser followups if a listener replaces the document.

Cover close ordering, repeated close, lifecycle admission, and stream
replacement from an interactive listener.
2026-11-20 22:48:02 +08:00
ldm0 0e7feb3400 fix(typed-om): validate shorthand writes using native typed values 2026-11-20 22:48:02 +08:00
ldm0 3b9429c4ea fix(cssom): retain background declaration ownership through cascade updates
Keep background shorthand winners and pending substitution nodes in the
native declaration owner. Restore surviving pending nodes in the owning
URL context when inline styles and live style rules enter the cascade.
Preserve importance, partial longhand overrides and style metadata cleanup.

Validate attribute, detached, live and nested rule paths against Chromium,
including mixed declarations, URL fallbacks, adoption and important all.
2026-11-20 22:48:02 +08:00
ldm0 eb2e56e1e7 fix(performance): coarsen shared timestamps before deriving relative times 2026-11-20 22:48:02 +08:00
ldm0 6cc0c2d008 fix(cssom): preserve importance when parsing native declaration lists 2026-11-20 22:48:02 +08:00
ldm0 ba8bc0835a fix(cssom): share native prefixed mask composite declarations
Preserve extended operators and their input grammar across CSSOM writes,
stylesheet snapshots and deferred substitution. Dispatch each operator to
the paint backend and reject legacy values in the standard grammar.
2026-11-20 22:48:02 +08:00
ldm0 53615e4847 fix(cssom): use public names for native mask position declarations
Project mask position axis names consistently across declaration metadata,
CSSOM enumeration, mutation and serialization. Canonicalize the position
shorthand alias while retaining native pending nodes and Typed OM units.
2026-11-20 22:48:02 +08:00
ldm0 99131a2abf fix(cssom): retain pending declaration nodes in mixed styles
Copy native declaration nodes and importance when serializing native runs
alongside compatibility entries. CSSOM empty pending-substitution values
cannot reconstruct those declarations through a second parse.

Distinguish native empty values from renderer placeholders in serialization
and inline queries. Remove custom properties directly from the owning
native block so unrelated pending declarations survive the mutation.
Compatibility writes retain unrelated native nodes, and rule reads recognize
native pending values while retaining existing ordinary compatibility routes.
2026-11-20 22:48:02 +08:00
ldm0 82d0c024a4 fix(cssom): preserve empty shorthand reads and independent importance
Honor native empty serializations for incomplete or incompatible shorthand
longhands rather than rebuilding them through the legacy adapter. Keep
supplemental values on their owning query path and validate overflow and
text-decoration completeness before serialization.

Read importance from the declaration flags even when mixed CSS-wide values
cannot be represented by a shorthand. Exercise each longhand through inline,
attribute, cssText, detached-document, and CSS rule declarations.
2026-11-20 22:48:02 +08:00
ldm0 66c5f5d9db fix(cssom): use native metadata for shorthand declaration reads
Read native shorthand values and priorities from the declaration block,
including CSS-wide keywords and pending substitutions. Validate enabled
logical border properties through the same grammar as physical borders.

Keep a supplemental longhand override from supplying an entire shorthand.
Cover 3,150 checks across 42 property groups and multiple declaration sources.
2026-11-20 22:48:02 +08:00
ldm0 7b5b926156 fix(cssom): expose parsed container conditions as frozen snapshots
Serialize each condition through Stylo for both live and detached rules.
Return fresh dictionaries in the getter realm without invoking authored
prototype hooks. Return empty legacy name/query values for multiple conditions.

Cover escaped identifiers, nested queries, cross-realm getters, detached
rules and frames, receiver validation, and snapshot independence.
2026-11-20 22:48:02 +08:00
ldm0 660ba4b470 fix(css): form attr unit values from a complete number token
Exclude surrounding CSS whitespace and comments before adding an attr unit.
Use the same tokenizer-based parser for dependency fallback validation and
value substitution, preserving numeric spelling and integer token flags.

Add 143 checks covering units, exponents, comments, malformed tokens, cycles,
attribute mutations, pseudo-elements and container queries. The published
comparison parent fails 31 checks in the identical supplemental probe.
2026-11-20 22:48:02 +08:00
ldm0 1a76686049 fix(css): invalidate container queries after referenced attributes change
Track attr dependencies through fallback, boolean and dynamic-name query
expressions. Invalidate the affected element subtree using retained document
and shadow cascade data. Match HTML attribute-name case and namespaces
consistently and retain attribute dependencies for later mutations.
Cover named queries, missing attributes, pseudo-elements, shadow/adopted
styles and attribute lookup with 83 native regression assertions.
2026-11-20 22:48:02 +08:00
ldm0 97eff50289 fix(css): substitute attr arguments before parsing name and type
Pin Stylo with computed-time attr argument parsing, separate first-argument
and fallback boundaries, and dependency traversal for dynamic attribute names.
Follow used untyped fallbacks and require a complete number token stream.
Cover substitution, cycles, mutation, pseudo-elements, inheritance and URL
taint with 99 native regression assertions.
2026-11-20 22:48:02 +08:00
ldm0 d637510cd6 fix(css): resolve nested typed attr substitution fallbacks
Prepare typed attribute references inside nested attr(), var(), and env()
fallbacks. Validate typed primary values before selecting fallback cycle
edges so type failures cannot hide custom-property cycles.

Pin the Stylo fix and cover nested fallbacks, units, mutations, pseudo
elements, unused cycles, and existing URL-taint behavior.
2026-11-20 22:48:02 +08:00
ldm0 0930fca43e fix(css): invalidate computed attr values after attribute mutations
Consult the attribute references recorded by Stylo for primary and pseudo
styles before selector-only invalidation can discard an attribute mutation.
Retain a lazy subtree root for affected originating elements so inherited
computed values update without scanning unrelated elements.

Cover typed/raw values, fallback dependencies, inheritance, registered
properties, eager and lazy pseudos, and unrelated computed style reuse.
2026-11-20 22:48:02 +08:00
ldm0 7a9fd5e62c fix(css): reject URL syntax components in typed attr values
Pin the isolated Stylo fix that rejects explicit URL syntax components
in attr type(), retaining image values, downstream taint and fallbacks.
Add native coverage for alternatives, lists, escaped and quoted syntax.
2026-11-20 22:48:02 +08:00
ldm0 9333b1252b fix(css): decode stylesheet bytes with CSS encoding rules
Select BOM, HTTP charset, exact leading @charset, and environment fallback
for external sheets. Carry the actual decoded encoding through imports,
including data URLs and child Documents. Preserve original physical bytes
for integrity checks, network observation and non-CSS consumers.
2026-11-20 22:48:02 +08:00
ldm0 73e71f250e fix(scripts): release stylesheet blockers after link events
Keep parser-blocking stylesheet clients pending through their load/error event dispatch, then publish a parser continuation only for the matching current Document and load. Physical completion still installs CSSOM before the event, and shared fetches retain each link client until its own event finishes.

Resume document.open()/setDocumentContent parser work after the event when the phase-one continuation driver has retired, with the same exact-Document guard.

Validate shared success/error completions and synchronous inline scripts in event handlers. Update the previous native tests that expected parser release before link events to check the full event-before-release sequence.
2026-11-20 22:48:02 +08:00
ldm0 3ce4bd9b35 fix(modules): bind import.meta resolution to Window settings
Resolve through the module realm import map using its captured Window
settings. Retain shared map and resolved-module state across document.open,
and preserve old Window maps for extracted resolvers after navigation.

Register dynamic child import maps through their preparation Document with
CSP and Trusted Types checks. Preserve one-shot preparation and current
Document authority for asynchronous work.

Cover parent/child isolation, scopes, null entries, late maps, coercion,
retained functions, document.open, CSP and retired Document boundaries.
2026-11-20 22:48:02 +08:00
ldm0 1077b28940 fix(modules): capture child document import-map integrity at preparation
Apply the owning child Document import-map integrity to external module
roots before queuing parser or dynamic script work. Preserve explicit
attribute precedence and capture metadata before later map updates.

Cover real iframe loads with matching and mismatching hashes, parent/child
map isolation, explicit empty/space attributes and late import maps. Guard
the pre-realm lookup against retired Document owners.
2026-11-20 22:48:01 +08:00
ldm0 3143575b7b fix(fetch): preserve resource integrity attribute whitespace
Carry script and stylesheet integrity strings verbatim into requests so
Service Worker FetchEvent consumers observe the original attribute value.
Keep SRI token parsing and validation separate from request metadata.

Cover parser capture and stylesheet physical-fetch identity, retaining the
existing absent/empty stylesheet request sharing behavior.
2026-11-20 22:48:01 +08:00
ldm0 d5cd0bd693 fix(service-workers): read navigation preload state before activation
Allow getState() to read an installing or waiting registration without an
active worker. Keep enable(), disable(), and setHeaderValue() validation
restricted to registrations with an active worker.

Cover the shared service lookup and real Window/ServiceWorker calls during
a held install event, including rejected mutations and subsequent activation.
2026-11-20 22:48:01 +08:00
ldm0 f3911e8830 fix(tests): wake Service Worker fixture admission promptly
Subscribe direct PageVm Service Worker fixtures to the existing owner wake
channel. Resume explicit completion admission when service work arrives
instead of waiting for the one-second Page-work fallback poll.

Keep all server accept deadlines, test assertions and overall budgets.
The former delay could close the fixture listener before the controlled
iframe connected, producing ECONNREFUSED and a later Page timeout.
2026-11-20 22:48:01 +08:00
ldm0 59e7bedb17 fix(fetch): preserve native Request URL provenance
Carry native-versus-converted URL provenance through RequestInfo
materialization. Request copies and Window/Worker fetch preserve an
intercepted internal URL without reapplying string credential rejection.

String and request-like inputs retain their existing resolution and
credential validation. Cover native upload copies and real intercepted
XHR/Cache requests forwarded through both fetch bindings.
2026-11-20 22:48:01 +08:00
ldm0 dfcca9149a fix(service-workers): preserve native FetchEvent request headers
Create intercepted Request objects directly from their native data with
immutable headers, retaining header entries, metadata, body and signal.
Avoid author constructors and RequestInit side effects during dispatch.

Preserve the guard in Request.clone(), and preserve privileged headers in
public Request copies when no RequestInit members were supplied.
Remove the superseded constructor-and-patch path.
2026-11-20 22:48:01 +08:00
ldm0 a5bbe962f0 fix(history): cancel pending navigations before same-document traversals
Retire an older cross-document load for every changing traversal participant,
including opaque Documents without Navigation API entries or events. Cancel
the physical load before abort callbacks can start a successor.

Cover top-level, child and popup Location/Navigation API requests, late
responses, opaque frames, and navigation started from an abort listener.
2026-11-20 22:48:01 +08:00
ldm0 f424016408 fix(service-workers): focus native Window clients before returning state
Activate the exact browser target through the existing browser focus and tab
selection workflow. Complete focusing on the target Document's user-interaction
task source, preserve local focus and selection, and sample native focus,
visibility and frame type after the operation.

Replace global cached-client focus mutation with the sampled result. Carry the
original worker run and Document ownership through one-shot cancellation-aware
replies so discarded output and replaced Documents cannot fake success.
2026-11-20 22:48:01 +08:00
ldm0 339dc4e38d fix(service-workers): deny container access for opaque Window origins
Check the Navigator's captured native Document origin before returning its
ServiceWorkerContainer, including the lazy cache path. Sandboxed HTTP pages
must throw SecurityError at the getter even though their URL has a tuple
origin. Keep WorkerNavigator exposure separate and preserve inherited origins.

Cover HTTP and srcdoc sandboxes, removing the sandbox attribute without a
navigation, author overrides, borrowed getters, and inherited blank windows.
2026-11-20 22:48:01 +08:00
ldm0 ddb2f6046e fix(service-workers): resolve registration lookups against native settings
Parse getRegistration client URLs against the receiver environment API base
URL, then validate against its native origin. Keep inherited about:blank
and srcdoc origins separate from URL resolution and cross-origin base tags.

Use captured worker origin instead of deriving authority from the worker
script URL. Cover dynamic base changes, borrowed methods, inherited iframe
and popup settings, srcdoc, and a blob worker with a replaced public origin.
2026-11-20 22:48:01 +08:00
ldm0 03616131d4 fix(service-workers): capture native Window state for message sources
Build message source snapshots with native focus, visibility and frame type
from the sending Window, sharing the sampler with Clients.get/MatchAll.
Preserve inherited origins instead of deriving them from about:blank URLs.

Require native Window state at the message boundary and retain it across
worker startup without rewriting registry state or older Client wrappers.
Cover nested focus, background visibility, auxiliary Windows, inherited
origins and serialization getters with a real Page/worker regression test.
2026-11-20 22:48:01 +08:00
ldm0 8b3a7405c1 fix(service-workers): sample live Window state for client queries
Queue each Window contribution on its exact Document user-interaction task
source, then finish on the original service worker run. Drop discarded
Document contributions and reject replies from stale runs.

Sample native focus, visibility and opener-derived frame type, and order
results by retained focus history while keeping older Client wrappers
immutable. Cover nested focus, background state, closed routes and startup
queries with native tests.
2026-11-20 22:48:01 +08:00
ldm0 87c12b1359 fix(focus): check the native document ancestor chain
Compute Document.hasFocus from the branded receiver, current document owners, page activity, and every ancestor’s focused area. Retained child focus must not report true when an outer ancestor selected another target.

Avoid observable property reads from defaultView, frameElement, and activeElement while computing native focus. Cover nested focus, document retirement, page deactivation, receiver branding, and author property overrides.
2026-11-20 22:48:01 +08:00
ldm0 28b67d08fa fix(service-workers): allow Clients queries during startup
Let an associated worker query its registration during evaluation, installation, and pending unregistration. Deliver same-run query replies to its published Starting host while keeping default MatchAll restricted to the exact active controller version.

Cover lifecycle transitions, waiting-worker isolation, mismatched registrations, and real worker startup promises with stale-run replies.
2026-11-20 22:48:01 +08:00
ldm0 21bf7d2ad4 fix(service-workers): match scopes before selecting controllers
Match serialized scope URL prefixes, including partial path segments and query
strings, rather than requiring directory boundaries.

Select the longest matching registration before considering whether it has an
active worker. Installing and waiting registrations must prevent a shorter
scope from claiming or controlling their clients.

Cover literal prefixes, query scopes, origin boundaries, inactive longer
registrations, and claims after a longer registration is removed.
2026-11-20 22:48:01 +08:00