summaryrefslogtreecommitdiff
path: root/Ladybird
AgeCommit message (Collapse)Author
2023-04-27Ladybird: Prohibit GUI interaction of the WebContent process on macOSTimothy Flynn
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.
2023-04-26LibCore: Remove unused EventLoopManager::wake()Andreas Kling
Only EventLoopImplementation needs to know how to wake up.
2023-04-26LibCore: Move post_event() back to EventLoopImplementationAndreas Kling
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.)
2023-04-26Browser+Ladybird: Render text in the JS console with a monospace fontTimothy Flynn
2023-04-26Ladybird: Explicitly set the font family for CSS generic fontsTimothy Flynn
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.
2023-04-25LibCore+Ladybird: Add EventLoopManager interface for persistent stateAndreas Kling
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.
2023-04-25Ladybird+LibCore: Use QCoreApplication to drive the main Qt event loopAndreas Kling
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.
2023-04-25Ladybird: Remove Web::Platform plugins for Qt in favor of LibCoreAndreas Kling
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.
2023-04-25Ladybird: Run the Core::EventLoop with a Qt backendAndreas Kling
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.
2023-04-25LibCore: Simplify Core::Notifier by only allowing one event typeAndreas Kling
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.
2023-04-24Ladybird: Define AK_DONT_REPLACE_STD via CMake rather than in every fileTimothy Flynn
2023-04-23Ladybird: Implement the JavaScript console using a WebContentViewTimothy Flynn
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.
2023-04-22Browser+Ladybird+LibWeb: Port content filters to StringTimothy Flynn
2023-04-22Browser+Ladybird+LibWeb: Prevent infinite growth of content filtersTimothy Flynn
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.
2023-04-21LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacksSam Atkins
This automatically protects captured objects from being GC'd before the callback runs.
2023-04-21Ladybird: Add a command line flag to disable launching SQLServerTimothy Flynn
2023-04-18Ladybird: Propagate autoplay settings to the WebContent processTimothy Flynn
2023-04-15Ladybird+LibWebView: Add -P/--enable-callgrind-profiling optionMacDue
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).
2023-04-14Ladybird: Display Qt cursors corresponding to missing CSS cursorsSrikavin Ramkumar
2023-04-09Ladybird: Use `FileSystem` instead of `DeprecatedFile`Cameron Youell
2023-03-31Ladybird: Add tooltip to reset zoom level buttonMacDue
2023-03-29Ladybird: Add reset zoom level button to toolbarMacDue
This is a port of the Browser feature.
2023-03-28Ladybird: Improve Xcode generator experience and copy helpers to bundleAndrew Kaster
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.
2023-03-27Ladybird: Don't update the zoom menu text for null tabsMacDue
This fixes an "Assertion `m_zoom_menu && m_current_tab' failed." error when closing a window.
2023-03-26Ladybird: Show current zoom level in view menuMacDue
2023-03-26Ladybird: Open target _blank links in new tabCoderdreams
2023-03-24LibCore: Use Core::Process::spawn to start WebDriver processesMacDue
2023-03-21LibGfx: Move all image loaders and writers to a subdirectoryLucas CHOLLET
2023-03-21Everywhere: Use `LibFileSystem` where trivialCameron Youell
2023-03-21WebContent+Everywhere: Add a WebContent IPC to activate a tabTimothy Flynn
2023-03-21WebContent+Everywhere: Add an option to not activate new tabs over IPCTimothy Flynn
WebDriver, for example, will want to create new tabs without activating them.
2023-03-19Ladybird: Fix build failure caused by missing WebDriver headerAliaksandr Kalenik
Fix the problem that `cmake --build Build/ladybird` started failing with: fatal error: 'WebContent/WebDriverConnection.h' file not found after 11fe34ce0fb827f3bfe9c61c31b3dbe99a894233
2023-03-18LibWeb+Browser+Ladybird: Add menu action to dump paint treeAndreas Kling
2023-03-17LibWeb: Move initialization of the MainThreadVM to WebContent's main()Timothy Flynn
It is a fallible operation, so this lets us abort early if it fails.
2023-03-16Ladybird: Implement `notify_request_open_new_tab`Aliaksandr Kalenik
2023-03-16LibWeb+LibWebView+WebContent+Ladybird: Add IPC call that opens new tabAliaksandr Kalenik
2023-03-16Ladybird: Generate window handle during client creationAliaksandr Kalenik
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>
2023-03-16WebContent+LibWebView: Consolidate the way browsers connect to WebDriverTimothy Flynn
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.
2023-03-15Ladybird: Get the system's current color theme settings from QtAndreas Kling
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. :^)
2023-03-14Ladybird: Rely on transparent text color for location highlightingnetworkException
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.
2023-03-13LibWeb+Ladybird+Userland: Port window.[alert,confirm,prompt] to StringTimothy Flynn
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>.
2023-03-13Ladybird: Add a utility to create a QString from an AK::StringTimothy Flynn
2023-03-13Ladybird: Remove the mode to dump the layout treeTimothy Flynn
This use case is now handled by headless-browser.
2023-03-13headless-browser: Re-implement headless-browser using an OOPWVTimothy Flynn
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.
2023-03-13Ladybird+LibWebView: Move WebContent process launcher to LibWebViewTimothy Flynn
This is to allow headless-browser to reuse this code. We have a similar helper for launching SQLServer from Ladybird.
2023-03-11Ladybird: Delete unused ConsoleClient and ConsoleGlobalObjectAliaksandr Kalenik
After the separation of LibWeb into WebContent process, ConsoleClient and ConsoleGlobalObject are no longer used.
2023-03-10Ladybird+CI: Move layout_test.sh test runner from CI yml into CMakeAndrew Kaster
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.
2023-03-10Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_caseAndreas Kling
Let's make it clear that these functions deal with ASCII case only.
2023-03-08Ladybird: Send window size and position to WebContent processAliaksandr Kalenik
2023-03-08Ladybird: Add ccache to nativeBuildInputs in nix-shell scriptLinus Groh