From 127a3d6f795268d552816073a6ae5c063213672f Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sun, 30 Mar 2025 16:21:24 -0400 Subject: [PATCH] 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. --- Base/res/ladybird/about-pages/settings.html | 180 ++++++++++++------ Libraries/LibWebView/Autocomplete.cpp | 194 ++++++++++++++++++++ Libraries/LibWebView/Autocomplete.h | 44 +++++ Libraries/LibWebView/CMakeLists.txt | 1 + Libraries/LibWebView/Forward.h | 2 + Libraries/LibWebView/Settings.cpp | 29 +++ Libraries/LibWebView/Settings.h | 6 + Libraries/LibWebView/WebUI/SettingsUI.cpp | 36 +++- Libraries/LibWebView/WebUI/SettingsUI.h | 6 +- 9 files changed, 432 insertions(+), 66 deletions(-) create mode 100644 Libraries/LibWebView/Autocomplete.cpp create mode 100644 Libraries/LibWebView/Autocomplete.h diff --git a/Base/res/ladybird/about-pages/settings.html b/Base/res/ladybird/about-pages/settings.html index fb871caf27a..00a99115f1f 100644 --- a/Base/res/ladybird/about-pages/settings.html +++ b/Base/res/ladybird/about-pages/settings.html @@ -52,6 +52,12 @@ float: left; } + hr { + height: 1px; + background-color: var(--border-color); + border: none; + } + .card { background-color: var(--card-background-color); @@ -72,6 +78,10 @@ padding: 20px; } + .card-body > hr { + margin: 0 8px 16px 8px; + } + .card-group { margin-bottom: 20px; } @@ -165,10 +175,6 @@ } dialog .dialog-body hr { - height: 1px; - background-color: var(--border-color); - border: none; - margin: 8px 4px 10px 4px; } @@ -283,17 +289,36 @@
- +
-