The length resolution context might be needed even when resolving an
integer value, since it might contain a sign() function with length
values inside. This fixes a WPT subtest.
The WPT tests require the shortest possible serialization that support
an 8 bits roundtrip.
As an example, `128` is serialized to `0.5` while `127` needs more
precision and thus will be serialized to `0.498`.
This commit fixes 33 WPT subtests in css/css-color.
PaintableWithLines created from inline nodes need to examine their
children to fully compute their size and offset as nested children
might have textnodes that are placed before their parent.
Fixes#1286
In the move to a python version of this script, I didn't notice that
running the bootstrap script in shell mode precluded it from actually
accepting the -disableMetrics argument.
Existing vcpkg installs can be un-metrics'd by re-running the bootstrap
script with the disable argument, or by adding a vcpkg.disable-metrics
file in $VCPKG_ROOT
Most computed border-radii contain their initial values, and since the
normalized initial border radii are always zero, there is no need to do
expensive floating point math to normalize them.
In all these cases there should be an ancestor available, but it
definitely cannot hurt to be a bit more defensive about this and prevent
nullptr dereferences.
The refactor in the previous commit was storing a reference to a stack
allocated `Infrastructure::Request::BodyType` which was then immediately
freed. To fix this, we can store the `Infrastructure::Request::BodyType`
in a variable beforehand, so it becomes safe to reference.
C++ will jovially select the implicit conversion operator, even if it's
complete bogus, such as for unknown-size types or non-destructible
types. Therefore, all such conversions (which incur a copy) must
(unfortunately) be explicit so that non-copyable types continue to work.
NOTE: We make an exception for trivially copyable types, since they
are, well, trivially copyable.
Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
This makes them trivially copyable/movable, silencing
> "parameter is copied for each invocation"
warnings on `Optional<T&>`, which are unnecessairy,
since `Optional<T&>` is just a trivially copyable pointer.
This creates a slight change in behaviour when moving out of an
`Optional<T&>`, since the moved-from optional no longer gets cleared.
Moved-from values should be considered to be in an undefined state,
and if clearing a moved-from `Optional<T&>` is desired, you should be
using `Optional<T&>::release_value()` instead.
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.