Commit Graph

3056 Commits

Author SHA1 Message Date
Bastiaan van der Plaat
f8feca5d21 LibWeb: Use directory page when viewing a resource schemed directory URL 2023-12-27 10:54:07 -05:00
Bastiaan van der Plaat
b39d99cf2f LibWeb: Use resource scheme for icons in internal pages 2023-12-27 10:54:07 -05:00
Andrew Kaster
b10fee00eb LibWeb+WebWorker: Convert Workers to use MessagePorts for postMessage
This aligns Workers and Window and MessagePorts to all use the same
mechanism for transferring serialized messages across realms.

It also allows transferring more message ports into a worker.

Re-enable the Worker-echo test, as none of the MessagePort tests have
themselves been flaky, and those are now using the same underlying
implementation.
2023-12-25 12:09:11 +01:00
Timothy Flynn
bacf3cede4 Ladybird+BrowserSettings: Load the NTP/home resource files with LibWeb 2023-12-24 14:09:23 +01:00
Shannon Booth
e2e7c4d574 Everywhere: Use to_number<T> instead of to_{int,uint,float,double}
In a bunch of cases, this actually ends up simplifying the code as
to_number will handle something such as:

```
Optional<I> opt;
if constexpr (IsSigned<I>)
    opt = view.to_int<I>();
else
    opt = view.to_uint<I>();
```

For us.

The main goal here however is to have a single generic number conversion
API between all of the String classes.
2023-12-23 20:41:07 +01:00
Bastiaan van der Plaat
c30911ab10 LibWeb: Hide select chevron icon when appearance: none; 2023-12-23 10:12:36 +01:00
Bastiaan van der Plaat
0f37e0ee89 LibWeb: Add basic input range rendering 2023-12-21 13:17:51 +01:00
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
Torstennator
b65e711929 LibGUI: Add DynamicWidgetContainter
Add a new widget "DynamicWidgetContainer" that is used to group it's
child widgets within an collapsable and detachable container. The
DynmnicWidgetContainer is able to persist it's view state if a config
domain has been provided. Having that set will allow the widget to
restore it's view state automatically.
2023-12-14 09:07:20 -07:00
Nicolas Ramz
cd6c7f3fc4 LibGfx/ILBMLoader: Add support for PC DeluxePaint files 2023-12-13 10:39:13 +00:00
Liav A
dbae1873ec Base: Add manual page for drain(1) 2023-12-12 06:44:10 -05:00
Timothy Flynn
41ffc69c9d LibWebView: Clear the Inspector DOM/accessibility trees upon reset
This prevents rendering stale trees while navigating to a new page. The
old non-WebView inspector widgets behaved this way.
2023-12-10 16:45:08 +01:00
Timothy Flynn
55ec1cbfb5 LibWebView: Allow editing empty DOM text nodes in the Inspector
When a DOM text node is empty, we currently render the node name (which
is "#text") in the Inspector. This is just to prevent displaying nothing
at all, which looks a bit off. However, the patch to allow editing text
fields neglected to allow editing these empty fields.

This patch attaches the original text data as a data attribute, much
like we do for DOM attributes. That is used as the editable text in the
inspector, and the empty text fields are now wrapped in an editable
span.
2023-12-10 09:44:34 +01:00
Timothy Flynn
42c0ac9352 LibWebView: Log the result of taking screenshots to Inspector's console
It probably isn't obvious that screenshots are saved to the user's
Downloads folder, so add a console message to inform them.
2023-12-10 09:44:34 +01:00
Bastiaan van der Plaat
466153e680 Ladybird+LibWeb: Add basic select element support 2023-12-09 22:06:20 +01:00
Sönke Holz
c15e0b6596 Base: Correct IPC socket path in AudioServer's man page 2023-12-09 08:37:32 +00:00
Sönke Holz
7ebf9cb2db Base: Correct path for sysctl variables in sysctl's man page 2023-12-09 08:37:32 +00:00
Timothy Flynn
8162dc5ee6 LibWeb+LibWebView+WebContent: Separate tag/attribute in Inspector menu
It was a bit short-sighted to combine the tag and attribute names into
one string when the Inspector requests a context menu. We will want both
values for some context menu actions. Send both names, as well as the
attribute value, when requesting the context menu.
2023-12-07 10:53:12 +01:00
Timothy Flynn
636ff33d60 LibWebView: Add an escape key handler for DOM-editing <input> fields
Little quality of life improvement I keep reaching for.
2023-12-06 13:04:50 +01:00
Timothy Flynn
0ddc2ea8c4 LibWebView: Add Inspector actions to be used as context menu callbacks
These allow for triggering an edit of a DOM node (as an alternative to
double-clicking), removing a DOM node, and adding/removing DOM node
attributes.
2023-12-06 13:04:50 +01:00
Timothy Flynn
2633ea8c79 LibWeb+LibWebView+WebContent: Add an Inspector IPC to open context menus
The Inspector will have context menu support to manipulate the DOM, e.g.
adding or removing nodes/attributes. This context menu will require some
detailed knowledge about what element in the Inspector has been clicked.
To support this, we intercept the `contextmenu` event and collect the
required information to be sent to the Inspector client over IPC.
2023-12-06 13:04:50 +01:00
Timothy Flynn
05c8d5ba57 Base+Ladybird: Move Ladybird-related HTML files to their own folder
Pages like the new tab page, error page, etc. all belong solely to
Ladybird, but are scattered across a couple of subfolders in Base. This
moves them all to Base/res/ladybird.
2023-12-04 19:46:35 -05:00
Bastiaan van der Plaat
2107ab823d LibWeb: Add basic HTML meter element support 2023-12-04 19:54:43 +00:00
Timothy Flynn
65a9eae142 LibWebView: Draw some knurling on the draggable Inspector separator 2023-12-04 13:58:20 +01:00
Timothy Flynn
6d743ce9e8 LibWebView: Allow editing the DOM through the Inspector WebView
This allows a limited amount of DOM manipulation through the Inspector.
Users may edit node tag names, text content, and attributes. To initiate
an edit, double-click the tag/text/attribute of interest.

