Commit graph

38 commits

Author SHA1 Message Date
Sam Atkins
eb1ad8655e LibWeb/CSS: Move and rename PseudoElement types to prep for code gen
The upcoming generated types will match those for pseudo-classes: A
PseudoElementSelector type, that then holds a PseudoElement enum
defining what it is. That enum will be at the top level in the Web::CSS
namespace.

In order to keep the diffs clearer, this commit renames and moves the
types, and then a following one will replace the handwritten enum with
a generated one.
2025-03-21 12:06:37 +00:00
Timothy Flynn
daca9f5995 LibDevTools+LibWebView+WebContent: Selectively fetch DOM node properties
When we inspect a DOM node, we currently serialize many properties for
that node, including its layout, computed style, used fonts, etc. Now
that we aren't piggy-backing on the Inspector interface, we can instead
only serialize the specific information required by DevTools.
2025-03-20 09:01:26 +01:00
stasoid
2dd657f530 LibWebView: Port to Windows 2025-03-19 20:25:24 -06:00
Timothy Flynn
942f26a846 LibWebView: Remove now-unused ProcessManager HTML generator 2025-03-19 10:03:17 -04:00
Timothy Flynn
843209c6a9 LibWeb+LibWebView+WebContent: Add an about:processes page
The intent is that this will replace the separate Task Manager window.
This will allow us to more easily add features such as actual process
management, better rendering of the process table, etc. Included in this
page is the ability to sort table rows.

This also lays the ground work for more internal `about` pages, such as
about:config.
2025-03-19 10:03:17 -04:00
Timothy Flynn
3af63bc5a3 Everywhere: Replace miscellaneous references to the chrome process 2025-03-15 19:57:27 -04:00
Timothy Flynn
18eee7e3f0 LibWebView: Rename the Chrome process type to Browser 2025-03-15 19:57:27 -04:00
Timothy Flynn
e00c0c176e LibWebView+UI: Rename ChromeOptions to BrowserOptions 2025-03-15 19:57:27 -04:00
Timothy Flynn
df7917d705 LibWebView: Change the DevTools server to be a runtime-enabled feature 2025-03-15 19:09:40 +01:00
Timothy Flynn
0a5f68eba6 LibWebView: Disable site isolation and spare processes when debugging
These features make it difficult to debug a single WebContent instance.
2025-03-14 18:53:50 +01:00
Timothy Flynn
0b86bcfba7 LibDevTools+LibWebView: Implement getting document style sheets 2025-03-13 16:56:28 -04:00
Timothy Flynn
2ee3985fd1 LibDevTools+LibWebView: Implement getting the used fonts for a DOM node
This also includes a request to get all fonts for a page, which we stub
out for now as we don't have the IPC to retrieve all fonts.
2025-03-13 16:56:28 -04:00
Timothy Flynn
fce5d24e5f LibWebView+WebContent: Add a command-line flag to disable site isolation 2025-03-12 02:00:54 +00:00
Timothy Flynn
cbefa797d4 LibDevTools+LibWebView+WebContent: Implement moving DOM nodes
This allows for click-and-dragging DOM nodes in DevTools to move them.
2025-03-11 09:50:51 -04:00
Timothy Flynn
01c44a5c66 LibDevTools+LibWebView+WebContent: Implement getting DOM node inner HTML
This is used by DevTools to copy the inner HTML to the clipboard.
2025-03-11 09:50:51 -04:00
Timothy Flynn
d75eadc3c4 LibDevTools+LibWebView+WebContent: Implement editing DOM node HTML
These commands are used for the "Edit As HTML" feature in DevTools. This
renames our existing HTML getter IPC to indicate that it is for outer
HTML. DevTools will need a separate inner HTML getter.
2025-03-11 09:50:51 -04:00
Timothy Flynn
aca4385daf LibWebView: Create a spare WebContent process
Since cross-site navigation is a pretty frequent task, creating a spare
process is commonplace in other browsers to reduce the overhead of
directing the target site to a new process.

