Commit graph

3180 commits

Author SHA1 Message Date
Kostya Farber
cec134792e Qt: Add box icon to line box debug menu action
(cherry picked from commit 3e7faae6472d9696637d58f30994199a28dddc01)
2024-11-12 07:14:25 -05:00
Timothy Flynn
1a202901ba LibWebView: Auto-select subtext when editing DOM nodes/attributes
This adds the following behavior for the DOM node/attribute editor in
the Inspector:

* If the user double clicks on an attribute name, the name is selected.
* If the user double clicks on an attribute value, the value text (sans
  the surrounding quotes) is selected.
* Otherwise, double clicks select the entire text range.

(cherry picked from commit 7fff00972d667e7c83ed0336dc8e7f8ddbd91298)
2024-11-12 07:13:58 -05:00
Gingeh
1459d48b26 LibWeb: Use substring matching for content filters
(cherry picked from commit 2e5edcf27e7d2a212043a7ac1b906217b357b964)
2024-11-10 10:46:01 -05:00
Chase Willden
8d21f70c75 Base: Navigate DOM tree with arrows
(cherry picked from commit 9d82e8112493575f78f66b1a0dc65ae0e791e70b)
2024-11-10 10:46:01 -05:00
Gasim Gasimzada
cb77f29de1 LibJS+WebContent: Implement console.table
- Expose table from console object
- Add new Table log level
- Create a JS object that represents table rows and columns
- Print table as HTML using WebContentConsoleClient

(cherry picked from commit 785180dd45ef6dcce4d847e564eca52ed0ad955b)
2024-11-08 22:32:11 -05:00
Timothy Flynn
d906e3c441 LibWebView: Include the document doctype in the exported Inspector HTML
(cherry picked from commit 2dbf846ff89a13ac3d141c72e8a89a3c6721d04b)
2024-11-08 07:44:45 -05:00
Timothy Flynn
335b527f19 LibWeb+LibWebView: Add a button to the Inspector to export its contents
When working on the Inspector's HTML, it's often kind of tricky to debug
when an element is styled / positioned incorrectly. We don't have a way
to inspect the Inspector itself.

This adds a button to the Inspector to export its HTML/CSS/JS contents
to the downloads directory. This allows for more easily testing changes,
especially by opening the exported HTML in another browser's dev tools.

We will ultimately likely remove this button (or make it hidden) by the
time we are production-ready. But it's quite useful for now.

(cherry picked from commit 3ec5c1941f25041c6bf073f2940f6035e084a4e2)
2024-11-08 07:44:45 -05:00
Timothy Flynn
78f2209723 LibWebView: De-duplicate some Inspector CSS rule blocks
After the refactor to use CSS variables for dark-mode colors in commit
ae25146b898ce8900d04c4911f1f0835681aac4e, we had duplicated blocks for
some CSS rules. This patch just unites them into one block.

(cherry picked from commit cde7c91c54574a97ec73a441669cd6dfd07e6f8f)
2024-11-08 07:44:45 -05:00
Tobias Christiansen
61848ff6c2 Inspector: Add "Fonts" tab
This adds another tab to the bottom tabs providing information
regarding the fonts computed for the currently selected DOM node.

(cherry picked from commit c3e69f2fc6ced035f59f3c78f54556a372d2fd14)
2024-11-08 07:44:45 -05:00
Tobias Christiansen
d7993d08dc Inspector: Clean up theming CSS with variables
The media queries for the different themes were all over the place,
they got consolidated in one place specifying all the colors. :^)