To remove an attribute, begin editing the attribute and remove all of
its text. To add an attribute, begin editing an existing attribute and
add the new attribute's text before or after the existing attribute's
text. This isn't going to be the final UX, but works for now just as a
consequence of how attribute changes are implemented. A future patch
will add more explicit add/delete actions.
2023-12-04 01:33:57 +01:00
Timothy Flynn
b9902fef36 LibWebView: Add a draggable separator between the two Inspector panes 2023-12-02 22:54:06 +01:00
Timothy Flynn
d8a700d9be LibWebView: Implement a JavaScript console tab in the Inspector
This adds a JS console to the bottom section of the Inspector WebView.
Much of this code is based on the existing WebView::ConsoleClient, but
ported to fit the inspector model. That is, much of the code from that
class is now handled in the Inspector's JS.
2023-12-02 10:34:22 +01:00
Timothy Flynn
a7ff65a0c6 LibWebView: Use querySelectorAll to find hoverable tree nodes
We don't need a live HTMLCollection here, so let's use querySelectorAll
to instead iterate over a static NodeList.
2023-11-30 14:08:53 +01:00
Timothy Flynn
030b90b79d LibWebView: Move the Inspector JS and CSS to independent files
These are much easier to work with in their own files with syntax
highlighting and other IDE-friendliness.
2023-11-30 14:08:53 +01:00
Liav A
93e172895a Kernel: Add /sys/kernel/request_panic node to simulate a kernel panic
When writing to /sys/kernel/request_panic it will do a kernel panic.
Trying to truncate the node will result in kernel panic with a slightly
different message.
2023-11-27 09:24:52 -07:00
Andrew Kaster
1602663b9e LibWeb+WebWorker: Implement a first cut of post_message for Workers
This implementation completely ignores MessagePorts, and manually plumbs
data through LocalSockets.
2023-11-24 08:41:38 +01:00
Nicole
7ca4e4a967 Base: Add some emojis
Adds:
U+1F390 fully-qualified     # 🎐 E0.6 wind chime
U+1F54D fully-qualified     # 🕍 E1.0 synagogue
U+1F54B fully-qualified     # 🕋 E1.0 kaaba
U+1F95C fully-qualified     # 🥜 E3.0 peanuts
U+1F3E6 fully-qualified     # 🏦 E0.6 bank
U+1F690 fully-qualified     # 🚐 E1.0 minibus
2023-11-22 08:52:58 +00:00
Xexxa
bd8b907f53 Base: Adjust emoji
🏂 - U+1F3C2 SNOWBOARDER
Reuse snow colour from U+1F3BF.

🍨 - U+1F368 ICE CREAM
Reuse ice cream colour from U+1F366.

🧨 - U+1F9E8 FIRECRACKER
Make the lit fuse reflect on the firecracker.

🤖 - U+1F916 ROBOT
🗑️ - U+1F5D1 WASTEBASKET
Make shadow more symmetrical.

