Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Kaster
0bf79b1f3b Ladybird/CMake: Enable compile_commands.json by default
This should help IDEs have an easier time indexing serenity files.
2022-12-25 07:58:58 -07:00
Andreas Kling
5ac5fef468 Ladybird: Add a very simple DOM inspector
We use a ModelTranslator to expose a DOMTreeModel from LibWebView :^)
It allows you to select the currently inspected node, which causes
the engine to render a little box model overlay above the web content.
2022-12-25 07:58:58 -07:00
Andreas Kling
2a021084e5 Ladybird: Rename WebView to SimpleWebView
This will allow us to share code with LibWebView from SerenityOS.
(This would otherwise not work, since its "WebView" namespace collides
with our "WebView" class.)

Also, we should eventually move towards a more sophisticated
multi-process WebView like OOPWV.
2022-12-25 07:58:58 -07:00
Andreas Kling
e73c2c7029 Ladybird/WebView: Move WebSocket stuff to its own files 2022-12-25 07:58:58 -07:00
Andreas Kling
4cc82ac638 Ladybird/WebView: Move our PageClient to its own file
And rename it to PageClientLadybird while we're at it, it's not
"headless" by any means.
2022-12-25 07:58:58 -07:00
Andrew Kaster
488da351c0 Ladybird/CMake: Install resources and Lagom libraries alongside ladybird
This setup should allow the package maintainers who are looking to
distribute ladybird on their distributions to use CMake to install
ladybird using cmake install rules rather than having to write their own
2022-12-25 07:58:58 -07:00
Andreas Kling
ef757f33da Ladybird: Implement the Web::Platform::ImageCodecPlugin interface
...and move it to separate files while we're at it.
2022-12-25 07:58:58 -07:00
Andrew Kaster
4334929323 Ladybird/CMake: Link against LibSoftGPU to fix WebGL with serenity LibGL
In the future, ladybird should probably use a QOpenGLWidget or similar
platform plugin to use the native GL implementation instead of the one
in serenity.
2022-12-25 07:58:58 -07:00
Andreas Kling
8a657eaa34 Ladybird: Add a FontPlugin and try much harder to find suitable fonts
Instead of only looking at the SerenityOS default fonts, we now also
look recursively in /usr/share/fonts for suitable fonts that we can
load and use.
2022-12-25 07:58:58 -07:00
Andreas Kling
37d844fd66 Ladybird: Use only the Qt event loop to speed everything up :^)
This patch removes the dual-event-loop setup, leaving only the Qt event
loop. We teach LibWeb how to drive Qt by installing an EventLoopPlugin.

This removes the 50ms latency on all UI interactions (and network
requests, etc.)
2022-12-25 07:58:58 -07:00
Filiph Sandström
91e5b6d4f5 Ladybird: Add SettingsDialog stub 2022-12-25 07:58:58 -07:00
Filiph Sandström
a838004725 Ladybird: Add Settings class 2022-12-25 07:58:58 -07:00
Andrew Kaster
261f078a28 Ladybird/Meta: Add Android build
Build an Android APK file that, when configured properly in Qt Creator,
can be used to deploy the browser to an Android device.

The current build requires NDK 24, targets no less than Android API 30,
and Qt Creator 6.4.0.
2022-12-25 07:58:58 -07:00
Andreas Kling
aa5f886128 Ladybird: Add quick & dirty port of the JS console from Browser :^) 2022-12-25 07:58:58 -07:00
Daniel Bertalan
af5250b2cb Ladybird: Fix compilation on macOS/Clang
- Silences the -Wuser-defined-literals warning which is triggered by our
  use of the `sv` suffix for StringView
- Removes an unused captured `this` pointer [-Wunused-lambda-capture]
- Changes a JSONArray.h include to JSONObject.h to get the definition
  for `JSONValue::serialize`. This is needed because template functions
  are not exported for dylibs on macOS. This is a hack; the JSON headers
  should be refactored so that each one includes the definition of
  the template functions it sees. -- Maybe we should build with
  -fvisibility-inlines-hidden on Linux to catch issues like this?
2022-12-25 07:58:58 -07:00
Andreas Kling
80636d6779 Ladybird: Implement basic cookie support
We import the CookieJar class from Browser to do the work. Long-term
we should look for a way to share this code with Browser.
2022-12-25 07:58:58 -07:00
Matthew Costa
7681ef25da Ladybird: Expanded toolbar with browser history and home button
This patch takes the browser history code from the Serenity browser and
wires it up to the QT interface. This is tied in with a few extra
toolbar buttons associated with each tab.
2022-12-25 07:58:58 -07:00
Matthew Costa
8af5b49cba Ladybird: Rudimentary tabbed browsing support
This patch removes the browser WebView from the window and places it
inside a Tab object, all wrapped up in a QT tab control. So far you can
create tabs, but can't close them.
2022-12-25 07:58:58 -07:00
Andreas Kling
f96b53f118 Ladybird: Stop using deprecated Qt API and re-enable deprecated warnings 2022-12-25 07:58:58 -07:00
Andreas Kling
419d3ec646 Ladybird: Use QtNetwork for HTTP and HTTPS requests
Until we can get our own RequestServer infrastructure up and running,
running the TLS and HTTP code in-process was causing lots of crashes
due to unexpected reentrancy via nested event loops.

This patch adds a simple backend for HTTP and HTTPS requests that simply
funnels them through QNetworkAccessManager.
2022-12-25 07:58:58 -07:00
Andrew Kaster
74fda4aff5 Ladybird/Meta: Convert to CMake build 2022-12-25 07:58:58 -07:00