Commit graph

2084 commits

Author SHA1 Message Date
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
Timothy Flynn
f05b0bfd5f LibWeb+LibWebView+WebContent: Convert about:settings to a WebUI 2025-03-28 07:31:10 -04:00
Timothy Flynn
c75e40180c LibWeb+LibWebView+WebContent: Convert about:processes to a WebUI 2025-03-28 07:31:10 -04:00
SINF-KEN
1a34676046 UI: Style the crash page and update error page image
- Modified the error page
- changed the error/crash page

Co-authored-by: notnotnescap <97590612+nescapp@users.noreply.github.com>
2025-03-26 19:39:24 +00:00
Timothy Flynn
b169a98495 LibWeb+LibWebView+WebContent: Introduce a basic about:settings page
This adds a basic settings page to manage persistent Ladybird settings.
As a first pass, this exposes settings for the new tab page URL and the
default search engine.

The way the search engine option works is that once search is enabled,
the user must choose their default search engine; we do not apply any
default automatically. Search remains disabled until this is done.

There are a couple of improvements that we should make here:

* Settings changes are not broadcasted to all open about:settings pages.
  So if two instances are open, and the user changes the search engine
  in one instance, the other instance will have a stale UI.

* Adding an IPC per setting is going to get annoying. It would be nice
  if we can come up with a smaller set of IPCs to send only the relevant
  changed settings.
2025-03-22 17:27:45 +01:00
Timothy Flynn
a69ecc3943 UI: Add a default CSS file for internal Ladybird pages
In order to maintain a consistent look and feel between internal about:
pages going forward, let's use a central CSS file to define Ladybird
colors and some common form control styles.
2025-03-22 17:27:45 +01: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
810d04b3f4 LibWeb+LibWebView+WebContent: Remove the built-in Inspector 2025-03-15 19:09:40 +01:00
SINF-KEN
96a5b97131 Base: Add new error page
This commit introduces a new error page.

Co-authored-by: NotNotNescap <nescap@tuta.com>
2025-03-12 11:56:15 -04:00
Gingeh
ec1f7f87ea Base: Make about:about respect the chosen color scheme 2025-03-12 10:41:06 +00:00
Gingeh
5838c73a72 LibWeb: Restrict weird about:foo URIs
This commit:
- Prevents path traversal via the about: scheme
- Prevents loading about:inspector
- Requires about: URIs to be opaque paths
- Prevents crashes with invalid percent encoded paths
2025-03-12 10:41:06 +00:00
Sam Atkins
7be78ec044 Inspector: Keep property filter across tabs
Remember the query, so that if you're filtering for "color" on the
computed style tab, and switch to the resolved style tab, it's filtered
for "color" too.

This means we also can save looking up the filter text when a new node
is inspected.
2025-02-17 12:55:30 +01:00
Sam Atkins
4c024e41cb Inspector: Do less work when filtering properties
As soon as a row has a cell that matches, we can stop looking.

If the search text is empty, we can skip matching altogether.
2025-02-17 12:55:30 +01:00
Sam Atkins
37ca2fc25c Inspector: Preserve zebra-striping when hiding table rows
Instead of simply setting rows to hidden, add a class so that we can
only include visible rows when applying zebra-striping.
2025-02-17 12:55:30 +01:00
Sam Atkins
a10984ea03 Inspector: Keep current property filter when switching selected node
If you have a search filter and then click on a different node, this now
applies the filter to the new node's properties, instead of showing all
of them.
2025-02-17 12:55:30 +01:00
Timothy Flynn
79d6d5a7fa Base: Revert usage of color-scheme in the Inspector
The usage of color-scheme was introduced in commit:
ce5cd012b9

This reverts the Inspector to use self-selected colors, as the default
color-scheme colors do not look great in this window.
2025-02-16 09:20:25 +01:00
aplefull
6e61cc5a1e Inspector: Add ability to filter css properties 2025-02-13 11:45:07 +00:00
Gingeh
ce5cd012b9 LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
Kostya Farber
3e7faae647 Qt: Add box icon to line box debug menu action 2024-10-26 17:41:16 +02:00
Sam Atkins
d5ba665f89 Base: Remove old LibWeb demo pages
These used to serve as tests before we had proper testing infrastructure
set up. Now, they just sit forgotten about, gathering dust. Let's remove
them.
2024-10-03 11:06:29 +02:00