You would have to just know that you need to define the constructor with
this declaration. Let's allow subclasses to define constructors as they
see fit.
This is causing errors on the WPT runner, which does not have a display
output. To do this requires shuffling around the Main::Arguments struct,
as we now need access to it from overridden WebView::Application methods
after construction.
As we now are only officially supporting the Ninja generator for
Windows, the old preset structure can now be simplified. Also, we
now follow the naming conventions of the non-hidden presets.
Now that headless mode is built into the main Ladybird executable, the
headless-browser's only purpose is to run tests. So let's move it to the
testing directory and rename it to test-web (a la test-js / test-wasm).
We currently create a separate headless-browser application to serve two
purposes:
1. Allow headless browsing to take a screenshot of a page or print its
layout tree / internal text.
2. Run the LibWeb test framework.
This patch migrates (1) to the main Ladybird executable. The --headless
flag enables this mode. This matches the behavior of other browsers, and
means we have one less executable to ship at distribution time.
We want to avoid creating too many AppKit / Qt facilities in headless
mode. So this involves some shuffling of application init to ensure we
don't create them until after we've parsed the command line arguments.
Namely, we avoid creating the NSApp in AppKit and QCoreApplication in
Qt. Doing so also requires that we don't create the application event
loop until we've parsed the command line as well, because the loop we
create depends on whether we're creating those UI facilities.
We currently create web views through the headless Application, so that
the Application can store the views for easy iteration/management. We
would like to move HeadlessWebView into LibWebView to make headlessness
a feature of the primary Ladybird binaries. In order to do so, we need
to remove this indirection, as we won't have this test-only Application
class in Ladybird.
I left this here originally thinking that black and ruff are compatible,
so either could be used as a local formatter. But it turns that while
code formatted with ruff will be unchanged by black, the reverse is not
always true. So let's just enforce using ruff.
With the Metal backend, glFlush flushes the command buffer, but doesn't
wait for the commands to be scheduled on the GPU.
eglWaitUntilWorkScheduledANGLE does wait, hence the name.
This fixes flickering on Rive animations rendered with WebGL.
This will be the returned egl configuration attribute for
EGL_BIND_TO_TEXTURE_TARGET_ANGLE once we transition to using the
Metal ANGLE backend directly.
We could use flake8 for linting, but ruff is compatible with black
formatting out-of-the-box. It also seems to catch more than flake8,
such as unnecessary f-strings.
When a ::before or ::after pseudo-element covered an anchor element
events were not successfully sent to the underlying anchor.
This fix allows before and after pseudo-elements
to be dispatched correctly.
Fixes#5020
Removes the associated FIXME in match_an_audio_or_video_type_pattern().
Sniffing process is a simplified version of the full spec, as it only
checks one frame of the mp3. To fully align with the spec, it would
also have to check a second frame by calculating frame size as
described in the spec.
Some instances of CSSStyleProperties can lack an owner node, for
instance the return value of a call to `window.getComputedStyle` where
the specified pseudo-element is invalid. In this case we should treat
the computed style as empty, as there is no node to compute the style
for.
Previously we would just throw it away and construct a new (empty) one
when required. This doesn't work as any existing references to the old
instance will contain out of date information. Now we retain and update
the existing instance instead.
Resolves a FIXME in `CSSRuleList::insert_a_css_rule`. Gets us a bit
closer to passing https://wpt.live/css/cssom/at-namespace.html but that
requires more work around parsing of selectors with namespaces (namely
disallowing use of undeclared selectors), which I have added a FIXME
for.
The spec requires us to store properties in their shorthand-expanded
form and in the "specified" order, removing duplicates prefering based
on "cascading order". We already enforced this in `set_property` but
not at creation time (e.g. in stylesheets) or in `set_css_text` (e.g.
updating style attribute).
This commit enforces the spec requirements at all the relevant points.
We no longer include logical properties in the return value of
`getComputedStyle` as they are mapped to their physical equivalents in
`StyleComputer::for_each_property_expanding_shorthands`, but resolving
that requires a relatively large rework of how we handle logical
properties, (namely moving when we map them to their physical
equivalents from parse time to style computation time).
This also exposes two false positive tests in
wpt-import/css/cssom/border-shorthand-serialization.html related to us
not yet supporting the border-image css property.
This change implements following behavior defined in the spec:
https://html.spec.whatwg.org/multipage/web-messaging.html#examples-5
> The start() method, whether called explicitly or implicitly (by
setting onmessage), starts the flow of messages: messages posted on
message ports are initially paused, so that they don't get dropped on
the floor before the script has had a chance to set up its handlers.
Now we don't read bytes from the underlying transport socket until the
message port transitions to the enabled state. This required the
following places to explicitly enable the message port, because now,
when it actually matters, we must do so, or otherwise sent messages will
get stuck:
- `onmessage` attribute setter in DedicatedWorkerGlobalScope, because
it implicitly sets the onmessage handler for the worker's underlying
port.
- Stream API operations where the message port enabling steps were
previously marked as FIXMEs.
We assume elsewhere that any abspos element's containing block must be
some kind of Layout::Box, so let's enforce that when deciding if a box
can be such a container.
This fixes a bad downcast on https://serpapi.com/