Timothy Flynn
3ca2ee9c72
LibWeb+WebContent+WebDriver+UI: Make window min/maximize asynchronous
...
This follows suit of previous changes to never block the WebContent
process in WebDriver endpoints.
2024-10-29 11:03:20 +00:00
Timothy Flynn
fa83cc722c
LibWeb+WebContent+WebDriver+UI: Make window rect updates asynchronous
...
It's currently possible for window size/position updates to hang, as the
underlying IPCs are synchronous. This updates the WebDriver endpoint to
be async, to unblock the WebContent process while the update is ongoing.
The UI process is now responsible for informing WebContent when the
update is complete.
2024-10-29 11:03:20 +00:00
Timothy Flynn
e4f0e745a4
UI/Qt: Send the rect of the window itself to WebContent
...
This ensures that the live values we return to WPT match the requested
values.
2024-10-29 11:03:20 +00:00
Timothy Flynn
54f6db01af
UI/Qt: Do not multiply window position/size by the device pixel ratio
...
On macOS, this is resulting in values of window.screenX, window.screenY,
window.outerWidth and window.outerHeight that are 2x larger than Safari,
Firefox, and our AppKit UI.
2024-10-29 11:03:20 +00:00
Timothy Flynn
102a125ea5
UI/AppKit: Inform WebContent of the UI window position/size
...
This is required for APIs like window.screenX, as well as for WebDriver
and WPT.
2024-10-29 11:03:20 +00:00
Kostya Farber
3e7faae647
Qt: Add box icon to line box debug menu action
2024-10-26 17:41:16 +02:00
Timothy Flynn
ea9abe26e1
UI/Qt: Execute dialogs opened from the page asynchronously
...
Invoking exec() entirely blocks the UI application's main thread. Qt
explicitly recommends against this. In practice, it seems prevents some
IPC messages from being handled by the UI until the dialog is closed by
the user.
Instead, use open() (which is non-blocking) and set up a signal handler
to deal with the result.
2024-10-26 11:25:42 +02:00
Andrew Kaster
7372b2af48
LibIPC+Everywhere: Introduce an IPC Transport abstraction
...
This abstraction will help us to support multiple IPC transport
mechanisms going forward. For now, we only have a TransportSocket that
implements the same behavior we previously had, using Unix Sockets for
IPC.
2024-10-23 12:29:01 -06:00
Jelle Raaijmakers
9309cc9df3
UI+LibWeb+WebContent: Implement KeyEvent repeat property
...
When a platform key press or release event is repeated, we now pass
along a `repeat` flag to indicate that auto-repeating is happening. This
flag eventually ends up in `KeyboardEvent.repeat`.
2024-10-22 11:20:35 -04:00
Jelle Raaijmakers
cf315d54ec
UI+LibWeb: Remove unused includes
2024-10-22 11:20:35 -04:00
Gabriel Tassinari
07400b515c
Qt: Fix -Werror=deprecated-declarations when using Qt > 6.7
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-10-20 21:35:42 -06:00
Timothy Flynn
1aab7b51ea
LibWebView: Generate hyperlinks for attributes that represent links
...
On the view-source page, generate anchor tags for any 'href' or 'src'
attribute value we come across. This handles both when the attribute
contains an absolute URL and a URL relative to the page.
This requires sending the document's base URL over IPC to resolve
relative URLs.
2024-10-20 08:50:01 +02:00
Timothy Flynn
4fcaeabe1a
LibWeb+UI: Detect and handle left vs. right modifier keys
...
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Our handling of left vs. right modifiers keys (shift, ctrl, etc.) was
largely not to spec. This patch adds explicit UIEvents::KeyCode values
for these keys, and updates the UI to match native key events to these
keys (as best as we are able).
2024-10-09 19:10:02 +02:00
Timothy Flynn
1b324f3ae1
LibWebView+UI: Remove Qt networking infrastructure
...
Now that we use libcurl, there's no reason to keep Qt networking around.
Further, it doesn't support all features we need anyways, such as non-
buffered request handling for SSE.
2024-10-08 06:52:51 +02:00
Timothy Flynn
598fabbdd3
LibWebView: Increase the open file limit in a more central location
...
We don't create a ChromeProcess in headless-browser, so it is currently
not increasing it's open file limit. This is causing crashes on macOS,
which has a very low default limit.
2024-10-07 14:03:03 -04:00
Andreas Kling
cc4b3cbacc
Meta: Update my e-mail address everywhere
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-10-04 13:19:50 +02:00
rmg-x
1f365ba44a
UI/Qt: Simplify link context menu and update keyboard shortcuts
...
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Removes the unnecessary separator, redundant open action, and changes
shortcuts to match other browsers.
2024-10-04 07:40:18 +01:00
Timothy Flynn
3393a74771
UI/Qt: Do not create signal notifiers until after an event loop exists
...
We are currently creating a signal socket and socket notifier before the
Qt event loop itself has been created. Thus, when we receive a signal,
we are not actually notified when we write that signal number to the
signal socket.
This was also the source of the following error message being displayed
on every launch of the browser:
QSocketNotifier: Can only be used with threads started with QThread
2024-10-01 12:23:35 -04:00
Jelle Raaijmakers
233b4f2ca8
LibMedia+everywhere: Remove superfluous and unused audio code
...
We had numerous NiH-based implementations of audio formats and metadata
that we now no longer need because we either don't make use of the code,
or we replaced its implementation by FFmpeg.
2024-09-30 18:48:12 +02:00
Sam Atkins
f0dd0c5107
LibWebView+UI: Highlight CSS in the style sheet inspector
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Has been cancelled
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Has been cancelled
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Has been cancelled
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Has been cancelled
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Has been cancelled
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Has been cancelled
Run test262 and test-wasm / run_and_update_results (push) Has been cancelled
Lint Code / lint (push) Has been cancelled
Push notes / build (push) Has been cancelled
2024-09-30 08:53:25 +01:00
Tim Ledbetter
63632159ce
UI: Add an option to enable autoplay globally
2024-09-24 23:50:54 +01:00
rmg-x
7a2d837c8a
UI/Qt: Move "Open in New Tab" to the top of the link context menu
2024-09-23 08:00:36 +01:00
Timothy Flynn
76662d2f01
LibWebView+UI: Remove history traversal WebView callbacks
...
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
We can handle these entirely within LibWebView.
2024-09-22 14:11:18 -04:00
Timothy Flynn
9e21e44841
LibWebView+WebContent+UI: Remove cookie related WebView callbacks
...
There's no need for each individual chrome to implement the cookie
callbacks. We can handle these entirely within LibWebView.
2024-09-22 14:11:18 -04:00
ronak69
276ad23b70
UI/Qt: Do not perform search if query text is empty
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-09-19 23:05:21 +01:00
Timothy Flynn
b688bbf26c
UI/Qt: Remove unused WebContentView::dump_layout_tree
2024-09-19 18:07:17 +02:00
Andreas Kling
6d91c42214
RequestServer: Remove "dump connection info" mechanism and UI
...
This is not relevant anymore when we use CURL.
2024-09-19 07:37:46 +02:00
PiyushXCoder
9b79081a06
UI/Qt: Don't allow tabs to be dragged past the new tab button
...
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Before this change, if would a tab it will pass the add new tab button
(+ button).
closes #1124
2024-09-18 17:53:09 +01:00
Jelle Raaijmakers
85fd2e281b
LibMedia: Absorb LibAudio
...
LibMedia will be responsible for both audio and video decoding.
2024-09-12 10:01:19 +02:00
Asutosh Variar
229b64a4b7
Everywhere: Convert from_string_view -> from_string_literal where static
2024-09-11 10:59:04 +01:00
Tim Ledbetter
6c608bac65
UI/Qt: Don't change LocationEdit cursor position on right click
...
Previously, right clicking highlighted text in the location bar would
cause the current selection to be lost.
2024-09-10 07:39:29 +02:00
Tim Ledbetter
7c953552b7
UI: Add the --disable-scripting
option to disable scripting by default
2024-09-07 11:37:41 +02:00
Timothy Flynn
a011aceeba
UI/Qt: Implement the Inspector's cookie context menu
2024-09-07 11:10:27 +02:00
Timothy Flynn
ed3c450359
LibWebView+UI: Move the database and cookie jar to WebView::Application
...
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
The main motivator here was noticing that --disable-sql-database did not
work with AppKit. Rather than re-implementing this there, move ownership
of these classes to WebView::Application, so that each UI does not need
to individually worry about it.
2024-09-05 19:45:47 -04:00
Timothy Flynn
4147d771a6
UI/Qt: Implement download directory selection
2024-09-03 14:13:41 -04:00
Sam Atkins
da171c3230
Inspector: Add a basic style sheet inspector
...
Choosing options from the `<select>` will load and display that style
sheet's source text, with some checks to make sure that the text that
just loaded is the one we currently want.
The UI is a little goofy when scrolling, as it uses `position: sticky`
which we don't implement yet. But that's just more motivation to
implement it! :^)
2024-09-03 10:12:07 +01:00
Sam Atkins
421fb6309f
UI/Qt: Assign dropdown handler for select in WebContentView, not Tab
...
This makes `<select>` elements also work outside of Tab content, for
example in the Inspector.
Co-authored-by: Tim Flynn <trflynn89@serenityos.org>
2024-09-03 10:12:07 +01:00
Timothy Flynn
cbf1fd3e61
UI/Qt: Prevent division by zero in tab width calculation
...
On macOS, the first time TabBar::tabSizeHint is called, the count is
reportedly zero, and results in a floating point exception on x64.
2024-08-30 15:08:15 -04:00
Timothy Flynn
0464212f82
UI/Qt: Update the User-Agent to the provided UA override name
2024-08-29 13:05:47 +01:00
Jamie Mansfield
b0fc8b67d6
Ladybird/Qt: Rename convert functions to reflect their new types
...
This is a follow up to GH-1111 to reflect the new signatures that these
functions have.
2024-08-20 21:40:36 +01:00
Sidicer
c380dcf15e
UI/Qt: Move cursor to the front
...
Fix long URLs showing the end instead of domain
2024-08-20 19:51:14 +01:00
Andreas Kling
0c7670b226
LibGfx: Rename Painter => DeprecatedPainter
2024-08-20 09:30:05 +02:00
Timothy Flynn
4833ba06ea
UI/Qt: Process drag-and-drop events through the web view
...
This forwards all drag-and-drop events from the UI to the WebContent
process. If the page accepts the events, the UI does not handle them.
Otherwise, we will open the dropped files as file:// URLs.
2024-08-19 13:29:19 +02:00
Andrew Kaster
804729fe37
Libraries+Ladybird: Rename LibProtocol -> LibRequests
...
The identifier "Protocol" is claimed by Objective-C and Swift for use
by the language's built-in protocol conformance feature, which is
similar to Rust traits or Java interfaces.
Rename LibProtocol -> LibRequests, and its namespace from Protocol to
Requests to accomodate this.
2024-08-19 12:56:55 +02:00
Jelle Raaijmakers
7e57cc7b09
UI/Qt: Enable basic IME keyboard input for WebContentView
...
This makes dead keys work (e.g. typing ' and e results in é).
2024-08-12 17:27:29 +01:00
Jamie Mansfield
df34ee058b
Ladybird/Qt: Don't change to new tab with 'Open in New Tab'
...
It now just opens a new tab, without changing the current tab.
2024-08-12 15:25:02 +02:00
Jamie Mansfield
6133707df8
Ladybird/Qt: Display ampersands in tab titles
...
Qt reads ampersands as shortcut keys, so this escapes them (with &&) so
they display correctly :^)
2024-08-12 15:17:17 +02:00
Timothy Flynn
96bb8fe944
UI/Qt: Add a debug menu item to dump RequestServer connection info
2024-08-03 15:53:07 -04:00
Timothy Flynn
62fa84865d
UI/Qt: Unregister WebContentView instances just once
...
We already unregister the view in the ViewImplementation destructor. We
do not need to do so again in the WebContentView destructor.
2024-08-03 15:53:07 -04:00
Timothy Flynn
5f8d852dae
LibWebView+UI: Migrate Ladybird's command line flags to LibWebView
...
Currently, if we want to add a new e.g. WebContent command line option,
we have to add it to all of Qt, AppKit, and headless-browser. (Or worse,
we only add it to one of these, and we have feature disparity).
To prevent this, this moves command line flags to WebView::Application.
The flags are assigned to ChromeOptions and WebContentOptions structs.
Each chrome can still add its platform-specific options; for example,
the Qt chrome has a flag to enable Qt networking.
There should be no behavior change here, other than that AppKit will now
support command line flags that were previously only supported by Qt.
2024-08-01 11:38:42 +02:00