Commit Graph

49530 Commits

Author SHA1 Message Date
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
Timothy Flynn
76ae60da15 Browser+Ladybird+LibWeb: Prevent infinite growth of content filters
We never clear content filters on either end of the Browser-WebContent
IPC connection. So when the filters change, we re-append all filters to
the Vector holding them. This incidentally makes it impossible to remove
a filter.

Change both sides to clear their filter lists when receiving a new set
of filters.
2023-04-22 12:32:40 +02:00
Sam Atkins
b0ffb15e13 copy: Stop using DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
f7375d664c config: Stop using DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
739e657ad0 cksum: Stop using DeprecatedString
This has the side-effect of making the algorithm name case-sensitive,
but there doesn't seem to be an especially good reason to support that.
On the other hand, converting an AK::String to lowercase would require
linking LibUnicode.
2023-04-22 07:17:08 +02:00
Sam Atkins
2db4a2450b chown: Stop using DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
916e7a5a3f asctl: Stop using DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
8377db260f arp: Stop using DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
b3cd91d26d Utilities: Use lround() instead of casting round() to long
And one case where we previously cast to int, since the extra precision
does not matter.
2023-04-22 07:17:08 +02:00
Sam Atkins
f2ae25deee cmp: Replace uses of DeprecatedString 2023-04-22 07:17:08 +02:00
Sam Atkins
684af3d4d0 cmp: Use Core::File::open_file_or_standard_stream() 2023-04-22 07:17:08 +02:00
Sam Atkins
0f95ff64ed Utilities: Replace ctype.h usage with AK/CharacterTypes.h 2023-04-22 07:17:08 +02:00
Liav A
ee4e9b807a Kernel: Protect internal structures in InodeWatcher with spinlocks
This was the last change that was needed to be able boot with the flag
of LOCK_IN_CRITICAL_DEBUG. That flag is not always enabled because there
are still other issues in which we hold a spinlock and still try to lock
a mutex.

Instead of using one global mutex we can protect internal structures of
the InodeWatcher class with SpinlockProtected wrappers. This in turn
allows the InodeWatcher code to be called from other parts in the kernel
while holding a prior spinlock properly.
2023-04-22 07:16:41 +02:00
Nico Weber
cf3835b29b LibGfx/JPEG: Make non-zero-terminated APPn starts non-fatal
Necessary but not sufficient for #18456.
2023-04-21 22:09:31 -04:00
Sam Atkins
22e0603bf7 LibWeb: Implement integrity-metadata part of fetch algorithm
Specifically, this makes `<link>` elements with an `integrity` attribute
actually work. Previously, we would load their resource, and then drop
it on the floor without actually using it.

The Subresource Integrity code is in `LibWeb/SRI`, since SRI is the name
of the recommendation spec: https://www.w3.org/TR/SRI/

However, the Fetch spec links to the editor's draft, which varies
significantly from the recommendation, and so that is what the code is
based on and what the spec comments link to:
https://w3c.github.io/webappsec-subresource-integrity/

Fixes #18408
2023-04-21 20:44:47 +01:00
Sam Atkins
6d93e03211 LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacks
This automatically protects captured objects from being GC'd before the
callback runs.
2023-04-21 20:44:47 +01:00
Sam Atkins
892470a912 AK: Add Array::contains_slow() and ::first_index_of(), with tests :^) 2023-04-21 20:44:47 +01:00
Sam Atkins
955528055c LibWeb: Add FIXME: for new step 6 of Fetch's "main fetch"
This step was added in this commit:
2d78995db8
2023-04-21 20:44:47 +01:00
Andreas Kling
b7e847e58b AK: Fix crash during teardown of self-owning objects
We now null out smart pointers *before* calling unref on the pointee.
This ensures that the same smart pointer can't be used to acquire a new
reference to the pointee after its destruction has begun.

I ran into this when destroying a non-empty IntrusiveList of RefPtrs,
but the problem was more general so this fixes it for all of RefPtr,
NonnullRefPtr, OwnPtr and NonnullOwnPtr.
2023-04-21 18:15:00 +02:00
Nico Weber
66bd7cdb28 LibGfx: Move two globals into the only functions that use them
No real behavior change. (The two globals are now both initialized
at first use instead of before main(), but that should have no
observable effect. The motivation is readability.)
2023-04-21 15:55:03 +02:00
Tim Schumacher
12ce6ef3d7 Kernel+Userland: Remove the nfds entry from /sys/kernel/processes
`process.fds()` is protected by a Mutex, which causes issues when we try
to acquire it while holding a Spinlock. Since nothing seems to use this
value, let's just remove it entirely for now.
2023-04-21 13:55:23 +02:00
Aliaksandr Kalenik
ce483fb2c9 Tests/LibWeb: Time limit layout tests
This change will prevent CI runners from being stuck trying to run
layout tests on PR that made browser hang.
2023-04-21 11:00:21 +01:00
Aliaksandr Kalenik
8cf0cc4d0a Meta: Add coreutils in macos Azure setup
coreutils include timeout tool that is going to be used in layout
tests script.
2023-04-21 11:00:21 +01:00