2103 Commits

Author SHA1 Message Date
Timothy Flynn
e1f731a514 Base: Format internal Ladybird pages with prettier
These are currently not checked by CI.
2026-04-22 11:22:08 -04:00
Timothy Flynn
6d063e2aa4 Base: Add about:bookmarks to about:about 2026-04-22 11:22:08 -04:00
mikiubo
131014427c LibWebView: Add bookmark import/export to about:bookmarks
Implement bookmark import/export in about:bookmarks using Netscape
bookmark HTML in JavaScript.
Import parsed items into BookmarkStore under an "Imported Bookmarks"
folder, and treat internal WebUI about: pages as potentially
trustworthy so SecureContext APIs are available there.
2026-04-22 08:02:15 -04:00
Timothy Flynn
06796f5f7f LibURL+LibWeb+LibWebView: Convert about:version to a proper WebUI
Passing the browser command line and executable path to every WebContent
process just in case we load about:version always felt a bit weird. We
now use the WebUI framework to load this information on demand.
2026-04-21 06:59:11 -04:00
Nicolas Danelon
ea22c19ab3 Base: Improve about:version and about:processes
This patch updates the about:version page to use the shared Ladybird
WebUI styling and present version, build, and runtime details in cards.

It also adds the Ladybird logo and a page title to about:processes,
without otherwise changing the process table behavior.
2026-04-19 22:53:59 +02:00
Andreas Kling
c249f0324b LibWebView: Let Settings clear browsing history
Route the existing Clear Browsing Data dialog through HistoryStore's
time-range deletion path as well. That makes the Settings action
remove visited pages from persisted history and from history-backed
address bar suggestions instead of only touching cache and site data.

Add a history checkbox to the dialog, thread its state through the
Settings WebUI message, and cover remove_entries_accessed_since() for
both transient and persisted stores in TestHistoryStore.
2026-04-16 21:01:28 +02:00
Timothy Flynn
79893b9cef LibWeb+LibWebView+WebContent: Add a setting to control autoscrolling 2026-04-13 13:01:45 -04:00
Timothy Flynn
b544e42809 LibWebView+UI: Add an about:bookmarks page to manage bookmarks
This page renders the bookmarks as a tree and hook context menu events
up to the UI's bookmarks bar context menus to allow editing bookmarks.
Users can also drag-and-drop bookmark items around.
2026-04-09 10:08:06 -04:00
Timothy Flynn
6bf2279dfe Base: Extract some about:settings CSS classes to a common file
We will re-use the card classes in about:bookmarks.
2026-04-09 10:08:06 -04:00
James Raspass
a629317840 Base: Use native light dismiss for settings dialogs
Rather than rolling our own JavaScript to detect clicks outside of the
dialogs and close them we can set the closedby attribute to "any" which
will do the same thing.

This should also handle platform-specific user actions like pressing the
Escape key but this doesn't currently work so keep our JavaScript to
handle that and add a FIXME.
2026-04-07 21:27:50 -04:00
Timothy Flynn
746448f8e0 Base: Support opening a specific settings tab via anchors
For example, about:settings#privacy will now open the settings page to
the Privacy tab.
2026-03-05 10:00:32 -05:00
Timothy Flynn
57f7f22e91 Base: Add a button to reset the new tab page URL
This button resets the URL back to about:newtab.
2026-03-05 10:00:32 -05:00
Timothy Flynn
809ef1ac6e Base+LibWebView: Organize the settings page into tabs
The tabless page with an ever-growing list of vertical cards was getting
a bit disorganized. This moves each section of the settings page to be
its own tab, with buttons to switch tabs. Some of this presented the
opportunity to migrate settings from popup dialogs to be directly in the
tab, such as the disk cache settings.

The global "restore defaults" button has also been removed. The more
settings we have, the less sense such a button makes sense. Individual
settings can have a reset option where it makes sense.
2026-03-05 10:00:32 -05:00
Timothy Flynn
ae8181b467 LibWeb+LibWebView+UI: Add a context menu item to toggle fullscreen state 2026-03-01 15:41:43 -06:00
Jelle Raaijmakers
73658137b6 Documentation+Tests: Optimize PNGs using optipng
The wide gamut test file went unused, so it was deleted.
2026-02-23 13:45:04 +01:00
Timothy Flynn
7d60d0bfb7 LibHTTP+LibWebView+RequestServer: Allow users to set disk cache limits
This adds a settings box to about:settings to allow users to limit the
disk cache size. This will override the default 5 GiB limit. We do not
automatically delete cache data if the new limit is suddenly less than
the used disk space; this will happen on the next request. This allows
multiple changes to the settings in a row without thrashing the cache.

