Commit Graph

53951 Commits

Author SHA1 Message Date
Andreas Kling
2a86bd8c91 LibWeb: Fire the fail callback on SharedImageRequest when they fail
This fixes an issue where failed image loads would delay the document
load event forever.
2023-08-28 10:19:46 +02:00
Andi Gallo
8e0320626d LibWeb: Move line breaking test 2023-08-28 10:09:07 +02:00
Andrew Kaster
b1f06e42ce LibWeb: Implement navigation.{traverseTo, back, forward}
The proper abstract operations on Navigable and TraversableNavigable are
not quite ready to call from Navigation. With this commit all of the
user-facing APIs of Navigation are in place, and the stage should be set
to implement the parts of the navigation and traversal AOs that need to
interact with the Navigation object.
2023-08-28 09:47:11 +02:00
Andrew Kaster
03eae09619 LibWeb: Implement snapshotting source snapshot params per the spec 2023-08-28 09:47:11 +02:00
Andrew Kaster
798a1b2751 LibWeb: Implement navigation.reload()
This has the same issue as navigate(), in that we currently cannot
guarantee that there is a valid navigable on every fully loaded
document.
2023-08-28 09:47:11 +02:00
Aliaksandr Kalenik
b66f65dc9e LibWeb: Define if identifier represent area or line during layout [GFC]
This fixes regression introduced in
c03e025a32 by assuming that it is
possible to determine whether identifier stands for line or area
during parsing.
2023-08-28 09:19:41 +02:00
Timothy Flynn
5d7e73adfe Meta: Add and document convenient method to build non-Qt Ladybird chrome
This lets us switch between the AppKit and Qt chromes more easily.
2023-08-27 19:02:36 -04:00
Andrew Kaster
b7f9634f6c LibCore: Add default version for Lagom applications
Instead of grabbing `uname -vr` on non-Serenity platforms, let's just
hardcode a version. This prevents Lagom builds of applications like
Shell or Ladybird from reporting their version as that of the host OS.
2023-08-27 19:01:32 -04:00
Beckett Normington
39e79d6f6f Ports/perl5: Remove no longer needed Makefile patch
Following the removal of the `drand48` patch to the configure script,
we can now remove this patch as it is no longer needed to prevent an
interpreter hang.
2023-08-28 00:40:35 +02:00
Beckett Normington
eaf7dbaced Ports/perl5: Remove unnecessary drand48 patch
With `drand48` now in LibC, this patch is not needed.
2023-08-28 00:40:35 +02:00
Beckett Normington
8bc1f1b63e LibC: Add drand48, srand48
These functions are required for the `perl5` port's random function to
operate correctly. As a bonus, this allows us to remove a nasty patch
that replaces `drand48` with `random`.
2023-08-28 00:40:35 +02:00
kleines Filmröllchen
12e534c8c6 Kernel: Implement Nagle’s Algorithm
This is an initial implementation, about as basic as intended by the
RFC, and not configurable from userspace at the moment. It should reduce
the amount of low-sized packets sent, reducing overhead and thereby
network traffic.
2023-08-28 00:28:15 +02:00
kleines Filmröllchen
ed966a80e2 Kernel/Net: Use monotonic time for TCP times
These were using real time as a mistake before; changing the system time
during ongoing TCP connections shouldn’t break them.
2023-08-28 00:28:15 +02:00
Luke Wilde
af2886449a LibWeb: Implement PerformanceObserver 2023-08-27 23:27:44 +02:00
Liav A
5055883b9f Utilities/ps: Add process start time column in full format mode
Just like on Linux, we can easily print the process creation time. The
format of a printed time is either "hour:minute" if the process started
today, or "short_month_name:day_of_the_month" (for example, "Aug26").
2023-08-27 22:53:22 +02:00
Liav A
aee5f4e4b2 Kernel: Remove the /sys/kernel/constants directory
The name for this directory is a bit awkward. Also, the distinction of
constant information is not really valuable as I thought it would be, so
let's bring that information back into the /sys/kernel directory.
2023-08-27 22:50:22 +02:00
Liav A
751aae77bc Kernel: Rename /sys/kernel/variables => /sys/kernel/conf
The name "variables" is a bit awkward and what the directory entries are
really about is kernel configuration so let's make it clear with the new
name.
2023-08-27 22:50:22 +02:00
Kemal Zebari
3151099b21 LibWeb/Fetch: Use parsed referrer's origin in Request::construct_impl 2023-08-27 15:44:21 -04:00
Tim Ledbetter
94b247ec3c sort: Allow multi-character separators to be given with the -t option 2023-08-27 15:42:46 -04:00
Tim Ledbetter
e6112446db sort: Add the -z option to split lines on \0 rather than a newline 2023-08-27 15:42:46 -04:00
Timothy Flynn
b7676cc436 LibJS: Disable Temporal custom time zone test
This test has been flaky for quite some time. Disable it for now, and
revisit once we've caught up with the Temporal spec.
2023-08-27 15:26:40 -04:00
Tim Ledbetter
edd49c1531 find: Add the -readable, -writable and -executable options 2023-08-27 09:46:11 -04:00
Gurkirat Singh
4519ac2da9 Ports: Add doxygen v1.9.7 2023-08-27 15:20:39 +02:00
Aliaksandr Kalenik
e4dd4808c4 Tests/LibWeb: Split "grid/named-tracks.html" into smaller layout tests
The file grid/named-tracks.html contained multiple subtests. Splitting
them into individual files will make it simpler to identify where is
the issue.
2023-08-27 14:51:44 +02:00
Shannon Booth
b0eea51335 LibWeb: Port DOMTokenList from DeprecatedString to String 2023-08-27 05:34:54 +02:00
Shannon Booth
d706f9f241 LibWeb: Port HTMLSelectElement from DeprecatedString to String 2023-08-27 05:34:54 +02:00
Shannon Booth
d5409a056a LibWeb: Port HTMLCollection from DeprecatedString to String 2023-08-27 05:34:54 +02:00
Shannon Booth
ebdfe2e863 LibWeb: Port DocumentType from DeprecatedString to String 2023-08-27 05:34:54 +02:00
Shannon Booth
9117bcfd61 LibWeb: Port DOMImplementation from DeprecatedString to String 2023-08-27 05:34:54 +02:00
Shannon Booth
d8ae02ef59 LibWeb: Add spec comments to DOMImplementation 2023-08-27 05:34:54 +02:00
Aliaksandr Kalenik
d3d67857b2 LibWeb: Use containing block width to measure fit-content width in GFC
When the grid layout gets to
`resolve_items_box_metrics(GridDimension::Column)`, we've already
determined the width of each column. However, the widths of the
individual grid items themselves haven't been set. Rather than using
`get_available_space_for_item()`, which returns an indefinite size if
an item's width/height hasn't been set, we should use the already
known track width as the available size to calculate the fit-content
width.
2023-08-27 05:11:55 +02:00
Tim Ledbetter
e1a9d7ec9d Ports/glib: Specify pcre2 as a dependency instead of pcre
Previously, if `pcre2` was not installed before `glib`, the meson
script would download its own version and use that.
2023-08-27 01:29:13 +02:00
Tim Ledbetter
a0a43d1a0e Ports/mc: Update formatting to be consistent with other ports 2023-08-27 01:20:47 +02:00
Tim Ledbetter
c5800229d5 Ports/mc: Remove libtool dependency
This is a build time dependency only. Therefore it is expected to be
present on the host machine prior to installation.
2023-08-27 01:20:47 +02:00
Tim Ledbetter
b2f2156706 Ports/mc: Add --with-sysroot to configopts
This prevents any host dependencies affecting the build and negates
the need to manually specify `ncurses` directories.
2023-08-27 01:20:47 +02:00
Tim Ledbetter
b91cd56a53 Ports/gettext: Update formatting to be consistent with other ports 2023-08-27 01:05:41 +02:00
Tim Ledbetter
07075ac0c2 Ports/gettext: Explicitly disable curses support
This makes the build behave the consistent regardless of whether
`ncurses` or `termcap` was previously installed or not.
2023-08-27 01:05:41 +02:00
Tim Ledbetter
435c53ee1c Ports/gettext: Remove unnecessary wctype patch 2023-08-27 01:05:41 +02:00
Tim Ledbetter
08cb49c2bd useradd: Simplify uid validation 2023-08-26 19:01:22 -04:00
Tim Ledbetter
8955560801 useradd: Allow group name or number to be used with the -g option 2023-08-26 19:01:22 -04:00
Kemal Zebari
4533794c32 LibWeb/Fetch: Use origins in Cross-Origin-Embedder-Policy algorithm 2023-08-26 18:44:21 -04:00
Zaggy1024
b33a71a35e LibAudio: Remove unnecessary m_bitstream field from MP3Loader
We can just create a `BigEndianInputBitStream` where it is needed
instead of storing one in the class. After making `read_header()`
static, the only other user of the field was `read_size_information()`,
so let's do that there and then remove the field.
2023-08-26 18:43:23 -04:00
Zaggy1024
c1d4ff919a LibAudio: Remove the m_current_frame field from MP3Loader
This field was only used within one function, where it could just be a
local variable.
2023-08-26 18:43:23 -04:00
Zaggy1024
88a9ff76b0 LibAudio: Read the full MP3 frame header when synchronizing to a frame
This makes the checks for a frame header more consistent, so if the
conditions for allowed frame headers change, there are less scattered
lines that will need to be changed.

