Commit graph

44421 commits

Author SHA1 Message Date
Linus Groh
107e06a396 LibJS: Convert new_declarative_environment() to NonnullGCPtr 2022-12-16 09:59:56 +01:00
Baitinq
4c732abed5 HackStudio: Add a factory function for DebugInfoWidget
Thanks to this patch we now do error propagation in the DebugInfoWidget
creation and as a result we get rid of 4 FIXMEs :)
2022-12-16 09:58:51 +01:00
Baitinq
55a903911b HackStudio: Add a factory function for HackStudioWidget
This will allow us to handle errors while creating the HackStudioWidget.

(tip: check next commit :^)
2022-12-16 09:58:51 +01:00
Baitinq
61789de11d LibGUI: Add GUI::TabWidget::add_tab() that takes a constructed tab
This patch adds a new add_tab() function in GUI::TabWidget that takes
an already created NonnullRefPtr<Widget> object. This allows us to
handle errors while creating the Tab object and then pass it to this
function to actually add the object to the TabWidget.
2022-12-16 09:58:51 +01:00
Andreas Kling
c355e9692d LibWeb: Add spec links to IDL APIs in HTMLTableElement 2022-12-16 09:58:03 +01:00
Andreas Kling
2ded895107 LibWeb: Allow setting HTMLTableElement.tFoot to null value
This annihilates 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
346737701d LibWeb: Allow setting HTMLTableElement.tHead to null value
This deals with 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
2d791cf90f LibWeb: Allow setting HTMLTableElement.caption to null value
This takes care of 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
6e127f62d7 LibWeb: Add spec link and comment to HTMLTableElement::caption() 2022-12-16 09:58:03 +01:00
Aliaksandr Kalenik
992b4489ad LibWeb: Fix bug in BFC that independent FC assigned to wrong variable
Bug was introduced in 210bf8adf0c431be05659140fd6de3a2cc5b7d99
It makes new variable for independent_formatting_context instead
of using earlier declared one which means that
parent_context_did_dimension_child_root_box will never be called.
2022-12-16 09:57:37 +01:00
Cody Hein
8d6283c229 PixelPaint: Replace vectorscope boxes with colored corner brackets
This completes a FIXME which requested us to replace the rects/boxes
with just corner brackets. I also added some color to the brackets
matching the colors they represent. The text remains white :)
2022-12-16 01:25:50 -07:00
Rodrigo Tobar
a1af79dca6 LibPDF: Follow a FontFile's Length values
These can be references (at least from what I've found in some
documents), so we want to resolve them before using them.
2022-12-16 01:24:43 -07:00
Rodrigo Tobar
cb1a7cc721 LibPDF: Simplify outline construction
While the Outline Items making up the document's Outline have all sorts
of cross-references (parent, first/last chlid, next/previous sibling,
etc), not all documents out there have fully-consistent references. Our
implementation already discarded some of that information too (e.g.,
/Parent and /Prev were never read), and trusted that /First and /Next
were good enough to traverse the whole hierarchy.

Where the current implementation failed was in assuming that /Last was
also a good source of information. There are documents out there were
/Last also points to dead ends, and were therefore causing a crash when
we verified that the last child found on a chain was the /Last child
declared by the parent. To fix this I'm simply removing the check, and
simplifying the function call to remove any references to /Last. This
way we affirm our commitment to /First and /Next as the main sources of
information.
2022-12-16 01:24:43 -07:00
Rodrigo Tobar
41bd304a7f LibPDF: Ignore seac PS1 commands for now
This command is meant to print an Standard Encoding Accented Character.
It's not critical to implement it yet, but if we want to render more
documents we need to handle the instruction, even if simply ignore it.
2022-12-16 01:24:43 -07:00
Tim Ledbetter
8353df03a8 PixelPaint: Disable bucket tool outside of the current selection
Previously, if the user clicked outside of the current selection with
the bucket tool, the selection would be filled.
2022-12-16 08:10:33 +00:00
Agustin Gianni
d233dcce08 Meta: Add libssl-dev as a dependency to the devcontainer
The library `libssl-dev` was missing from the installed dependencies.
This made impossible to compile the system on a devcontainer.
2022-12-16 01:04:11 -07:00
Gurkirat Singh
c2597c3856 Documentation: Add libssl-dev in the debian / ubuntu requirements
In the fresh and minimal installations dev package are often
stripped. This commit will install the libssl dev packages
required in `Utilities/cmcurl/CMakeLists.txt:608`.
2022-12-16 01:03:23 -07:00
Liav A
d97aa9cf8c DynamicLoader: Annotate all loaded library ranges as immutable
To further protect all virtual memory regions of the loaded libraries,
don't allow to mutate these regions both in changing their annotations
nor the protection bits.
2022-12-16 01:02:00 -07:00
Liav A
8585b2dc23 Kernel/Memory: Add option to annotate region mapping as immutable
We add this basic functionality to the Kernel so Userspace can request a
particular virtual memory mapping to be immutable. This will be useful
later on in the DynamicLoader code.

