Commit Graph

210 Commits

Author SHA1 Message Date
Andreas Kling
f476b827de Ladybird: Let Qt pick the reload shortcut
This fixes an issue on platforms where Ctrl+R is the preferred native
shortcut, and we were effectively trying to set it twice.
2023-01-09 17:32:00 +01:00
Karol Kosek
01a786310d Ladybird: Add Qt's standard refresh key (F5) to reload shortcuts 2023-01-08 19:38:35 +01:00
Jonah
367b1634fd LibWebView+WebContent: Expose the Accessibility Tree to Other Processes
This patch also stubs out notify_server_did_get_accessiblity_tree in
ladybird since ViewImplementation now has it. However, this feature
is still immature, so just stubbing out in ladybird for now. Once we
have more robust support in Serenity (namely ARIA properties/state
and accessible names and descriptions) we can port this
functionality over.
2023-01-07 10:51:53 +00:00
Davide Cavalca
1fc7740152 Ladybird: Install SQLServer binary
Install the SQLServer binary added in 2cb3ae1 so that it's actually
available on the target system when doing a standalone build of
Ladybird.
2023-01-03 09:32:07 -05:00
networkException
4c7a99fe06 Ladybird: Remove separate LICENSE file
Since ladybird is part of the serenity monorepo now there's no need to
keep a separate LICENSE file around :^)
2023-01-03 12:37:18 +01:00
Luke Wilde
b85f4ab66a Ladybird: Tell Qt that we manually handle the Cookie header
In some cases, Qt would silently drop the Cookie header and start
causing Cookie authenticated requests to start failing.
2022-12-30 23:52:09 +01:00
Nico Weber
ac039d93f0 Ladybird: Fix typos 2022-12-30 17:21:57 +01:00
MacDue
678dfa8f75 Ladybird: Close inspector and JS console when tab closes
Keeping these around can lead to use-after-frees and crashes.
2022-12-25 15:30:08 -07:00
MacDue
33249c727a Ladybird: Add the node properties tabs to the inspector
This now allows you to view the computed and resolved style values,
along with the CSS variables of a node.
2022-12-25 15:30:08 -07:00
MacDue
aa85a88158 Ladybird: Reimplement the DOM inspector :^)
This has been broken since the switch to the multiprocess architecture
(and even before then was very limited).

This restores the previous functionally and also implements the ability
to inspect individual elements (by selecting them in the tree view).
The inspector also now correctly updates when navigating between pages.
2022-12-25 15:30:08 -07:00
MacDue
0313814d3b Ladybird: Allow replacing underlying model of ModelTranslator 2022-12-25 15:30:08 -07:00
Andrew Kaster
e79e7dc3b9 Documentation: Move Ladybird BuildInstructions to Documentation
Update Ladybird/README.md at the same time to reflect its new monorepo
status.
2022-12-25 07:58:58 -07:00
Andrew Kaster
b4d80f92ec Ladybird: Support building Ladybird as a non-top-level project
The implementation assumes that Lagom is either the top level project,
or included before Ladybird is.
2022-12-25 07:58:58 -07:00
Timothy Flynn
03294b0177 Ladybird/WebDriver: Retrieve process environment in an OS-dependent way 2022-12-25 07:58:58 -07: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
Andreas Kling
ea26e45594 Ladybird: Fix build after Gfx::load_system_theme() return type change 2022-12-25 07:58:58 -07:00
Timothy Flynn
4c1f414713 Ladybird: Migrate SQLServer to be launched as a singleton process
Rather than manually launching the SQLServer process, use SQLClient's
new functionality to launch the server just once for all Ladybird
instances. Quit the SQLServer process when it no longer has any
connected clients.
2022-12-25 07:58:58 -07:00
Timothy Flynn
1dd14e1324 Ladybird: Quit SQLServer when its connected client exits
When Ladybird exits, SQLServer can get stuck spinning at 100% CPU after
the socket connection is closed. This changes the client to quit the
event loop when that disconnect happens to ensure that SQLServer is
properly destroyed.
2022-12-25 07:58:58 -07:00
Andreas Kling
e54932ee73 Ladybird: Fix build after ConsoleGlobalEnvironmentExtensions rename 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
Timothy Flynn
a0cd260410 Ladybird: Do not domain match on cookie updates
This matches a corresponding change to Serenity's Browser.
2022-12-25 07:58:58 -07:00
Thitat Auareesuksakul
5b8d1a6f61 Ladybird/Documentation: Add cmake to macOS dependencies 2022-12-25 07:58:58 -07:00
MacDue
d768abffa0 Ladybird: Pass Gfx::IntPoint by value 2022-12-25 07:58:58 -07:00
MacDue
4709f5961b Ladybird: Pass Gfx::IntSize by value 2022-12-25 07:58:58 -07:00
Aliaksandr Kalenik
88667ce9f0 Ladybird: Fix build with JS::MarkupGenerator's new string type usage
Fix to build after JS::MarkupGenerator got converted to use
new string type:
112b3f7342
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
Baitinq
97dd5a085f Ladybird: Replace history entry if loading URL because of a redirect
We now replace the current history entry if the page-load has been
caused because of a redirect. This makes it able to traverse the
history if one of the entries redirects you, which previously
caused an infinite history traversion loop.