(cherry picked from commit ae25146b898ce8900d04c4911f1f0835681aac4e)
2024-11-08 07:44:45 -05:00
kleines Filmröllchen
a6435accd8 Base: Add CrashReporter(1), dbgputstr(2), dump_backtrace(2) manpages
Importantly, these document two nonstandard system
calls that Serenity provides.
2024-10-31 21:59:13 -04:00
Natalia Kenig
d932cc8f64 Base: Add 3 emojis 2024-10-09 19:55:11 -04:00
kleines Filmröllchen
19163e79a3 Everywhere: Format Markdown with prettier
These are the exact changes necessary to get the
next commit to pass pre-commit checks.
2024-10-04 10:46:42 -04:00
Ali Mohammad Pur
8e254334d5 Applications/Weather: Add the first GUI Jakt application 2024-10-02 08:10:54 +02:00
Sam Atkins
4335adf10e Base: Make it clear that the chonky quotation marks do in fact work now
(cherry picked from commit 9738070676154ccf2941c6a2fc99ebc3eaa5f486)
2024-09-28 14:14:28 -04:00
Liav A.
3e7eb30466 Utilities/du: Add an option to print the total size in the end
This is useful when using du on many files and wanting to get a total
size count in the end after iterating on all the directories and files.
2024-09-05 16:36:12 +02:00
Liav A.
c23005a3f0 Utiltities/elfdeps: Add an option to only print library paths
This is useful for argument passing to other utilities on the terminal.
2024-09-05 16:36:12 +02:00
Alec Murphy
99b01816ad Base: Add poweroff alias to shellrc
Just a little QoL improvement for muscle memory :^)
2024-08-23 22:16:50 +02:00
Sam Atkins
a7cf06b288 LibWebView: Sort vendor-prefixed properties last in the inspector
Previously, the legacy `-webkit-foo` properties would all be top of the
list, when they are generally not useful to inspect. Instead, put them
at the bottom, so that users can still see them if they want to, but
they're not in the way.

(cherry picked from commit 113b4da1df7ec65a8686af4e7b91e2f8d4114e2c)
2024-08-13 15:43:00 -04:00
Timothy Flynn
8999ebae52 LibWebView: Use an overflow-x value of 'auto' for Inspector containers
The Inspector looks a bit nicer if we don't paint the horizontal scroll
bars unless we need to.

(cherry picked from commit 5c73a31b4f3e18acb783b6a5c6c9a479d2956de8)
2024-08-13 15:42:42 -04:00
Timothy Flynn
75eea197c2 LibWebView: Improve scrolling of Inspector content containers
Currently, the feel of scrolling containers in the Inspector is a bit
awkward. We make the entire split-view container scrollable, then we
absolutely position the tab control buttons to force them to not scroll.
The result is that the scroll bar is painted over the tab controls, and
the tab content that we actually want to scroll has to scroll under the
tab controls. This never looked quite right.

It was basically:

    <div tab-container> <!-- Scrollable -->
        <div tab-controls /> <!-- Pinned to not be scrollable -->
        <div tab-content /> <!-- The part we actually want to scroll -->
    </div>

This patch moves the "scrollability" to just the tab content. We then
don't need to go out of our way to ensure only the content is actually
scrollable.

So we now have:

    <div tab-container> <!-- Not scrollable -->
        <div tab-controls /> <!-- Not pinned, uses normal layout -->
        <div tab-content /> <!-- Scrollable -->
    </div>

(cherry picked from commit d2c775b0ca202aa9be81ab21b0c71a8f8ac005e3)
2024-08-13 15:42:42 -04:00
Logkos
a1fdac2fc0 Base: Add 4 emojis 2024-07-27 13:29:43 -04:00
logkos
568bd04b61 Base: Add more emojis 2024-07-25 08:27:35 -04:00
Xexxa
d371e68995 Base: Add more emoji
🧙 - U+1F9D9 MAGE
🧙‍♂️ - U+1F9D9 U+200D U+2642 MAN MAGE
🧙‍♀️ - U+1F9D9 U+200D U+2640 WOMAN MAGE
🦟 - U+1F99F MOSQUITO
🏣 - U+1F3E3 JAPANESE POST OFFICE
🏬 - U+1F3EC DEPARTMENT STORE
🚊 - U+1F68A TRAM
🎎 - U+1F38E JAPANESE DOLLS
2024-07-24 08:08:33 -04:00
Timothy Flynn
2bec4276f1 LibWebView: Prevent displaying two scroll bars in the inspector console
We currently display scroll bars for the JS console and its parent tab
container. We want the console output to be separately scrollable from
the tab content, but since both containers are scrollable, we end up
with nested scroll bars. This also makes actually scrolling feel pretty
awkward.

Prevent this by making the tab container non-scrollable when the JS
console is shown.

