Commit graph

65 commits

Author SHA1 Message Date
Timothy Flynn add15a5f04 Ladybird+LibWebView: Move WebContent process launcher to LibWebView
This is to allow headless-browser to reuse this code. We have a similar
helper for launching SQLServer from Ladybird.
2023-03-13 07:21:00 +00:00
Aliaksandr Kalenik b51090e83e Ladybird: Send window size and position to WebContent process 2023-03-08 23:15:31 +01:00
Aliaksandr Kalenik 59752807c4 Ladybird: Handle close event in WebContentView 2023-03-07 11:34:11 +00:00
Aliaksandr Kalenik cc41233be4 LibWebView+WebContent: Propagate close from WebContent to LibWebView 2023-03-07 11:34:11 +00:00
MacDue 40bfaff133 Ladybird: Support inspecting the accessibility tree
This allows viewing the ARIA accessibility tree Epigenetic added
in #16430, but now in Ladybird!
2023-02-22 22:00:40 +00:00
Tim Schumacher 874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher 606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher a96339b72b LibCore: Move Stream-based sockets into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
MacDue 1c92e6ee9d Ladybird: Don't overwrite argv[0] in spawn_helper_process()
This is already set correctly at the caller.
2023-02-08 19:15:45 +00:00
Aliaksandr Kalenik 12eca612bc Ladybird: Specify window size in layout dump mode 2023-02-06 20:42:14 +01:00
Andrew Kaster 3e6d790cf0 Ladybird: Abstract spawning helper processes into separate methods
This will let us use the same path discovery methods for WebContent,
SQLServer, and any other helper processes we need to launch.
2023-02-02 05:35:44 -07:00
Timothy Flynn 9fd54e1f90 Ladybird: Store the WebContent QSocketNotifier on the stack
This was being heap allocated with naked-new and never freed. Caught by
AddressSanitizer.
2023-02-01 14:04:44 +00:00
Tim Schumacher 093cf428a3 AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
Andreas Kling ddbdeb3ca0 Ladybird: Add --dump-layout-tree mode that dumps layout tree and exits 2023-01-27 10:41:24 +01:00
Andreas Kling 90fee39290 Ladybird: Fire the WebContentView::on_load_finish hook if set 2023-01-27 10:33:18 +01:00
Tim Schumacher 82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Karol Kosek f3c6510b83 Ladybird: Accept file drops 2023-01-19 19:22:03 +00:00
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 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
Karol Kosek e3d9a3426e Ladybird: Port to Core::Stream::File 2023-01-09 22:50:53 +00: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
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
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 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
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
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 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
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