Commit graph

49652 commits

Author SHA1 Message Date
Cameron Youell
ba38984a60 SQLStudio: Convert MainWidget to a failable constructor 2023-04-24 09:21:51 +02:00
Cameron Youell
e9ad7b8eed BrowserSettings: Convert BrowserSettingsWidget to a failable factory 2023-04-24 09:21:51 +02:00
Cameron Youell
2df0eeaa20 Browser: Convert BookmarksBarWidget to use failable functions 2023-04-24 09:21:51 +02:00
Cameron Youell
bedb370dec Services/WebContent: Use JsonArray::append
We can use the failable function here easily
2023-04-24 09:21:51 +02:00
Cameron Youell
ada6dbf636 AK: Use JsonArray::append when parsing array 2023-04-24 09:21:51 +02:00
Cameron Youell
8134dccdc7 AK: Add new failable JsonArray::{append/set} functions
Move all old usages to the more explicit `JsonArray:must_{append/set}`
2023-04-24 09:21:51 +02:00
Aliaksandr Kalenik
3b00636288 LibWeb: Implement "create a new browsing context and document"
Co-authored-by: Andreas Kling <kling@serenityos.org>
2023-04-24 07:57:15 +02:00
Andreas Kling
6871fbce9f LibWeb: Implement the "top-level traversable" of a browsing context 2023-04-24 07:57:15 +02:00
Andreas Kling
65467021e2 LibWeb: Add updated version of "determine the origin" AO from HTML spec
The old version is still around since it has many users, so we can't
remove it until everything has been updated to use the new version.
2023-04-24 07:57:15 +02:00
Aliaksandr Kalenik
3225c39191 LibWeb: Implement Document::make_active()
Implementation of "make active" algorithm from the spec for Document.

Co-authored-by: Andreas Kling <kling@serenityos.org>
2023-04-24 07:57:15 +02:00
Timothy Flynn
32e2207b55 LibWeb: Implement the HTMLMediaElement fastSeek method 2023-04-24 07:55:54 +02:00
martinfalisse
c987c934d0 LibWeb: Fix grid size when intrinsically sized
This fixes a bug that was seen when a combination of the grid having
been floated with `float: left` and a `minmax()` column size were used.

The issue was that a grid track size should be considered intrinsically
sized if both the min and max sizes are intrinsic, not just one of them.
2023-04-24 07:55:40 +02:00
Aliaksandr Kalenik
9f691b7fe4 LibWeb: Convert navigationId from DeprecatedString to String 2023-04-24 07:55:20 +02:00
Jelle Raaijmakers
71c98546b8 LibSQL: Add a note to Serializer about m_heap 2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
fdac8331cc LibSQL: Use Block::Index everywhere; rename pointer to block_index
No functional changes.
2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
6601ff9d65 LibSQL: Redesign heap storage to support arbitrary amounts of data
Previously, `Heap` would store serialized data in blocks of 1024 bytes
regardless of the actual length. Data longer than 1024 bytes was
silently truncated causing database corruption.

This changes the heap storage to prefix every block with two new fields:
the total data size in bytes, and the next block to retrieve if the data
is longer than what can be stored inside a single block. By chaining
blocks together, we can store arbitrary amounts of data without needing
to change anything of the logic in the rest of LibSQL.

As part of these changes, the "free list" is also removed from the heap
awaiting an actual implementation: it was never used.

Note that this bumps the database version from 3 to 4, and as such
invalidates (deletes) any database opened with LibSQL that is not
version 4.
2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
194f846f12 LibSQL: Rename Heap constants to match our code style
No functional changes. The constants are moved to constexpr variables
inside `Heap`.
2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
fcd35e824c LibSQL: Remove unused Tuple::is_compatible 2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
a99c1297e0 LibSQL: Clean up code style and remove unused includes
No functional changes.
2023-04-23 18:08:17 -04:00
Jelle Raaijmakers
8992ff5aeb LibSQL: Remove and update VERIFYs
We are performing a lot of checks on pointers that are performed again
immediately afterwards because of a dereference. This removes the
redundant `VERIFY`s and simplifies a couple others.
2023-04-23 18:08:17 -04:00
Zaggy1024
036eb82aca LibVideo/VP9: Implement threaded tile column decoding
This adds a new WorkerThread class to run one task asynchronously,
and allow waiting for that thread to finish its work.