(cherry picked from commit 4795b9206cfeb2edf573461e02f0c148b9972a36)
2024-07-22 18:27:51 -04:00
circl
6d9fa7cf12 LibWebView: Add keyboard navigation to the Inspector
(cherry picked from commit e59048e90ff5488956cf557836d94334871331e9)
2024-07-22 12:42:17 -04:00
Liav A.
ccf3d29afd Utilities: Introduce the watchfs utility
This utility is meant mainly for debugging purposes, to watch regular
files and directories being modified.
2024-07-21 12:15:44 +02:00
Liav A.
fdcfa23e01 Userland+Base: Introduce userspace implementation for running containers
Together with a first JSON file for bringing up a fully functional
BuggieBox container, we allow users to take advantage of the kernel
unsharing features that were introduced in earlier commits.
2024-07-21 11:44:23 +02:00
Liav A.
0e6624dc86 Kernel: Introduce the unshare syscall family
These 2 syscalls are responsible for unsharing resources in the system,
such as hostname, VFS root contexts and process lists.

Together with an appropriate userspace implementation, these syscalls
could be used for creating a sandbox environment (containers) for user
programs.
2024-07-21 11:44:23 +02:00
Liav A.
dd59fe35c7 Kernel+Userland: Reduce jails to be a simple boolean flag
The whole concept of Jails was far more complicated than I actually want
it to be, so let's reduce the complexity of how it works from now on.
Please note that we always leaked the attach count of a Jail object in
the fork syscall if it failed midway.
Instead, we should have attach to the jail just before registering the
new Process, so we don't need to worry about unsuccessful Process
creation.

The reduction of complexity in regard to jails means that instead of
relying on jails to provide PID isolation, we could simplify the whole
idea of them to be a simple SetOnce, and let the ProcessList (now called
ScopedProcessList) to be responsible for this type of isolation.

Therefore, we apply the following changes to do so:
- We make the Jail concept no longer a class of its own. Instead, we
  simplify the idea of being jailed to a simple ProtectedValues boolean
  flag. This means that we no longer check of matching jail pointers
  anywhere in the Kernel code.
  To set a process as jailed, a new prctl option was added to set a
  Kernel SetOnce boolean flag (so it cannot change ever again).
- We provide Process & Thread methods to iterate over process lists.
  A process can either iterate on the global process list, or if it's
  attached to a scoped process list, then only over that list.
  This essentially replaces the need of checking the Jail pointer of a
  process when iterating over process lists.
2024-07-21 11:44:23 +02:00
circl
5a5c6afd2d LibWeb: Pass network error message to generated error page
(cherry picked from commit b83e82c32cf82d2b9d21271322a4a9161357f081)
2024-07-14 19:57:14 -04:00
Liav A.
a5bc15355d DeviceDeviceMapper: Remove hardcoded list of pluggable once devices
Instead, simplify things by allowing the user to specify a specific
device entry in the configuration file, by specifying a minor number.

The first example of such device is the /dev/beep, as it resides on the
"generic" device node family (as it has a major number of 1).

However, because it can be skipped (if the user disables the beep device
through a kernel commandline option), we can't just create it blindly.
Therefore, when iterating on the configuration file the DeviceMapper
code detects the entry has a specific minor number of 10, and creates
a special DeviceNodeMatch (with a specific minor number being included).
When an event from /dev/devctl that notifies on the existence of the
/dev/beep device arrives, we find this specific match and don't create
an actual DeviceNodeFamily object, but rather blindly create a device
node.Mapper: Remove the concept of pluggable once devices
2024-07-12 18:44:49 -04:00
Liav A.
f8851b9cf2 DeviceMapper: Don't hardcode a list of device node families
Instead, let the user define them through a configuration file which can
be written with the assistance of /sys/kernel/chardev_major_allocs and
/sys/kernel/blockdev_major_allocs files.
2024-07-12 18:44:49 -04:00
Liav A.
aa2d76cd78 Utilities: Add the lsdev utility
This utility lists all devices' major number allocations, for character
and block devices. It can help the user to figure out the DeviceMapper
service manages spawning of device nodes in /dev and other associated
files under the /tmp/system/devicemap directory.
2024-07-06 21:42:32 +02:00
kleines Filmröllchen
e11f84f86d crash: Make everything more architecture-independent
- Document exactly which crash features are available on which
  architectures. There's several interesting crash tests we will want to
  add for specific architectures, such as misaligned memory accesses.
- Don't compile the divide by zero crash test on RISC-V, as they simply
  don't crash here.
- Rename the test for "x86 User Mode Instruction Prevention" to a more
  generic "try to execute a priviledged instruction"; whatever that
  specifically entails on any given architecture.
- Rename a bunch of internal variables to more generic names.
- Wrap the x86-specific implementation of "execute non executable
  memory" in architecture preprocessor checks.
