Lines like these were getting a warning to simplify the expanded
boolean expression from `!(a || b)` to `(a && b)`, but since the
`!(...)` is part of the macro, that is never going to happen.
Add a test that verifies selectors inside a shadow
root can only match their host element through :host pseudo-class.
Tests both simple selectors (#id, .class)
and complex selectors (:not, :where) to ensure they are blocked from
matching the host element directly.
Fixes issue #2319
Fixes an issue where selectors inside a shadow root could incorrectly
match their shadow host directly using selectors like #host,
instead of requiring :host pseudo-class selectors.
Fixes issue #2319
Fixes the crash in css/css-color/parsing/color-valid-hwb.html.
The crash was probably introduced in 248e4bb5, as it was the first
commit to VERIFY that the value given to `Color::with_opacity` were in
the correct range. As the values in color-valid-hwb.html were resolved
as NaN, the check never passed.
m_hover_label did not have checks if the mouse is in the same location.
This caused clickable URLs to be hidden.
Also shortened the label text to not be longer than half of the window.
Instead of writing ASAN and UBSAN output into the same stream we use for
test logging, direct them to log files, named asan.log.$PID and
ubsan.log.$PID, and then output them in a separate CI job that runs
afterwards. This should hopefully make it easier to see which tests are
failing.
The downside is that it's now harder to tell which tests the *SAN errors
are related to.
...in HTMLCanvasElement::to_data_url() and HTMLCanvasElement::to_blob().
This fixes the problem when surface is not allocated because context is
not initialized yet, even though canvas size is non-zero.
Fixes broken WebDriver screenshot endpoint.
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.