Commit graph

26 commits

Author SHA1 Message Date
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
Aaron Dewes
eecee7369f Ladybird: Clean up tab bar autohide
Qt has this feature built-in, so there's no need to create a custom
implementation
2022-12-25 07:58:58 -07:00
Andreas Kling
97964bc710 Ladybird/BrowserWindow: Add UI for switching preferred CSS color scheme 2022-12-25 07:58:58 -07:00
Timothy Flynn
4850a2d272 Ladybird: Update pointer to current tab when the selected tab changes
This allows requests like dumping the DOM tree to be forwarded to the
correct tab. Otherwise, the event would be forwarded to the most
recently created tab.
2022-12-25 07:58:58 -07:00
Andreas Kling
0f1644f62d Ladybird: Switch to next/previous tab with Ctrl+PageDown/PageUp 2022-12-25 07:58:58 -07:00
Andreas Kling
27b9cd13ee Ladybird: Focus the location editor when creating a new tab
This lets you start typing a new URL right after pressing Ctrl+T.
2022-12-25 07:58:58 -07:00
Andreas Kling
aa27112d78 Ladybird: Tweak the QTabWidget look 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
Alec Murphy
700c709c00 Ladybird: Add Ctrl-W action to close current tab (#28) 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
Filiph Sandström
d1d6a204fc Ladybird: Replace StatusBar with ToolTip
This gives the actual webcontent more space to work with,
it also emulates how other browsers does it.

In the future we'd like to do something else since only ToolTip
can be visible at the same time.
2022-12-25 07:58:58 -07:00
Filiph Sandström
ea7e637b6e Ladybird: Fix title branding when switching tabs 2022-12-25 07:58:58 -07:00
Filiph Sandström
ace44dc13b Ladybird: Hide TabBar if count <= 1 2022-12-25 07:58:58 -07:00
Andreas Kling
74c71804c7 Ladybird: Add "View Source" menu action (Ctrl+U) 2022-12-25 07:58:58 -07:00
Andreas Kling
487544d7b4 Ladybird: Port over part of the "Debug" menu from the SerenityOS browser
This is pretty messy, but we have to start somewhere. Eventually we
should find a way to share this code with SerenityOS.
2022-12-25 07:58:58 -07:00
Andreas Kling
303fda074a Ladybird: Fix build with Qt 6.2.4 2022-12-25 07:58:58 -07:00
Matthew Costa
67ab6dd2e6 Ladybird: Allow browser tabs to be closed
This is a small patch which wires up the tab close button.
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
69d264828f Ladybird: Add a "Reload" action to reload the current URL 2022-12-25 07:58:58 -07:00
Matthew Costa
7bf3010185 Ladybird: Trigger browser to quit when the main window is closed
This patch adds an event handler to the main window which allows it to
respond to a user closing the window. This event is then passed on to
the LibCore event loop, which allows the application quit itself.
Previously the application would hang, only running in the background,
until killed by an external force.
2022-12-25 07:58:58 -07:00
Keir Davis
95e3e06a1e Ladybird: Add Favicon to the window 2022-12-25 07:58:58 -07:00
Andreas Kling
da19b78dea Ladybird: Don't set a fixed height on the location edit 2022-12-25 07:58:58 -07:00
Andreas Kling
f5d033b8ba Ladybird: Show the web page title in the window titlebar :^) 2022-12-25 07:58:58 -07:00
Andreas Kling
8b7000e151 Ladybird: Add a location bar and allow navigating to new pages :^) 2022-12-25 07:58:58 -07:00