Commit Graph

227 Commits

Author SHA1 Message Date
Linus Groh
f183745f4e LibWebView+Ladybird: Move preferred color scheme to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5bf5697f16 LibWebView+Ladybird: Move text selection to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
8c11a2c253 LibWebView+Ladybird: Move running JavaScript to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
55609f744d LibWebView+Ladybird: Move debug request to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
de1c0c87fe LibWebView+Ladybird: Move page loading to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
2428e3e675 LibWebView+Ladybird: Move DOM inspection helpers to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
f313708237 LibWebView+Ladybird: Move get source request to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5d9f4b2ffc LibWebView+Ladybird: Move zoom logic to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5411adca22 LibWebView+Ladybird: Begin de-duplicate WebView implementations
This starts moving code equally shared between the OOPWV and Ladybird
WebContentView implementations to WebView::ViewImplementation, beginning
with the client state.
2023-01-12 23:39:36 +01:00
Andreas Kling
2eaebdea5b Ladybird: Add Ctrl+= as an alternate "zoom in" shortcut
On many keyboards, Ctrl++ is actually Ctrl+Shift+=, and Ctrl+= makes
more sense as it's symmetric with Ctrl+-.

Both Firefox and Chrome already support this alternate shortcut,
so let's be nice and support it in Ladybird as well. :^)
2023-01-12 19:05:07 +00:00
Andreas Kling
c8ea23a4fe Ladybird: Use QKeySequence::StandardKey as much as possible
Let Qt pick the most appropriate native shortcut when it knows one.
2023-01-12 19:05:07 +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
966d808135 Ladybird: Replace ColorScheme enum with Web::CSS::PreferredColorScheme
This matches OutOfProcessWebView::set_preferred_color_scheme().
2023-01-12 18:27:34 +00:00
Linus Groh
0cc151bc1c Ladybird: Implement zoom :^) 2023-01-12 15:14:09 +00:00
Linus Groh
05ef6c9b64 Ladybird: Set 'device pixels per CSS pixel' to device pixel ratio :^) 2023-01-12 15:14:09 +00:00
Linus Groh
f49a65cb28 Ladybird: Use standard font paths in FontPluginQt
This makes vector fonts load on macOS, where /usr/share/fonts doesn't
exist and Ladybird would only load the bitmap fonts from ./res/fonts
in the SerenityOS resource root directory.
Additionally, fonts in {/usr/share/local,~/.local}/fonts are now loaded
on Linux.
2023-01-11 20:54:49 +00:00
Karol Kosek
e3d9a3426e Ladybird: Port to Core::Stream::File 2023-01-09 22:50:53 +00:00
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