2024-06-29 17:36:49 +02:00
Liav A.
972f7581e9 Utilities/nc: Add an option to test a TCP-listening service
Similarly to OpenBSD nc, an option to just connect without transmitting
any actual data is added.

However, we don't allow UDP-mode when testing a remote service, as it
will always succeed and has no technical meaning for the user if they're
not able to view the traffic on the remote machine.
2024-06-28 10:31:23 +02:00
Hexeption
c0fdc7d2dd LibWeb: Added HTMLLinkElement.as Tests
(cherry picked from commit 7ac6fd274696fe3e66971bb3b82141466879f82b)
2024-06-27 14:49:29 +02:00
Hexeption
928576e0ac LibWeb: Added HTMLLinkElement.as
(cherry picked from commit 2f4668edce2effb38563b9da229d00d3ba5dc508,
manually amended to move `||` at the start of the line to appease
clang-format)
2024-06-27 14:49:29 +02:00
Liav A.
393c886c24 Utilities: Introduce the sizefmt utility
This utility takes a human-readable size and converts it into a raw
integer that can be used on commandline utilities.
2024-06-25 09:24:55 +02:00
Liav A.
5133c9d4cb Utilities/du: Add options to filter files with min and max sizes
These options supplements the original threshold option, because it's
now possible to specify a threshold and add either minimum/maximum size
for additional filtering.

It's also possible to not use the old threshold option (that Tim
Schumacher told me it was inherited from coreutils) and only specify the
2 new options to create a filtering.
2024-06-15 09:36:39 +02:00
circl
ec1692eed2 Browser: Display name as "Browser" once again
This basically reverts 15211cd, since Ladybird has been hard-forked from
the SerenityOS project, this chrome is no longer officially part of it.
2024-06-08 10:30:07 -04:00
Liav A.
925bea444b Base: Add a manual page for the shred utility 2024-05-31 17:39:59 +02:00
theonlyasdk
6da1d5eb57 Demos: Add sleep option to CatDog
Now you can put your CatDog to sleep while
you're at work :)
2024-05-14 15:45:33 -06:00
Liav A
56790098ea Utilities: Rename ldd => elfdeps
As a preparation to introducing ldd as a symlink to /usr/lib/Loader.so
we rename the ldd utility to be elfdeps, at its sole purpose is to list
ELF object dependencies, and not how the dynamic loader loads them.
2024-05-14 15:42:42 -06:00
Xexxa
bda914868b Base: Add more emoji
🫩 - U+1FAE9 FACE WITH BAGS UNDER EYES
🫟 - U+1FADF SPLATTER
🪉 - U+1FA89 HARP
🫆 - U+1FAC6 FINGERPRINT
🫜 - U+1FADC ROOT VEGETABLE
🪾 - U+1FABE LEAFLESS TREE
🪏 - U+1FA8F SHOVEL
🇨🇶 - U+1F1E8_U+1F1F6 CQ SARK
2024-05-14 16:16:20 -04:00
Liav A.
2cb86c1309 Kernel/Storage: Remove ATA IDE support
Nobody uses this functionality. I used this code on my old 2007 ICH7
test machine about a year ago, but bare metal is a small aspect of the
project, so it's safe to assume that nobody really tests this piece of
code.
Therefore, let's drop this for good and focus on more modern hardware.
2024-05-14 12:38:05 -06:00
Liav A
5b34b4af14 Utilities: Merge the gunzip utility with gzip
Now both /bin/zcat and /bin/gunzip are symlinks to /bin/gzip, and we
essentially running it in decompression mode through these symlinks.

This ensures we don't maintain 2 versions of code to decompress Gzipped
data anymore, and handle the use case of gzipped-streaming input only
once in the codebase.
2024-05-14 12:35:25 -06:00
Xexxa
a9269afa05 Base: Add more emoji
🤽 - U+1F93D PERSON PLAYING WATER POLO
🤽‍♂️ - U+1F93D U+200D U+2642 MAN PLAYING WATER POLO
🤽‍♀️ - U+1F93D U+200D U+2640 WOMAN PLAYING WATER POLO
🦨 - U+1F9A8 SKUNK
2024-05-11 17:09:14 -06:00
Marios Prokopakis
9bcb0feb4d ping: Update the man page 2024-05-09 13:13:20 -06:00
Dan Klishch
6894faac1f Tests/LibELF: Add basic test checking initializer ordering 2024-05-08 09:21:36 -06:00