1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
Commit graph

2073 commits

Author SHA1 Message Date
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
Gingeh
2e5edcf27e LibWeb: Use substring matching for content filters 2024-09-28 14:40:48 +02:00
Chase Willden
9d82e81124 Base: Navigate DOM tree with arrows 2024-09-27 13:33:31 +01:00
Timothy Flynn
aef85a83bd Base: Import the Noto Emoji font for LibWeb tests only
The Noto Emoji font is licensed under the Open Font License. Let's use
it for LibWeb tests, to ensure we use the same emoji font across all
platforms.
2024-09-21 08:57:54 +02:00
Timothy Flynn
f83d082980 LibWebView: Alternate the color of inspector table rows
This makes large tables a bit easier to read.
2024-09-08 09:45:39 +02:00
Timothy Flynn
fc809f9755 LibWebView: Add context menu support to the Inspector's cookie table
The menu can currently support deleting a specific cookie or all cookies
for the current page.
2024-09-07 11:10:27 +02:00
Timothy Flynn
3c5650f846 LibWebView: Add a storage tab to the Inspector to manage cookies
This adds a storage tab which contains just a cookie viewer for now. In
the future, storage like Local Storage and Indexed DB can be added here
as well.

In this patch, the cookie table is read-only.
2024-09-07 11:10:27 +02:00
Timothy Flynn
2c35e272ba LibWebView: Migrate the Inspector's HTML to its own HTML file
It's getting a bit unwieldy to maintain as an inlined string. Move it to
its own file so it can be edited with syntax highlighting and other IDE
features.
2024-09-07 11:10:27 +02:00
Timothy Flynn
440f40fde6 LibWebView: Clear the style and font tabs when the Inspector is reset 2024-09-07 11:10:27 +02:00
Aliaksandr Kalenik
4e9d6a543a Everywhere: Remove bitmap emojis inherited from SerenityOS
These are no longer used since we switched to using the system emoji
font.
2024-09-06 08:30:30 -04:00
Sam Atkins
da171c3230 Inspector: Add a basic style sheet inspector
Choosing options from the `<select>` will load and display that style
sheet's source text, with some checks to make sure that the text that
just loaded is the one we currently want.

The UI is a little goofy when scrolling, as it uses `position: sticky`
which we don't implement yet. But that's just more motivation to
implement it! :^)
2024-09-03 10:12:07 +01:00
Sam Atkins
ced7b6de5e Inspector: Remove border-radius for tab areas
This wasn't visible, until I tried adding a top toolbar to a tab area,
which made it look silly.
2024-09-03 10:12:07 +01:00