In the future, we can add more toggles, such as disabling the disk
cache altogether.
2026-02-13 10:20:52 -05:00
Timothy Flynn
c5d666ea7b Base: Use title case in settings button
Matches our HMI guidelines.
2026-02-13 10:20:52 -05:00
Timothy Flynn
0bfa5f3e52 Base: Close settings dialogs when the escape key is pressed 2026-02-12 18:29:19 -05:00
Timothy Flynn
25b701296c Base: Remove FIXME from settings UI that won't be addressed
The idea here was to use popovers, which natively support dismissal via
clicking outside the dialog and pressing the escape key. However, unlike
modals, popovers do not make the rest of the document inert. And there
isn't a handy way to achieve this. So while a popover is open, you could
interact with elements behind the dialog, which we don't want.
2026-02-12 18:29:19 -05:00
Tim Ledbetter
e9519b132f Base: Use the correct memory unit suffixes in about::processes
Previously the GB suffix was displayed as BB.
2025-12-01 07:30:23 -05:00
Timothy Flynn
c80b698589 LibWebView+UI: Remove some now-superfluous debug menu items
No need to keep these actions around, users can use the about:settings
page instead.
2025-11-12 09:06:21 -05:00
Timothy Flynn
c34119cb29 LibWebView: Add a settings section to manage browsing data caches
This adds a section to allow users to clear the HTTP disk cache and
cookies / local storage / session storage. There are a few options to
limit this action to a specific time range (e.g. "last hour"). The
user is informed how much disk space is being used currently, and how
much will be removed given the selected time range.

The idea is that in the future, we can add more settings here to auto-
delete data on exit, disable caching altogether, etc.
2025-11-12 09:06:21 -05:00
Timothy Flynn
019c529c07 Meta: Increase the line length enforced by prettier to 120
This matches our coding style recommendation in CodingStyle.md, and
matches our python formatting.
2025-10-31 19:55:50 -04:00
Timothy Flynn
b4df857a57 LibWeb+LibWebView+WebContent: Replace DNT with GPC
Global Privacy Control aims to be a replacement for Do Not Track. DNT
ended up not being a great solution, as it wasn't enforced by law. This
actually resulted in the DNT header serving as an extra fingerprinting
data point.

GPC is becoming enforced by law in USA states such as California and
Colorado. CA is further working on a bill which requires that browsers
implement such an opt-out preference signal (OOPS):

https://cppa.ca.gov/announcements/2025/20250911.html

This patch replaces DNT with GPC and hooks up the associated settings.
2025-09-16 10:38:20 +02:00
InvalidUsernameException
08162fb9af LibWebView+Base: Remove unnecessary scrollbar from error pages
I've been looking at the crash-page too much recently and the slight
scrollbar caused by the padding has been annoying me.
2025-09-08 12:02:44 +01:00
rmg-x
9b0157523d Base+UI: Implement user interface for defaultZoomLevelFactor setting 2025-08-26 06:31:22 -04:00
Sam Atkins
d65d46f4f0 UI/Qt: Add "Dump CSS Errors" menu item
Dumps out any CSS errors that have appeared since launch.
2025-08-04 10:50:09 +01:00
Emmanuel Ferdman
d821af1f24 Base: Stop relying on const-ness not being enforced by LibJS 2025-08-03 05:37:34 -07:00
Jelle Raaijmakers
0fccc75fd7 Meta: Remove bookmarks.json
This seems to be unused.
2025-07-11 14:04:23 +02:00
Ali Mohammad Pur
4b5664f867 LibWebView+RequestSever: Wire up a validate-DNSSEC setting option to RS 2025-06-11 18:16:29 +02:00
wesinator
4c4af5492d Base: BrowserContentFilters.txt - add 51.la tracking domains
51.la is a CN language tracking site
2025-06-04 20:40:31 +01:00
Timothy Flynn
1a9e78a774 LibWebView: Disable autocomplete when search is disabled
Search suggestions don't make much sense when search itself is disabled.
We now auto-disable autocomplete when search is disabled.
2025-05-11 11:48:02 -04:00
Timothy Flynn
9267172e28 Base: Simplify enabling search and autocomplete
Currently, enabling search is a bit hokey. You have to click a checkbox
to get the search engines to show up, then you have to click a drop down
to select an engine. Let's go with a simpler approach; now you only have
to interact with the drop down.
2025-05-11 11:48:02 -04:00
Timothy Flynn
840157191d Base: Name the settings .dialog-description class a bit more generic
It will be used outside of dialogs.
2025-05-11 11:48:02 -04:00
Bastiaan van der Plaat
4d84e1a8bc Base: Add about:settings and about:processes to about:about page 2025-05-02 12:21:37 +02:00
Timothy Flynn
234c07adc9 LibWebView: Split about:settings into modules
The about:settings page has gotten beefy enough that it is a bit of a
paint to manage in a single HTML file. This patch breaks the settings
into several modules to make this page easier to mantain.