The annotation of a particular Kernel Region as immutable implies that
the following restrictions apply, so these features are prohibited:
- Changing the region's protection bits
- Unmapping the region
- Annotating the region with other virtual memory flags
- Applying further memory advises on the region
- Changing the region name
- Re-mapping the region
2022-12-16 01:02:00 -07:00
Liav A
6c0486277e Kernel: Reintroduce the msyscall syscall as the annotate_mapping syscall
This syscall will be used later on to ensure we can declare virtual
memory mappings as immutable (which means that the underlying Region is
basically immutable for both future annotations or changing the
protection bits of it).
2022-12-16 01:02:00 -07:00
Sam Atkins
1b5a565e55 Kernel: Allocate VirtIOGPU context IDs from a bitmap, with ErrorOr
As is, we never *deallocate* them, so we will run out eventually.

Creating a context, or allocating a context ID, now returns ErrorOr if
there are no available free context IDs.

`number_of_fixmes--;` :^)
2022-12-15 22:04:28 +00:00
Sam Atkins
6d67cb516a Kernel: Remove unimplemented VirGL adapter's edid_feature_accepted() 2022-12-15 22:04:28 +00:00
Sam Atkins
3597f4a490 Kernel: Remove Badged VirtIOGraphicsAdapter::allocate_FOO_id() methods
These are unused, so let's remove them. `number_of_fixmes--;` :^)
2022-12-15 22:04:28 +00:00
Baitinq
626142c312 ClockSettings: Add a factory function for TimeZoneSettingsWidget
This removes an unbelievable 4 FIXMEs :))
2022-12-15 21:00:24 +00:00
Baitinq
27a1798dd9 LibGUI: Add GUI::SettingsWindow::add_tab() that takes a constructed tab
This patch adds a new add_tab() function in GUI::SettingsWindow that
takes an already created NonnullRefPtr<Tab> object. This allows us to
handle errors while creating the Tab object and then pass it to this
function to actually add the object to the SettingsWindow.
2022-12-15 21:00:24 +00:00
Lucas CHOLLET
2693745336 LibThreading+Everywhere: Support returning error from BackgroundAction
This patch allows returning an `Error` from the `on_complete` callback
in `BackgroundAction`.

It also adds a custom callback to manage errors returned during its
execution.
2022-12-15 17:36:57 +00:00
Lucas CHOLLET
664117564a LibGUI: Actually try something in TabWidget::try_add_widget(Widget&)
This function, while returning an `ErrorOr<void>`, didn't call failable
API.
2022-12-15 17:36:57 +00:00
Federico Guerinoni
43ff500a80 LibCore: Use ';' to split socket path in SOCKET_TAKEOVER
This allow to use socket path with spaces inside.

Closes #16436.
2022-12-15 12:33:36 -05:00
Timothy Flynn
944e17ce9e WebContent: Disallow creating WebDriverConnections with existing sockets
This reverts commit d2b2d3ad80.

