Commit graph

29 commits

Author SHA1 Message Date
Aliaksandr Kalenik b51090e83e Ladybird: Send window size and position to WebContent process 2023-03-08 23:15:31 +01:00
Andreas Kling 21db2b7b90 Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
Andreas Kling 359d6e7b0b Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Federico Guerinoni 1296aa108b Ladybird: Close tab clicking wheel of the mouse 2023-02-16 11:26:44 +00:00
Karol Kosek 731fec525e Ladybird: Add URL and 'open in background' parameters to new_tab()
This will avoid loading starting about:blank page in places when we know
exactly what we want to load.

The opening in background part might be useful for future things like
file drops and right-click open in new tab.
2023-01-19 19:22:03 +00:00
Andreas Kling 9c7e26b8d4 Ladybird: Add "Copy" and "Select All" actions to the Edit menu 2023-01-12 19:55:10 +01:00
Linus Groh 0cc151bc1c Ladybird: Implement zoom :^) 2023-01-12 15:14:09 +00:00
Timothy Flynn e5192073d9 Ladybird/WebDriver: Move to using local socket files for WebDriver IPC
This allows us to use standard Serenity IPC infrastructure rather than
manually creating FD-passing sockets. This also lets us use Serenity's
WebDriver Session class, removing the copy previously used in Ladybird.
This ensures any changes to Session in the future will be picked up by
Ladybird for free.
2022-12-25 07:58:58 -07:00
Timothy Flynn 2cb3ae132a Ladybird: Implement SQLServer for Ladybird :^)
This adds a SQLServer binary for Ladybird to make use of Serenity's SQL
implementation. This has to use the same IPC socket handling that was
used to make WebContent and WebDriver work out-of-process.

Unlike Serenity, Ladybird creates a new SQLServer instance for each
Ladybird instance. In the future, we should try to make sure there is
only one SQLServer instance at a time, and allow multiple Ladybird
instances to communicate with it.
2022-12-25 07:58:58 -07:00
Linus Groh 5a5c4f079b Ladybird: Update for AK::{String => DeprecatedString} rename 2022-12-25 07:58:58 -07:00
Timothy Flynn 4031630b49 Ladybird: Construct a WebDriverConnection when instructed to do so
The WebDriver will pass the --webdriver-fd-passing-socket command line
option when it launches Ladybird. Forward this flag onto the WebContent
process, where it will create the WebDriverConnection for IPC.
2022-12-25 07:58:58 -07:00
Linus Groh c91978baa6 Ladybird: Use Browser's CookieJar.{cpp,h}
There are no custom changes for Ladybird in the current copies of those
files, so we just need to ensure to keep Ladybird up to date for any
changes made upstream.

This fixes a build issue introduced by https://github.com/SerenityOS/serenity/pull/15736.
2022-12-25 07:58:58 -07:00
Andreas Kling 71dadabfaa Ladybird: Hook up the CookieJar again after WebContent introduction 2022-12-25 07:58:58 -07:00
Andreas Kling 26a7ea0e0f Ladybird: Render web content in a separate process :^)
This patch brings over the WebContent process over from SerenityOS
to Ladybird, along with a new WebContentView widget that renders
web content in a separate process.

There's a lot of jank and FIXME material here, notably I had to re-add
manually pumped Core::EventLoop instances on both sides, in order to get
the IPC protocol running. This introduces a lot of latency and we should
work towards replacing those loops with improved abstractions.

The WebContent process is built separately here (not part of Lagom) and
we provide our own main.cpp for it. Like everything, this can be better
architected, it's just a starting point. :^)
2022-12-25 07:58:58 -07:00
Andreas Kling 2a021084e5 Ladybird: Rename WebView to SimpleWebView
This will allow us to share code with LibWebView from SerenityOS.
(This would otherwise not work, since its "WebView" namespace collides
with our "WebView" class.)

Also, we should eventually move towards a more sophisticated
multi-process WebView like OOPWV.
2022-12-25 07:58:58 -07:00
Aaron Dewes eecee7369f Ladybird: Clean up tab bar autohide
Qt has this feature built-in, so there's no need to create a custom
implementation
2022-12-25 07:58:58 -07:00
Andreas Kling 97964bc710 Ladybird/BrowserWindow: Add UI for switching preferred CSS color scheme 2022-12-25 07:58:58 -07:00
Andreas Kling 0f1644f62d Ladybird: Switch to next/previous tab with Ctrl+PageDown/PageUp 2022-12-25 07:58:58 -07:00
Andreas Kling 37d844fd66 Ladybird: Use only the Qt event loop to speed everything up :^)
This patch removes the dual-event-loop setup, leaving only the Qt event
loop. We teach LibWeb how to drive Qt by installing an EventLoopPlugin.

This removes the 50ms latency on all UI interactions (and network
requests, etc.)
2022-12-25 07:58:58 -07:00
Alec Murphy 700c709c00 Ladybird: Add Ctrl-W action to close current tab (#28) 2022-12-25 07:58:58 -07:00
Filiph Sandström ace44dc13b Ladybird: Hide TabBar if count <= 1 2022-12-25 07:58:58 -07:00
Andreas Kling 487544d7b4 Ladybird: Port over part of the "Debug" menu from the SerenityOS browser
This is pretty messy, but we have to start somewhere. Eventually we
should find a way to share this code with SerenityOS.
2022-12-25 07:58:58 -07:00
Matthew Costa 67ab6dd2e6 Ladybird: Allow browser tabs to be closed
This is a small patch which wires up the tab close button.
2022-12-25 07:58:58 -07:00
Matthew Costa 8af5b49cba Ladybird: Rudimentary tabbed browsing support
This patch removes the browser WebView from the window and places it
inside a Tab object, all wrapped up in a QT tab control. So far you can
create tabs, but can't close them.
2022-12-25 07:58:58 -07:00
Andreas Kling 69d264828f Ladybird: Add a "Reload" action to reload the current URL 2022-12-25 07:58:58 -07:00
Matthew Costa 7bf3010185 Ladybird: Trigger browser to quit when the main window is closed
This patch adds an event handler to the main window which allows it to
respond to a user closing the window. This event is then passed on to
the LibCore event loop, which allows the application quit itself.
Previously the application would hang, only running in the background,
until killed by an external force.
2022-12-25 07:58:58 -07:00
Keir Davis 95e3e06a1e Ladybird: Add Favicon to the window 2022-12-25 07:58:58 -07:00
Andreas Kling f5d033b8ba Ladybird: Show the web page title in the window titlebar :^) 2022-12-25 07:58:58 -07:00
Andreas Kling 8b7000e151 Ladybird: Add a location bar and allow navigating to new pages :^) 2022-12-25 07:58:58 -07:00