Depends on https://github.com/SerenityOS/serenity/pull/16004
2022-12-25 07:58:58 -07:00
Sam Atkins
ec55b13e96 Ladybird: Add stub for notify_server_did_finish_handling_input_event
This doesn't need to do anything yet, but will do once we start passing
events to web content *before* they're passed to our GUI.
2022-12-25 07:58:58 -07:00
Timothy Flynn
a1e380cc38 Ladybird/WebDriver: Support running headless WebDriver sessions
This adds a dependency from WebDriver to Lagom's headless-browser to be
used if the client's required capabilities indicate to do so.
2022-12-25 07:58:58 -07:00
Timothy Flynn
69cd0d6599 Ladybird: Update stored URL when a page starts/finishes loading
Similar to https://github.com/SerenityOS/serenity/commit/9782660. Unlike
Serenity's browser, this doesn't affect reloading the page, as Ladybird
refers to the History object for reloading (which is updated already on
page load). However, this URL is used for e.g. crash reporting, so let's
update it here as well.
2022-12-25 07:58:58 -07:00
Timothy Flynn
9a5f9c101c Ladybird: Implement updated alert/confirm/prompt IPC methods
WebContent now needs to interact with these dialogs asynchronously. This
updates WebContentView to hold a pointer to whatever dialog is open, and
implements the methods to interact with that dialog.
2022-12-25 07:58:58 -07:00
Idan Horowitz
fad3fbfe26 Ladybird: Add block pop-ups checkbox to debug menu 2022-12-25 07:58:58 -07:00
Timothy Flynn
948c4ba102 Ladybird/WebDriver: Implement the cookie endpoints for Ladybird 2022-12-25 07:58:58 -07:00
Timothy Flynn
9e0db602ca Ladybird: Implement WebDriver for Ladybird :^)
This adds a WebDriver binary for Ladybird to make use of Serenity's
WebDriver implementation. This has to use the same IPC socket handling
that was used to make WebContent work out-of-process. Besides that, we
are able to reuse almost everything from Serenity.
2022-12-25 07:58:58 -07:00
Timothy Flynn
54321f49ad Ladybird: Implement WebDriver's navigation and window control endpoints 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
Timothy Flynn
7021d30288 Ladybird: Foward the WebContent passing socket FD by command line
Rather than needing to set another environment variable for WebDriver's
passing socket, let's forward these FDs by command line. This also moves
the creation of the WebContent connection to a helper function so that
the WebDriver connection can re-use it.
2022-12-25 07:58:58 -07:00
Timothy Flynn
39954f9e7f Ladybird: Give the WebContent socket a descriptive name
WebContent's main() will soon take over multiple sockets. Give the
existing WebContent socket a descriptive name to avoid confusion.
2022-12-25 07:58:58 -07:00
Baitinq
e74dff7697 Ladybird/Misc: Add ladybird.nix for nix-shell support 2022-12-25 07:58:58 -07:00
Marco Cutecchia
5a9b891268 Ladybird: Stub out notify_server_did_request_fullscreen_window 2022-12-25 07:58:58 -07:00
Timothy Flynn
e592c7691e Ladybird: Stub out history navigation WebView::ViewImplementation APIs
These were added for WebDriver, which doesn't have a Ladybird
implementation yet.
2022-12-25 07:58:58 -07:00
Timothy Flynn
fcc0530e26 Ladybird: Stub out new cookie WebView::ViewImplementation APIs
These were added for WebDriver, which doesn't have a Ladybird
implementation yet.
2022-12-25 07:58:58 -07:00
Baitinq
e80147afba Ladybird: Fix reloading functionality
Previously, reloading went back to the first page loaded by
WebView::load() or WebView::load_html(), as they are the only methods
that modify m_url, which is what the reload loaded. Now we handle
reloads in Tab.cpp by simply loading the last entry in the m_history.
2022-12-25 07:58:58 -07:00
Timothy Flynn
0b15fd4a12 Ladybird: Stub out new WebView::ViewImplementation APIs
These were added for WebDriver, which doesn't have a Ladybird
implementation yet.
2022-12-25 07:58:58 -07:00
Baitinq
15e4d151c3 Ladybird: Don't add initial about:blank load to history
The hackish initial loading of about:blank was previously added to the
history, so you could go back to it (which wasn't very ergonomic). Now
we set the m_is_history_navigation flag before loading it so it doesn't
get added to the history.
2022-12-25 07:58:58 -07:00
Timothy Flynn
5d0ab45ff4 Ladybird: Add new WebContent source file for WebDriver endpoints 2022-12-25 07:58:58 -07:00
Andreas Kling
385c12c8b6 Ladybird: Add subclass of WebSocket::WebSocketImpl using Qt networking 2022-12-25 07:58:58 -07:00
Gunnar Beutner
acd70f44c2 Ladybird: Don't change window icons when background tabs change icons 2022-12-25 07:58:58 -07:00
Gunnar Beutner
5f3b82dcba Ladybird: Don't update window titles when background tabs change titles
Steps to reproduce:
1. Open the Cookie Clicker game in a tab.
2. Open another website in another tab and make that the current tab.
3. Observe how the window's title mentions Cookie Clicker.
2022-12-25 07:58:58 -07:00
Baitinq
eaff4a1d65 Ladybird: Don't push to history when loading through history navigation
Previously we were always pushing to history on the on_load_start
callback. Now we only do that if we are NOT navigating through the
history navigation (loading pages by going back/forward). This is what
the SerenityOS browser does:^)
2022-12-25 07:58:58 -07:00