TileContexts are placed into multiple tile column vectors with their
streams to read from pre-created. Once those are ready, the threads can
start their work on each vector separately. The main thread waits for
those tasks to finish, then sums up the syntax element counts for each
tile that was decoded.
2023-04-23 23:14:30 +02:00
Zaggy1024
ba5bf412e5 LibThreading: Create WorkerThread class run a single task concurrently
This class can be used to run a task in another thread, and allows the
caller to wait for the task to complete to retrieve any error that may
have occurred.

Currently, it doesn't support functions returning a value on success,
but with some template magic that should be possible. :^)
2023-04-23 23:14:30 +02:00
Zaggy1024
1fcac52e77 LibVideo/VP9: Count syntax elements in TileContext, and sum at the end
Syntax element counters were previously accessed across tiles, which
would cause a race condition updating the counts in a tile-threaded
mode.
2023-04-23 23:14:30 +02:00
Zaggy1024
a8604d9356 LibVideo/VP9: Fallibly allocate the probability tables 2023-04-23 23:14:30 +02:00
Zaggy1024
8ce4245214 LibVideo/VP9: Return Corrupted error when tile range decoder init fails
Previously, we were incorrectly wrapping an error from `BooleanDecoder`
initialization in a `DecoderErrorCategory::Memory` error. This caused
an incorrect error message in VideoPlayer. Now it will instead return
`DecoderErrorCategory::Corrupted`.
2023-04-23 23:14:30 +02:00
Peter Brottveit Bock
b6deb8fd42 LibJS: Replace DeprecatedString with String in strip_ansi 2023-04-23 16:56:06 +02:00
Peter Brottveit Bock
fac7045a44 LibJS: Use Stream::format instead of manually formating and printing 2023-04-23 16:56:06 +02:00
Peter Brottveit Bock
6f6d6c654d AK: Implement Stream::format(fmtstr, args...)
Based on `out()` and `vout()` from AK/Format.h. As opposed to those,
this propagates errors.

As `Core::File` extends `AK::Stream`, this allows formatted
printing directly on `Core::File`s.
2023-04-23 16:56:06 +02:00
Timothy Flynn
ab1244a160 LibWeb: Paint video timestamps using CSS/device pixel-aware scaled fonts
The timestamp text was very tiny on a HiDPI display.
2023-04-23 16:22:45 +02:00
Timothy Flynn
848078aedd LibWeb: Propagate LibVideo decoder errors to the HTMLMediaElement 2023-04-23 16:22:45 +02:00
Timothy Flynn
9c940608fd LibWeb: Implement the HTMLMediaElement error attribute 2023-04-23 16:22:45 +02:00
Timothy Flynn
73a80b7047 LibWeb: Implement the MediaError IDL interface 2023-04-23 16:22:45 +02:00
Aliaksandr Kalenik
22572c39e0 LibWeb: Implement Node::navigable()
https://html.spec.whatwg.org/multipage/document-sequences.html#node-navigable
2023-04-23 15:41:05 +02:00
Andreas Kling
6e416284b9 LibWeb: Add API for finding Navigable with a given active document
This will be used to look up a document's node navigable. It might be
nice to have a direct pointer from Document to its Navigable, but at
the moment I don't understand the algorithms well enough to maintain
that linkage.
2023-04-23 15:41:05 +02:00
Nico Weber
f09aaf826f LibGfx: Decrease indent in ImageDecoder::try_create_for_raw_bytes() some
No behavior change.
2023-04-23 14:35:20 +02:00
Daniel Bertalan
f18e7659a6 DynamicLoader: Ensure that backtrace computation stops at _start
If we don't set FP and LR to 0, the Kernel might not stop generating
backtraces when it reaches `_start`'s stack frame, and might continue by
reading garbage memory instead. This leads to a kernel panic, as SafeMem
access faults aren't handled properly in the AArch64 kernel yet.

