Commit graph

275 commits

Author SHA1 Message Date
Linus Groh 533f2a4980 Ladybird: Add qtwayland to QT_PLUGIN_PATH in nix-shell script
Otherwise Qt would not find the wayland plugin it is instructed to use
via QT_QPA_PLATFORM, and would fall back to the second option, xcb,
which looks rather sad in a modern Wayland environment :^)

This feels like something that should be addressed upstream in nixpkgs
eventually.
2023-02-19 00:37:51 +01:00
Linus Groh 5468e363fa Ladybird: Add libxcrypt to nativeBuildInputs in nix-shell script
This makes <crypt.h> available.
2023-02-19 00:37:51 +01:00
Federico Guerinoni 1296aa108b Ladybird: Close tab clicking wheel of the mouse 2023-02-16 11:26:44 +00:00
Tim Schumacher 43f98ac6e1 Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +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
Luke Wilde c51026a855 Ladybird: Teach RequestManagerQt how to handle every valid HTTP method 2023-02-10 22:18:19 +00:00
MacDue 63b11030f0 Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +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
MacDue f4236e61bf LibCore: Add const qualifier to exec() argument spans 2023-02-05 16:40:51 +01:00
Aliaksandr Kalenik 1f4106842d LibGfx: Pass font width to FontDatabase::get()
Width need to be passed to `FontDatabase::get()` to resolve font name
unambiguously.
2023-02-05 08:06:06 +00:00
Federico Guerinoni 9f4bf1b04e Ladybird: Set fixed height for Settings 2023-02-03 05:10:51 -07:00
Federico Guerinoni 17e9db4fa1 Ladybird: Add setting for page to open on new tab 2023-02-03 05:10:51 -07:00
Federico Guerinoni 80da16e54a Ladybird: Design settings layout in horizontal 2023-02-03 05:10:51 -07:00
Guilherme Gonçalves 230c0b34d4 LibWeb+LibWebSocket: DOM WebSocket subprotocol support
This adds support for WebSocket subprotocols to WebSocket DOM
objects, with some necessary plumbing to LibWebSocket and its
clients.

See the associated pull request for how this was tested.
2023-02-02 14:41:34 +01:00
Andrew Kaster 7598a99ef3 Ladybird: Spawn ladybird and headless-browser using helpers in WebDriver
This allows the WebDriver to take advantage of the common helper process
spawning code when launching ladybird, and to not assume a particular
directory layout.
2023-02-02 05:35:44 -07:00
Andrew Kaster 0d5d3f12e2 Ladybird: Clean up install rules for executables
Use a list of executables to make sure that we don't miss any of the
applications used by Ladybird and its friends like WebDriver, and make
sure to install include all executables and their runtime dependencies.
2023-02-02 05:35:44 -07:00
Andrew Kaster ae9dc95b1f LibSQL+Ladybird: Accept a list of paths for spawning SQLServer in Lagom
Use the new get_paths_for_helper_process method in Ladybird to query
Qt for the runtime path of the current executable as well as the build
directory paths.
2023-02-02 05:35:44 -07: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
martinfalisse f0312de7eb Ladybird: Left-align long url in address bar
Previously when there was a very long url that spanned outside of the
address bar, the text shown would be the one starting from the very end
of the url instead of from the beginning, so you would be seeing the
query parameters for example, instead of the domain.
2023-02-02 12:10:31 +00:00
martinfalisse 24ab91f4d3 Ladybird: Go to homepage on init
If a url wasn't passed in as a parameter to Ladybird, go to the homepage
as defined in the settings on init.
2023-02-01 19:14:20 +00:00
martinfalisse abf8dd96de Ladybird: Refactor navigating to url on startup
These changes will prevent duplication of code later when there will
also be the possibility to navigate to the homepage url as defined in
the settings on startup.
2023-02-01 19:14:20 +00:00
martinfalisse 65cf562a71 Ladybird: Add ak_string_from_qstring function
This will be used later when doing the conversion from the QString in
QSettings for the homepage URL.
2023-02-01 19:14:20 +00:00
Timothy Flynn 093e7e2a86 Ladybird: Exit Ladybird normally during dump-layout-tree mode
Don't use _exit() - this is a forceful exit that will bypass all exit
handlers. This includes AddressSanitizer, and will prevent ASan from
exiting the app with a fatal error code.
2023-02-01 14:04:44 +00: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
Timothy Flynn ac80475a1f Ladybird: Initialize boolean command line argument
This being uninitialized was 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
Tim Schumacher 8464da1439 AK: Move Stream and SeekableStream from LibCore
`Stream` will be qualified as `AK::Stream` until we remove the
`Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is
defined by `SeekableStream`, since defining its own would require us to
qualify it with `AK::SeekMode` everywhere.
2023-01-29 19:16:44 -07:00
Aliaksandr Kalenik c05fcd54bb Ladybird: Do not connect SQL server in layout dump output mode 2023-01-29 11:33:33 +00:00
Aliaksandr Kalenik 0c6b942ca9 Ladybird: Flush stdout before exit in layout dump output mode 2023-01-29 11:33:33 +00:00
Timothy Flynn 2692db8699 LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
2023-01-29 00:02:45 +00:00
Timothy Flynn ad8183beb4 Meta: Support running ladybird with arguments from serenity.sh
You may now, for example, run:

    ./Meta/serenity.sh run lagom ladybird https://serenityos.org
2023-01-27 08:14:24 -05:00
Sam Atkins a5db4a0551 Ladybird: Replace uses of JsonObject::get_deprecated() 2023-01-27 08:07:24 -05: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
Cameron Youell 3bd96f29d2 Ladybird: Add LocationEdit Highlighting 2023-01-22 21:15:22 -07:00
Cameron Youell b97f9f5809 Ladybird: Make LocationEdit its own class
Also make return key behave more like other browsers when editing
2023-01-22 21:15:22 -07:00
Karol Kosek f3c6510b83 Ladybird: Accept file drops 2023-01-19 19:22:03 +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
Karol Kosek 194ddca24f Ladybird: Move the initial blank page load to BrowserWindow
Takes care of a FIXME :^)
2023-01-19 19:22:03 +00:00
Karol Kosek 5e89773937 Ladybird: Don't prepend 'about:' urls with an http:// scheme 2023-01-19 19:22:03 +00:00
Karol Kosek 4f36893fda Ladybird: Set initial page when NOT connected to WebDriver
This flips an if check condition, making the JS console work in new tabs
again.
2023-01-19 19:22:03 +00:00
Liav A 649f78d0a4 LibGfx+Ladybird+Userland: Don't sniff for TGA images with only raw bytes
Because TGA images don't have magic bytes as a signature to be detected,
instead assume a sequence of ReadonlyBytes is a possible TGA image only
if we are given a path so we could check the extension of the file and
see if it's a TGA image.

When we know the path of the file being loaded, we will try to first
check its extension, and only if there's no match to a known decoder,
based on simple extension lookup, then we would probe for other formats
as usual with the normal sniffing method.
2023-01-18 21:48:35 +01:00
Sam Atkins 1dd6b7f5b7 AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-17 19:52:52 -05: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