Required for the PerformanceMark constructor, which doesn't allow any
mark names that have the same name as an attribute in the
PerformanceTiming interface in a Window context.
This change ensures that a reference to the BackgroundAction is held
until after the error callback has executed on the event loop.
This fixes an intermittent crash in Assistant :^)
This is a normative change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/50eb413
Note that this canonicalization already occurred. As the above commit
alludes to, we parse the rearguard format of the TZDB, so GMT is already
an alias to Etc/GMT. But it doesn't hurt to be explicit here.
This reworks checkboxes to use a tiny 16x16 SDF for the tick icon along
with an antialiased background/border.
The checkbox now works well at any scale, shows the various checkbox
state (enabled, disabled, being pressed), and supports using the colors
from the active system theme and/or the accent-color property.
This is mostly a simple grayscale bilinear scale, with an extra step
of computing the distance and alpha with a little smoothing. This
can be used to paint more scalable UI elements/icons from rather
small distance fields. A tiny 16x16 SDF seems to do a decent job
for simple icons.
This builds on the existing ad-hoc ResourceLoader code for HTTP fetches
which works for files as well.
This also includes a test that checks that stylesheets loaded with the
"file" URL scheme actually work.
CORS cross-origin responses in the No CORS request mode provide an
opaque filtered response, which is the original response with certain
attributes removed/changed.
The relevant effect it has is setting the body to `null`, which means
`body_bytes` has `Empty` in the process_response_consume_body callback.
This effectively disables cross-origin linked resources
(e.g. stylesheets).
However, the web actually depends on this, especially for stylesheets
retrieved from a cross-origin CDN. For example, Shopify websites
request stylesheets from `cdn.shopify.com` and Substack websites
request stylesheets from `substackcdn.com`.
This makes this a specification bug, as this code was written from it.
The workaround is to read the actual body from the unfiltered response
and then call `process_linked_resource` from there.
This _should_ be safe to do, as linked resource fetches do not include
credentials (i.e. cookies and the Authorization header), so it cannot
provide personalized responses.
We used to do the opposite, meaning that a huge images make the window
bigger than the screen. We now define a range for the window size and
scale the image if it doesn't fit un the current scope.
This fixes a bug where we would construct a ModelIndex with a pointer to
NonnullRefPtr<OutlineItem>, instead of a pointer to the underlying
OutlineItem, which caused a crash later on when we would try to
dereference that pointer.