`synchronize()` will now also properly scan the second byte of the hex
sequence `FF FF F0` as a sync code, where previously it would see
`FF F` and skip on to `F0`, ignoring its preceding `FF` that would
indicate that it is a sync code.
2023-08-26 18:43:23 -04:00
Zaggy1024
cbdf49de30 LibAudio: Pass raw streams to MP3 synchronize() and read_frame()
`synchronize()` can be simplified greatly by checking whole bytes with
bitwise operations, and doing so also avoids the overhead of reading
individual bits from a bitstream.

Making `read_frame()` also take a `SeekableStream` will allow it to be
used inside `synchronize()` in the next commit.
2023-08-26 18:43:23 -04:00
Zaggy1024
1847155b12 LibAudio: Make MP3LoaderPlugin::read_header() static
This will allow us to use the function when sniffing for an MP3 file to
enable consistent checks for valid frame headers.
2023-08-26 18:43:23 -04:00
Zaggy1024
e087d35cd8 LibAudio: Accurately skip MP3 frames using the actual header size
Prevously, the header size was used to calculate the `slot_count` field
of `MP3::Header`, but `build_seek_table()` just used the maximum size
of the header instead, causing it not to seek far enough, and in cases
where a possible sync code occurred two bytes before the next frame, it
would read that possible sync code as if it was a real frame. It would
then either reject it due to bad field values, or could possibly skip
over the next real frame due to a larger calculated frame size in the
bogus frame.