We store this process on the WebView application. If it is unavailable,
we queue a task to create it later.
2025-03-11 12:10:42 +01:00
Timothy Flynn
5f76324af5 LibDevTools+LibWebView: Take advantage of IPC encoding improvements 2025-03-09 11:14:20 -04:00
Timothy Flynn
c4b1d2382a LibDevTools+LibWebView: Implement requests to clone DOM nodes 2025-03-08 01:25:55 +01:00
Timothy Flynn
ffd48e1d45 LibDevTools+LibWebView: Implement requests to create DOM nodes
This requires a couple of amendments to the DOM node serialization.
Namely, we need to include the HTML namespace, otherwise the context
menu item to create a new node is disabled.
2025-03-08 01:25:55 +01:00
Timothy Flynn
29122786b9 LibDevTools+LibWebView: Implement requests to delete DOM nodes 2025-03-08 01:25:55 +01:00
Timothy Flynn
bdb31b029a LibDevTools+LibWebView: Implement requests to edit DOM node tags 2025-03-08 01:25:55 +01:00
Timothy Flynn
17fb21169f LibDevTools+LibWebView: Implement requests to edit DOM node attributes 2025-03-08 01:25:55 +01:00
Timothy Flynn
57e0a3f8b5 LibDevTools+LibWebView: Implement requests to edit DOM node text 2025-03-08 01:25:55 +01:00
Timothy Flynn
8bcc3d3797 LibDevTools+LibWebView: Inform the DevTools client about DOM mutations 2025-03-08 01:25:55 +01:00
Timothy Flynn
ffdce78b7b LibWebView+WebContent: Implement basic DevTools console support 2025-03-04 15:33:39 -05:00
Timothy Flynn
32bc2dc7b6 LibWebView+WebContent: Begin supporting the DevTools JavaScript console
This supports evaluating the script and replying with the result. We
currently serialize JS objects to a string, but we will need to support
dynamic interaction with the objects over IPC. This does not yet support
sending console messages to DevTools.
2025-02-28 13:08:33 +01:00
Timothy Flynn
0d1ce48071 LibDevTools+LibWebView: Avoid dependence on LibWebView from LibDevTools
Some checks failed
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Has been cancelled
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Has been cancelled
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Has been cancelled
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.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-24.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
Label PRs with merge conflicts / auto-labeler (push) Has been cancelled
Push notes / build (push) Has been cancelled
LibDevTools was implicitly including generated IPC endpoints from
LibWebView. This is not a dependency declared in the CMakeLists.txt. So
updates to the IPC file might not have caused the endpoint header to be
regenerated by the time LibDevTools is compiled, resulting in a build
error.

This patch removes that implicit dependency entirely.
2025-02-26 19:48:24 -05:00
Timothy Flynn
a76d0867d1 LibWebView: Support DOM node highlighting and inspection for DevTools 2025-02-24 12:05:29 -05:00
Timothy Flynn
d4b7dd88b7 LibWebView: Parse inspector-related JSON strings sooner
We currently receive serialized JSON values over IPC and forward them to
them WebView callbacks, leaving it to the implementations of those
callbacks to parse the strings as JSON objects. This patch hoists that
parsing up to WebContentClient as soon as the IPC message is received.
This is to reduce the work needed for secondary implementations of these
callbacks (i.e. our Firefox DevTools server).
2025-02-24 12:05:29 -05:00
Timothy Flynn
5478f34992 LibWebView+WebContent: Transfer inspected DOM info over IPC as String
Let's avoid a whole bunch of String to ByteString to String conversions.
2025-02-24 12:05:29 -05:00
Timothy Flynn
4791ec35bf LibDevTools+LibWebView: Port DevTools to String 2025-02-20 19:27:51 -05:00
Timothy Flynn
dba6401260 LibWebView: Integrate the DevTools server into the WebView application
This adds a command line option to enable the DevTools server. Here, we
make the application the DevToolsDelegate to reply to requests from the
DevTools server about the state of the application.
2025-02-19 08:45:51 -05:00
Tim Ledbetter
dd819d1dea LibWebView: Add an option to disable painting viewport scrollbars 2025-01-15 12:33:53 +00:00
Ali Mohammad Pur
7e20f4726f LibDNS+LibWeb+Ladybird+RequestServer: Let there be DNS over TLS
This commit adds our own DNS resolver, with the aim of implementing DoT
(and eventually DoH, maybe even DNSSEC etc.)
2024-11-20 21:37:58 +01:00
Timothy Flynn
652dde5022 LibWebView+UI: Acquire the paths to helper processes inside LibWebView
We no longer need to acquire these paths from the UI and pass them into
LibWebView - we can figure out these paths internally.
2024-11-14 11:47:32 +01:00
Timothy Flynn
bb7dff7dfe LibWebView+UI: Move ownership of application services to LibWebView
LibWebView now knows how to launch RequestServer and ImageDecoderServer
without help from the UI, so let's move ownership of these services over
to LibWebView for de-duplication.
2024-11-14 11:47:32 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWebView/Application.cpp (Browse further)