Response headers get lower cased once, upfront. Any consumer of a transfer's /
response's headers is now `mem.eql` rather than `ascii.eqlIgnoreCase`. This
fixes 1 or 2 WPT cases (e.g. XHR's `getAllResponseHeaders`), it also mergers
values in some cases (which is generally correct) - we need a follow up PR
to correctly merge in all cases.
Preloaded modules would discard errors in the hope that re-fetching the script
when it was needed, might work. This reverses that decision and stores the
error state. When a preload fails, that failure sticks.
This does mean that a transient failure doesn't get a second chance.
But it also means we don't log the failure multiple times (I noticed this when
using adblocking and seeing duplicate failures for the same endpoint). Since we
don't keep trying, it cuts down the CDP flow too.
We previously supported the legacy constructors via new Image() and new Audio()
and https://github.com/lightpanda-io/browser/pull/3620 adds support for
new Option(). In most cases, that was good enough, but it wasn't quite up to
spec, e.g. new HTMLImageElement() still worked and HtMLImageElement showed up
in window.
This PR cleans it up by giving each one a distinct constructor for their legacy
function and NOT creating the default one bridge.constructor would otherwise
create.
Builds ontop of https://github.com/lightpanda-io/browser/pull/3604 to actually
use a Sanitizer across 6 apis (some of which we didn't have at all, and some
of which were incomplete). Namely setHtml and setHTMLUnsafe for Element,
ShadowRoot and Document.
In Runner, when we're `in_cdp` we reduce the HttpClient poll time to 10ms when
a v8 tells us it has a background task. This is to help ensure we don't linger
too long in HttpClient's poll when v8 has work.
But, 10ms can still be long, especially in a WPT test that's running thousands
of WASM compilation in serial. So rather than having a flat 10ms wait, Runner
will now wait 0-10ms, based on (a) whether the last pump had any tasks and (b)
the number of _ticks since there was task.
This is potentially a temporary solution to having v8 wake the HttpClient when
a task is ready.
A parser created via document.open() is only freed when done/close is called
(or some parse error happens). If close() isn't called, the parser is leaked.
This has the Frame track documents that call open so that, on Frame.deinit(),
it can free any parser still associated with the document.
This is the configuration-half of the Sanitizer API. In a follow up, we'll add
the missing element.setHtml and sanitizer option to the existing setHTMLUnsafe
(as well as the ShadowRoot and Document sanitizer-aware methods).