Modules have some nice benefits over classic scripts, such as enabling
strict mode by default, and allowing each module to function without
polluting the global object.
2025-04-23 19:58:58 -04:00
Ali Mohammad Pur
2c13504bfc LibWebView+RequestServer: Add some UI for DNS settings 2025-04-22 18:05:07 -04:00
Gingeh
972547635f LibWeb: Dispatch pointer events to ::backdrop originating element 2025-04-09 12:10:42 +01:00
Gingeh
4b9f5c6fb8 LibWeb: Generate ::backdrop pseudo-elements 2025-04-09 12:10:42 +01:00
Timothy Flynn
2810071a9c LibWebView: Support custom search engines
This allows the user to store custom search engines via about:settings.
Custom engines will be displayed below the builtin engines in the drop-
down to select the default engine.

A couple of edge cases here:

1. We currently reject a custom engine if one with the same name already
   exists. In the future, we should allow editing custom engines.

2. If a custom engine which was the default engine is removed, we will
   disable search rather than falling back to any other engine.
2025-04-06 13:45:10 +02:00
Timothy Flynn
9cab5dc0c9 Base: Consolidate a couple of about:settings container classes 2025-04-06 13:45:10 +02:00
Timothy Flynn
f242920cc9 LibWebView: Add language settings to about:settings
This implements a setting to change the languages provided to websites
from `navigator.language(s)` and the `Accept-Language` header. Whereas
the existing Qt settings dialog allows users to type their language of
choice, this setting allows users to select from a predefined list of
languages. They may choose any number of languages and their preferred
order.

This patch only implements the persisted settings and their UI. It does
not integrate the choses languages into the WebContent process.
2025-04-04 10:16:32 +02:00
Timothy Flynn
aad95d8d9d Base: Generalize some about:settings CSS classes
The dialog classes here have specific names that will be used in another
dialog. This patch renames them to be more generic. And moves a border
style to not assume a dialog-footer element will exist.
2025-04-04 10:16:32 +02:00
Timothy Flynn
c8d6890ba2 Base: Write "websites" as a single word on about:settings
Although "web site" was originally two words, it is now canonically one
word.
2025-04-04 10:16:32 +02:00
Timothy Flynn
1be3e7fd8a LibWebView: Add do-not-track setting to about:settings 2025-04-02 14:16:18 -04:00
Timothy Flynn
49dae536a7 Base: Replace bespoke input switch with native element
Turns out we support <input type=checkbox switch>, so let's use it!
2025-04-02 14:16:18 -04:00
Timothy Flynn
e879fd29b3 Base: Use correct color code for Slate Blue 100 2025-04-02 11:41:01 -04:00
Timothy Flynn
5d2e6ffe30 LibWebView: Add autocomplete settings to about:settings
This implements an autocomplete engine inside LibWebView, to replace the
engine currently used by Qt. Whereas Qt uses the Qt Network framework to
perform autocomplete requests, LibWebView uses RequestServer. This moves
downloading this untrusted data out of the browser process.

This patch only implements the persisted settings and their UI. It does
not integrate this engine into the browser UI.
2025-04-02 08:52:45 -04:00
Timothy Flynn
ed265b568d LibWebView+WebContent+UI: Migrate to the new autoplay settings
This removes the old autoplay allowlist file in favor of the new site
setting. We still support the command-line flag to enable autoplay
globally, as this is needed for WPT.
2025-03-30 16:18:57 +01:00
Timothy Flynn
223b04f087 LibWebView: Add autoplay settings to about:settings
The idea with the UI here is that it will serve as a generic component
for all site settings, such as autoplay, notifications, etc. When the
site settings dialog is opened, it is filled with the requested setting
data, and messages sent to the browser process are based on the setting.

This patch only implements the UI and persisted settings. It does not
apply autoplay changes to the WebContent process.
2025-03-30 16:18:57 +01:00