By fixing this issue, we now properly calculate the duration of MP3
files where these fake sync codes occur. In the case of the raw file
for this podcast:

https://changelog.com/podcast/554

the duration goes from 1:21:57 to 1:22:47, which is the real duration
according to the player user interface.
2023-08-26 18:43:23 -04:00
Zaggy1024
5b8895fff0 LibAudio: Create MP3 seek table first and then seek sample 0 to play
The seek table must locate the first MP3 frame in the file, so it makes
sense to locate the samples for the sample table first, then that
information to seek to the first frame.
2023-08-26 18:43:23 -04:00
Zaggy1024
49be09e5b2 LibAudio: Skip ID3 tags before synchronizing to MP3 frames
Previously, we would just start from byte 0 and check individual bytes
of the file until we find two bytes starting with `FF F`, and then
assume that that was the MP3 frame sync code. However, some ID3v2 tags
do not have to be what is referred to as "unsynchronized", meaning that
they can contain that `FF F` sequence and cause our decoder to think it
has found a frame.

To avoid this happening, we can read a minimal amount of the ID3 header
to determine how many bytes to skip before attempting to find the MP3
frames.

This allows the recent podcast with Andreas to play here:

https://changelog.com/podcast/554
2023-08-26 18:43:23 -04:00
Zaggy1024
2dc75a37d2 LibAudio: Set MP3 seek points to their frame's first sample
Seek points were being created after adding to the sample count in
`build_seek_table()`, meaning that they would be offset forward by
`MP3::frame_size` samples.

This also allows us to remove the hardcoded sample 0 seek point that
was previously added, since a seek point at sample 0 will now be added
by the loop.
2023-08-26 18:43:23 -04:00