OpenGL's origin is at the bottom-left corner, while Skia's origin is at
the top-left corner. This change adds a transformation to compensate for
this difference when rendering PaintingSurface attached to WebGL
context.
For now only macOS is supported.
IOSurface is used as a backing store because it will allow us to read
it from Skia and write to it from OpenGL without any extra copying:
- ANGLE_metal_texture_client_buffer extension is used to create
EGLSurface from IOSurface.
- Then the same IOSurface is wrapped into Metal texture and passed to
Skia allowing to share the same memory between Skia Metal backend and
ANGLE.
Previously, constructing a PaintingSurface from an IOSurface required
wrapping IOSurface into a Metal texture before passing it to the
PaintingSurface constructor. This process was cumbersome, as the caller
needed access to a MetalContext to perform the wrapping.
With this change SkiaBackendContext maintains a reference to the
MetalContext which makes it possible to do:
IOSurface -> MetalTexture -> SkSurface within a PaintingSurface
constructor.
Implement transfer logic for ArrayBuffer and ResizableArrayBuffer.
Change TransferDataHolder data type to Vector<u32> to reuse existing
serialization infrastructure.
Fix 5 WPT tests in `window-postmessage.window.html` that relates to
transport.
Fix `LibWeb/Text/input/Worker/Worker-postMessage-transfer.html`.
The latter is currently ignored due to flakiness, no rebaseline is
needed.
During serialization with transfer, initialize memory with known index
and initialize Serializer at position that dependent on the memory.
This is mandatory to make ArrayBuffer transport to work. It also happens
to fix 4 WPT tests, that are related to curcular references during
serialization.
Previously, it was assumed that nodes must share the same root, prior
to the calculation of their relative boundary point positions. This is
no longer the case, since `Selection.setBaseAndExtent()` now accepts
anchor and focus nodes that may be in different shadow trees.
We have to list the set of allowed values for the DOMTokenList to not
throw when asking if one is supported.
This fixes an issue where YouTube embeds would hang indefinitely trying
to report an endless series of exceptions, seen on https://null.com/
`AsyncBlockStart` was still doing a `DisposeResources` call as
specified in older drafts of the `explicit-resource-management`
proposal, but the latest draft no longer does this, and it is
causing crashes when combined with the `array-from-async` proposal.
The 'reason' was getting initialized to 'empty' state when not
provided through the constructor, which results in a crash when
accessed through throw_dom_exception_if_needed in the generated
IDL getter.
All global objects current need to be event targets so that they
can have events dispatched to them. This allows for removing of
verify_cast for these global objects.
The "copy" command is not in the Miscellaneous commands section. The
"defaultParagraphSeparator" command is, however. Let the accompanying
comment reflect that.
This makes these values the same as `start` and `end`. While this is not
entirely correct, it is better than centering which is what we did
previously.
This fixes misaligned images on https://nos.nl
The source code position cache was moved from a line based approach
to a "chunk"-based approach to improve performance on large, minified
JavaScript files with few lines, but this has had an adverse effect
on _multi-line_ source files.
Reintroduce some of the old behaviour by caching lines again, with
some added sanity limits to avoid caching empty/overly small lines.
Source code positions in files with few lines will still be cached
less often, since minified JavaScript files can be assumed to be
unusually large, and since stack traces for minified JavaScript
are less useful as well.
On WPT tests with large JavaScript dependencies like
`css/css-masking/animations/clip-interpolation.html` this reduces the
amount of time spent in `SourceCode::range_from_offsets` by as much as
99.98%, for the small small price of 80KB extra memory usage.
The rules for parsing integers don't specify an upper bound on the
value that can be returned, so the `parse_integer_digits` method can be
used to check whether the given arbitrarily-large StringView is valid
according to these rules. The `parse_integer` and
`parse_non_negative_integer` methods would fail for values larger than
2147483647 when they shouldn't have.
restore() corresponding to ApplyFilters should be called after stacking
context content is painted, not before.
Fixes regression introduced in c94b4316e7
ApplyOpacity internally calls canvas.saveLayer() which requires a
matching canvas.restore() to be called.
Fixes missing header on https://supabase.com/
Setting the `width` or `height` properties of `HTMLCanvasElement` to a
value greater than 2147483647 will now cause the property to be set to
its default value.
ApplyFilter internally calls canvas.saveLayer() which requires a
matching canvas.restore() to be called.
Fixes painting on https://supabase.com/ regressed by
8562b0e33b
This is part of a normative change to the HTML space for WebAssembly JS
module integration and the source phase import proposal, see:
https://github.com/whatwg/html/commit/10ed38ee7
Further changes are required, but this is a start :^)