This is no longer needed once Ladybird will uses local socket files.
2022-12-15 17:29:19 +00:00
Timothy Flynn
cc62d33a07 headless-browser: Remove option to specify a WebDriver FD-passing socket 2022-12-15 17:29:19 +00:00
Timothy Flynn
cbbaf8ea2c WebDriver: Remove the WebContent socket file when closing the session
Otherwise it is left on disk forever.
2022-12-15 17:29:19 +00:00
Timothy Flynn
956fa84f12 WebDriver: Specify callbacks for clients to launch browser windows
This moves the actual launching of browser windows to the WebDriver main
file. This will allow Ladybird to specify its own callback and re-use
Serenity's Session class.
2022-12-15 17:29:19 +00:00
Timothy Flynn
366f24a73b WebContent+WebDriver: Move WebDriver socket to the standard runtime path
This will allow Ladybird to use local socket files rather than passing
around a bunch of socket FDs.
2022-12-15 17:29:19 +00:00
Timothy Flynn
701e77019c LibCore: Use the user's root session ID for standard runtime path
This ensures processes created by the user use the same runtime path.
2022-12-15 17:29:19 +00:00
Arda Cinar
e2566d5126 LibMarkdown: Prevent a crash when rendering code blocks to console
When parsing a code block not in a section (in a file without a
heading), the parser would initialize the code block with an
uninitialized (invalid) value for current_section. Accessing this value
would later cause a segmentation fault in render_to_terminal.
2022-12-15 16:30:21 +00:00
Arda Cinar
80563120e2 LibMarkdown: Handle error while rendering JS to HTML
The library logs the error and falls back to not colorizing the js code
inside the block instead.
2022-12-15 16:30:21 +00:00
Timothy Flynn
2dfa87814e LibJS: Update spec comments for replacing digits in Intl.NumberFormat
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/06d95ed

Note the new spec steps basically match our implementation in LibLocale.
2022-12-15 16:24:29 +00:00
Timothy Flynn
01fc025e9d LibJS: Fix a typo in an Intl.DateTimeFormat spec comment
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/078bea0
2022-12-15 16:24:29 +00:00
Lucas CHOLLET
048d0a9870 LibCore: Use System::getaddrinfo() in Socket::resolve_host 2022-12-15 13:38:13 +00:00
Lucas CHOLLET
687ef7740a LibCore: Add a wrapper for getaddrinfo() 2022-12-15 13:38:13 +00:00
Lucas CHOLLET
34c13eff11 AK: Add OwnPtrWithCustomDeleter
This class is a smart pointer that let you provide a custom deleter to
free the pointer.

It is quite primitive compared to other smart pointers but can still be
useful when interacting with C types that provides a custom `free()`
function.
2022-12-15 13:38:13 +00:00
Tim Schumacher
6640cb57b3 LibCore: Use AllocatingMemoryStream for SOCKSProxyClient 2022-12-15 13:28:29 +00:00
Tim Schumacher
f205f62a44 LibCore: Add an automatically allocating MemoryStream
Similar to AK::DuplexStream, this writes to the end and reads from the
beginning of a dynamically allocated buffer.
2022-12-15 13:28:29 +00:00
Tim Schumacher
8dbc7aa63f LibCore: Move the MemoryStream implementation into a separate file 2022-12-15 13:28:29 +00:00
Tim Schumacher
c6d71ca727 LibCore: Rename MemoryStream to FixedMemoryStream
This is to differentiate between the upcoming `AllocatingMemoryStream`,
which automatically allocates memory as needed instead of operating on a
static memory area.
2022-12-15 13:28:29 +00:00
Baitinq
c4f68bde57 VirGLDemo: Make a factory function for Demo and propagate errors
This removes a measly 1 FIXME :))
2022-12-15 12:35:19 +00:00
Sam Atkins
d4f74d6c48 gron: Add options for enabling/disabling colored output
These match the options in the original gron:
https://github.com/tomnomnom/gron
2022-12-15 12:20:37 +00:00
Edward Banner
a3423f2af2 Base: Add man page for the dd command
Base: Add man page for the dd command
2022-12-15 12:09:43 +00:00
Linus Groh
bd40464195 LibJS: Convert standalone construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Linus Groh
6ae79a84df LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00