We might want to ensure that the kernel zeroes out all registers when a
new process is created.
2023-04-23 14:30:59 +02:00
Daniel Bertalan
ff2fa72e28 LibCoredump+CrashReporter: Make CrashReporter work on AArch64
This commit implements printing out the AArch64 register file and
generating backtraces. Tested to work on the sshd port.
2023-04-23 14:30:59 +02:00
Daniel Bertalan
ed13b7beb6 LibDebug: Support DW_FORM_ref_udata
This is used alongside/instead of the fixed-length DW_FORM_ref4 form
when compiling for AArch64.
2023-04-23 14:30:59 +02:00
Daniel Bertalan
d205814da6 Kernel+LibC: Implement pthread_create for AArch64
Instead of storing x86_64 register names in `SC_create_thread_params`,
let the Kernel figure out how to pass the parameters to
`pthread_create_helper`.
2023-04-23 14:30:59 +02:00
Daniel Bertalan
9b9cc76b1d LibELF: Add AArch64 PLT trampoline
This is used for lazy symbol binding, which is used by e.g. ports that
are not linked with `-z now`.
2023-04-23 14:30:59 +02:00
Timothy Flynn
4aca24481e Ladybird: Implement the JavaScript console using a WebContentView
This aligns the Ladybird console implementation with the Browser console
a bit more, which uses OutOfProcessWebView for rendering console output.
This allows us to style the console output to try and match the system
theme.

Using a WebContentView is simpler than trying to style the old QTextEdit
widget, as the console output is HTML with built-in "-libweb-palette-*"
colors. These will override any color we set on the QTextEdit widget.
2023-04-23 14:30:23 +02:00
Kenneth Myhra
5af715e394 Toolchain+Ports: Update qemu to 8.0.0 2023-04-23 14:20:42 +02:00
Kenneth Myhra
1cc095c5ab Toolchain+Ports: Consolidate version information for QEMU
This consolidates version information, archive's download location,
filename and SHA256 checksum into version.sh. This file is then sourced
from the port script and toolchain build script.

The version.sh script contains the following variables:
- QEMU_VERSION           - Version number
- QEMU_ARCHIVE           - Filename
- QEMU_ARCHIVE_URL       - Full url to download location
- QEMU_ARCHIVE_SHA256SUM - The SHA256 checksum
2023-04-23 14:20:42 +02:00
Andreas Kling
54e01824c7 LibWeb: Implement getting the top-level traversable of a navigable 2023-04-23 14:18:57 +02:00
Andreas Kling
05dc1da321 LibWeb: Implement getting the traversable navigable of a navigable 2023-04-23 14:18:57 +02:00
Fabian Dellwing
16ef5e2631 Ports: Prefer host python3.xx over python3
Previously we relied on the presence of a `python3` binary in the
PATH that has the correct minor version to build the port.

We now first check for the presence of a `python3.minor` binary
in the PATH and use that if found.

This allows users that have multiple Python versions installed
simultaneously (like from a PPA) to build the port without having
to change their main version.
2023-04-22 12:56:36 +01:00
Timothy Flynn
8da0a34515 BrowserSettings: Propagate errors from creation of content filter widget 2023-04-22 12:32:40 +02:00
Timothy Flynn
8352417278 BrowserSettings: Slightly change text for adding a new content filter
Add an ellipsis to the button to add a new domain to indicate an action
must be taken after pressing the button. Shorten the label next to the
domain text box to be less overly verbose.
2023-04-22 12:32:40 +02:00
Timothy Flynn
d1ad513cb1 BrowserSettings: Port content filters to String 2023-04-22 12:32:40 +02:00
Timothy Flynn
5089766af6 Browser+Ladybird+LibWeb: Port content filters to String 2023-04-22 12:32:40 +02:00