💂 - U+1F482 GUARD
💂‍♂️ - U+1F482 U+200D U+2642 MAN GUARD
💂‍♀️ - U+1F482 U+200D U+2640 WOMAN GUARD
👸 - U+1F478 PRINCESS
Make colors more consistent with U+1F468_U+200D_U+1F9B1.

🐳 - U+1F433 SPOUTING WHALE
Reuse water colour from U+1F3C4_U+200D_U+2642, adjust foam color to
not be #FFFFFF.

🪿 - U+1FABF GOOSE
🍊 - U+1F34A TANGERINE
🍋 - U+1F34B LEMON
🍎 - U+1F34E RED APPLE
🍏 - U+1F34F GREEN APPLE
🎨 - U+1F3A8 ARTIST PALETTE
Add shadow.

🍐 - U+1F350 PEAR
Add shadow, remove unnecessary padding.

🕯️ - U+1F56F CANDLE
Make flame reflect on the candle, remove unnecessary padding.

🐣 - U+1F423 HATCHING CHICK
🍶 - U+1F376 SAKE
💺 - U+1F4BA SEAT
🖍️ - U+1F58D CRAYON
Remove unnecessary padding.
2023-11-21 20:16:06 -05:00
Adam Harald Jørgensen
67bc7cecbb Base: Fix indentation in completion function for kill 2023-11-16 23:07:31 +03:30
Adam Harald Jørgensen
66955b82a7 Base: Add completion for cd that suggests only directories 2023-11-16 23:07:31 +03:30
Thomas Voss
785f95d0af head(1): Fix typo in flag name
The shorthand for the ‘--bytes’ flag is ‘-c’, not ‘-b’.
2023-11-16 19:54:04 +01:00
Andrew Kaster
124c378472 LibWeb+WebWorker: Move worker execution into a new WebWorker process
We now create a WorkerAgent for the parent context, which is currently
only a Window. Note that Workers can have Workers per the spec.

The WorkerAgent spawns a WebWorker process to hold the actual
script execution of the Worker. This is modeled with the
DedicatedWorkerHost object in the WebWorker process.
A start_dedicated_worker IPC method in the WebWorker IPC creates the
WorkerHost object. Future different worker types may use different IPC
messages to create their WorkerHost instance.

This implementation cannot yet postMessage between the parent and the
child processes.

Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-11-15 12:56:33 +01:00
david072
13b98d01c0 Taskbar/QuickLaunchWidget: Properly save Quick Launch Entries
The entries in the QuickLaunchWidget are now saved properly. This means
that the format with which they are saved needed to be changed, since we
now also need to store the order of the entries. To do this, the entries
are now saved using the following value format: "<index>:<path>". When
loading, we simply parse this structure out and sort by the index,
before parsing the path into `QuickLaunchEntry`s.
2023-11-09 23:35:52 +01:00
Bastiaan van der Plaat
1cdbfc2ff1 LibWeb: Add ol start and li value attributes support 2023-11-09 16:10:54 +01:00
Adam Harald Jørgensen
a1cdfe1b54 Shell: Add support for showing shortened prompt path with ellipsis 2023-11-07 07:46:52 +03:30
Adam Harald Jørgensen
4febd31dba Shell: Shorten prompt path if integer is provided with "\w" option 2023-11-07 07:46:52 +03:30
Adam Harald Jørgensen
52a55fdd6d Base: Fix case in descriptions of the new prompt formatting options 2023-11-07 07:46:52 +03:30
Lucas CHOLLET
26a3be17c8 Userland: Register TIFF as a supported image file type
This includes both .tiff and .tif extensions.
2023-11-06 12:29:30 -07:00
Liav A
26f96d2a42 Kernel+Userland: Add option for duration of /dev/beep producing sound 2023-11-03 15:19:33 +01:00
Gurkirat Singh
60640fe38d Utilities: Implement slugify using AK/Slugify 2023-10-30 10:39:59 +00:00
implicitfield
4b60a99573 Shell: Remove '#' from the list of acceptable bareword characters
This stops the shell from always interpreting '#' as the start of a
comment in non-Posix mode.
2023-10-29 01:35:40 +03:30
Bastiaan van der Plaat
5a7f43ad38 Maps: Add favorites panel with favorite places management 2023-10-26 17:23:54 -06:00
Adam Harald Jørgensen
5fb748b333 Base: Document new Shell prompt formatting options 2023-10-26 22:33:38 +03:30
Timothy Flynn
a39eebeb74 LibWebView: Reject cookies whose domain is on the Public Suffix List 2023-10-26 11:06:49 +02:00
Timothy Flynn
e8d921820a Browser+BrowserSettings: Migrate to LibWebView for search engines 2023-10-23 12:12:36 -04:00