Age | Commit message (Collapse) | Author |
|
The WebContent process behaves a bit awkwardly on macOS. When we launch
the process, we have to create a QGuiApplication to access system fonts.
But on macOS, doing so creates an entry in the Dock, and also causes the
WebContent to be focused. So if you enter cmd+Q without first focusing
the Ladybird GUI, WebContent is closed, while the Ladybird process keeps
running.
|
|
Only EventLoopImplementation needs to know how to wake up.
|
|
This shouldn't have been moved to EventLoopManager, as the manager is
global and one-per-process, and the implementation is one-per-loop.
This makes cross-thread event posting work again, and unbreaks
SoundPlayer (and probably other things as well.)
|
|
|
|
We currently query Qt for system fonts using QFont::setStyleHint(). The
docs from Qt have the following note regarding this API on X11:
Qt does not support style hints on X11 since this information is not
provided by the window system.
This prevents any monospace font from working on X11 systems. For now,
work around this by specifying the font-family for fonts which Qt has
listed as mapping to a CSS generic font-family.
|
|
Things such as timers and notifiers aren't specific to one instance of
Core::EventLoop, so let's not tie them down to EventLoopImplementation.
Instead, move those APIs + signals & a few other things to a new
EventLoopManager interface. EventLoopManager also knows how to create a
new EventLoopImplementation object.
|
|
Using QEventLoop works for everything but it breaks *one* little feature
that we care about: automatically quitting the app when all windows have
been closed.
That only works if you drive the outermost main event loop with a
QCoreApplication instead of a QEventLoop. This is unfortunate, as it
complicates our API a little bit, but I'm sure we can think of a way to
make this nicer someday.
In order for QCoreApplication::exec() to process our own
ThreadEventQueue, we now have a zero-timer that we kick whenever new
events are posted to the thread queue.
|
|
Now that the Core::EventLoop is driven by a QEventLoop in Ladybird,
we don't need to patch LibWeb with Web::Platform plugins.
This patch removes EventLoopPluginQt and TimerQt.
Note that we can't just replace the Web::Platform abstractions with
LibCore stuff immediately, since the Web::Platform APIs use
JS::SafeFunction for callbacks.
|
|
This patch adds EventLoopImplementationQt which is a full replacement
for the Core::EventLoopImplementationUnix that uses Qt's event loop
as a backend instead.
This means that Core::Timer, Core::Notifier, and Core::Event delivery
are all driven by Qt primitives in the Ladybird UI and WC processes.
|
|
Not a single client of this API actually used the event mask feature to
listen for readability AND writability.
Let's simplify the API and have only one hook: on_activation.
|
|
|
|
This aligns the Ladybird console implementation with the Browser console
a bit more, which uses OutOfProcessWebView for rendering console output.
This allows us to style the console output to try and match the system
theme.
Using a WebContentView is simpler than trying to style the old QTextEdit
widget, as the console output is HTML with built-in "-libweb-palette-*"
colors. These will override any color we set on the QTextEdit widget.
|
|
|
|
We never clear content filters on either end of the Browser-WebContent
IPC connection. So when the filters change, we re-append all filters to
the Vector holding them. This incidentally makes it impossible to remove
a filter.
Change both sides to clear their filter lists when receiving a new set
of filters.
|
|
This automatically protects captured objects from being GC'd before the
callback runs.
|
|
|
|
|
|
This adds a -P option to run Ladybird under callgrind. It starts with
instrumentation disabled. To start capturing a profile (once Ladybird
has launched) run `callgrind_control -i on` and to stop it again run
`callgrind_control -i off`.
P.s. This is pretty much stolen from Andreas (and is based on the patch
everyone [that wants a profile] have been manually applying).
|
|
|
|
|
|
|
|
This is a port of the Browser feature.
|
|
We had a mismatch in the GUI Identifier property, causing warnings in
Xcode. It was also missing the Product Identifier Xcode property on
ladybird itself, causing another warning.
Copy all our helper processes to the ladybird.app bundle directory so
that they can be found by ``open ladybird.app`` and the Xcode debugger.
For the future, we should look in ../Resources for resources on macOS.
Copying resources to that directory requires more CMake-fu.
|
|
This fixes an "Assertion `m_zoom_menu && m_current_tab' failed." error
when closing a window.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WebDriver, for example, will want to create new tabs without activating
them.
|
|
Fix the problem that `cmake --build Build/ladybird` started
failing with:
fatal error: 'WebContent/WebDriverConnection.h' file not found
after 11fe34ce0fb827f3bfe9c61c31b3dbe99a894233
|
|
|
|
It is a fallible operation, so this lets us abort early if it fails.
|
|
|
|
|
|
Generate handle UUID for top-level context that is going to
run in created WebContent process and sent it over IPC.
Co-authored-by: Timothy Flynn <trflynn89@pm.me>
|
|
Currently, on Serenity, we connect to WebDriver from the browser-side of
the WebContent connection for both Browser and headless-browser.
On Lagom, we connect from within the WebContent process itself, signaled
by a command line flag.
This patch changes Lagom browsers to connect to WebDriver the same way
that Serenity browsers do. This will ensure we can do other initializers
in the same order across all platforms and browsers.
|
|
There isn't a 1:1 equivalent for all ColorRoles between Qt and LibGfx,
but we can at least make an effort to translate the various QPalette
preferred colors.
This makes text selection look a lot more "native" in Ladybird. :^)
|
|
This patch replaces the usage of QPalette::PlaceholderText with
QPalette::Text with opacity reduced to roughly 50%. This fixes the non
highlighted spans having an extremely low contrast compared to the
background in dark mode.
|
|
LibGUI and WebDriver (read: JSON) API boundaries use DeprecatedString,
so that is as far as these changes can reach.
The one change which isn't just a DeprecatedString to String replacement
is handling the "null" prompt response. We previously checked for the
null DeprecatedString, whereas we now represent this as an empty
Optional<String>.
|
|
|
|
This use case is now handled by headless-browser.
|
|
headless-browser currently uses its own PageClient to load web pages
in-process. Due to this, it also needs to set up a whole bunch of other
objects needed to run LibWeb, e.g. image decoders, request servers, etc.
This changes headless-browser to instead implement a WebView to launch
WebContent out-of-process. This implementation is almost entirely empty,
but can be filled in as-needed. For example, we may want to print
JavaScript console messages.
|
|
This is to allow headless-browser to reuse this code. We have a similar
helper for launching SQLServer from Ladybird.
|
|
After the separation of LibWeb into WebContent process, ConsoleClient
and ConsoleGlobalObject are no longer used.
|
|
We should be able to run this locally, as long as ENABLE_LAGOM_LADYBIRD
is true, or if building ladybird from the ladybird source directory.
This removes a special case from the Lagom CI yml file.
|
|
Let's make it clear that these functions deal with ASCII case only.
|
|
|
|
|