The spec intends to pass through a URL record object as it needs to
be serialized on removal. This has no functional impact on our
implementation other than the double parsing of every URL being
revoked.
It is also missing an error check for an invalid URL being passed
through. This does not impact our implementation currently as we
just end up using an empty URL which is not part of the blob entry
map. This will cause problems once DOMURL::parse is updated to
return an Optional<URL::URL> however.
This is used to put together the list of supported WebGL extensions
based on the available extensions, per-extension required extensions
and WebGL version.
Namely:
- Perform case-insensitive matching
- Return the same extension objects every time
- Only enable the extension if it's supported by the current context
This causes it to enforce the sections "Differences Between WebGL and
OpenGL ES 2.0" from the WebGL 1 specification and "Differences Between
WebGL and OpenGL ES 3.0" from the WebGL 2 specification. It also
disables a bunch of extensions by default, which we must now request
with glRequestExtensionANGLE.
This is required to return original references to the shaders attached
to a program from getAttachedShaders. This is required for Figma (and
likely all other Emscripten compiled applications that use WebGL) to
get it's own generated shader IDs from the shaders returned from
getAttachedShaders.
Use invalidation sets for presentational hint attribute invalidation
instead of falling back to full descendants and siblings invalidation.
The only difference for presentational hint attributes is that we always
have to invalidate the style of element itself.
When we serialize blob URL entries we do not serialize the entire
environment settings object and only use it's origin. To allow
a Blob URL entry to access its relevant storage key, add a getter
that simply takes an origin.
Instead of just putting in members directly, wrap them up in structs
which represent what a URL blob entry is meant to hold per the spec.
This makes more obvious what this is meant to represent, such as the
ByteBuffer being used to represent the bytes behind a Blob.
This also allows us to use a stronger type for a function that needs
to return a Blob URL entry's object.
Specifically, after implementing some recent spec changes to navigables,
we end up calling `get_public_suffix("localhost")` here, which returns
OptionalNone. This would previously crash.
Our get_public_suffix() seems a little incorrect. From the spec:
> If no rules match, the prevailing rule is "*".
> https://github.com/publicsuffix/list/wiki/Format#algorithm
However, ours returns an empty Optional in that case. To avoid breaking
other users of it, this patch modifies Host's uses of it, rather than
the function itself.
Previously most of the calculations for `object-fit` and
`object-position` were based on device pixels, meaning that images would
render differently based on zoom and DPI settings. Instead those
calculations now use css pixels and only the final draw-call is based
on device-pixels.
When an element is displayed as table, an anonymous table wrapper box
needs to be created for it. Among others, the position property of the
table element is then applied to the anonymous table wrapper box
instead. If the table happens to be positioned absolutely, the table
wrapper box may become the containing block for absolutely positioned
elements inside the table.
In the original code however, anonymous layout nodes were excluded from
becoming the containing block for an absolutely positioned element.
Because of this, the containing block was calculated to be the first
suitable parent block of the table wrapper box.
This incorrect containing block would result in a crash later on when
trying to size the absolutely positioned element inside the table. To
prevent this crash, the anonymous table wrapper box is now allowed to
become the containing block for absolutely positioned elements inside
a table.
The definition of containing block for an absolutely positioned element
in the spec does not mention anything about skipping anonymous boxes.
Additionally the rules for absolute positioning of tables
(https://www.w3.org/TR/css-tables-3/#abspos-boxes-in-table-root) imply
that a table wrapper box is indeed able to be the containing block for
absolutely positioned elements.
The "with" statement is its own token (TokenType::With), and thus would
fail to parse as an identifier. We've already asserted that the token
we are parsing is "with" or "assert", so just consume it.
It is currently implemented as a member of CyclicModule. However, as the
spec indicates, this must be invokable with non-CyclicModule modules. In
several of the call sites, we are blindly casting to a CyclicModule;
this will fail for e.g. JSON modules.
Linking a module has assertions about the module's state, namely that
the state is not "new". The state remains "new" if loading the module
has failed. See: https://tc39.es/ecma262/#figure-module-graph-missing
In any case, this exception causes a loading failure, which results
in A's [[Status]] remaining new.
So we must propagate that failure, instead of blindly moving on to the
linking steps.