Commit Graph

53932 Commits

Author SHA1 Message Date
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
Zaggy1024
89fb4af429 LibAudio: Default-initizalize all types in MP3Types.h 2023-08-26 18:43:23 -04:00
MacDue
71baa8c31a LibWeb: Add CSSPixels::nearest_value_for(FloatingPoint)
This is intended to annotate conversions from unknown floating-point
values to CSSPixels, and make it more obvious the fp value will be
rounded to the nearest fixed-point value.
2023-08-26 23:53:45 +02:00
MacDue
360c0eb509 LibWeb: Remove implicit conversion from float and double to CSSPixels
In general it is not safe to convert any arbitrary floating-point value
to CSSPixels. CSSPixels has a resolution of 0.015625, which for small
values (e.g. scale factors between 0 and 1), can produce bad results
if converted to CSSPixels then scaled back up. In the worst case values
can underflow to zero and produce incorrect results.
2023-08-26 23:53:45 +02:00
Timothy Flynn
0f9c088302 Ladybird: Install the native style sheet into the JS console web view
Without this, we are unable to render the web view in dark mode.
2023-08-26 15:32:36 -04:00
Timothy Flynn
3f122b7335 LibWebView: Allow using native/user style sheets on Lagom
Move the methods to set the native/user style sheets to the base
ViewImplementation class. We must also generate the native style sheet
explicitly for now, as LibWebView on Lagom isn't able to include the
main LibWebView CMakeLists.txt file yet.
2023-08-26 15:32:36 -04:00
Timothy Flynn
7df48756d6 LibWeb: Use SystemColor::button_text for ButtonText CSS values 2023-08-26 19:24:22 +02:00
Aliaksandr Kalenik
0060fe3095 LibWeb: Account for float intrusions in list marker x offset 2023-08-26 19:07:56 +02:00
Sam Atkins
240ec9aeed LibWeb: Treat invalid StyleValues that included var() as unset
This means StyleComputer::resolve_unresolved_style_value() always
returns a value, so we can change its return type.

However, it does still return an UnresolvedStyleValue sometimes, so we
can't remove those checks from the user code.
2023-08-26 15:33:45 +01:00
Sam Atkins
6b66e80fb8 LibWeb: Sort Ref/mainfest.json entries 2023-08-26 15:33:45 +01:00
Liav A
4177e6be8b Kernel: Remove KDSETMODE and KDGETMODE ioctl options from the TTY class
These options are not relevant and are actually meaningless on pure TTY
devices, as they are meant to be effective only for the VirtualConsole
devices.

This also removes the virtual marking from two methods because they're
no longer declared in the TTY class as well.
2023-08-26 16:29:28 +02:00
Adam Harald Jørgensen
258af88b29 LibGUI: Fix search highlighting so that it matches the search query
There is a bug in the "search by typing" feature of
AbstractView, where the highlighted text shown in items' title won't
match the search query if the search query contains whitespace.
This commit fixes that bug.

The bug is caused by a bad assumption made in
AbstractView::draw_item_text about the Painter::draw_text API.
Specifically that the function passed to it will be called for each
code point of the string instead of for each drawable glyph.

This is fixed by not relying on looking at the length of the highlight
string, but instead looking at its content.
2023-08-26 09:09:47 -04:00
Shannon Booth
f115e44066 LibWeb: Implement value attribute of RadioNodeList 2023-08-26 13:51:18 +02:00
Shannon Booth
708263790a LibWeb: Implement LiveNodeList::first_matching
This function returns the first element which matches both the filter
for the LiveNodeList collection itself, and a further filter that is
supplied as an argument to this function.
2023-08-26 13:51:18 +02:00
Shannon Booth
191c87f1cd LibWeb: Handle 'default' value state for input elements
For buttons and the hidden state the value IDL call must return the
empty string if there is no value, and the elements value attribute
otherwise.
2023-08-26 13:51:18 +02:00
Shannon Booth
0f374afc8f LibWeb: Handle radio/checkbox default-or-on value attribute state
If the value attribute is missing, these input elements should be
returning 'on' as their value in their IDL.
2023-08-26 13:51:18 +02:00
Shannon Booth
fc4fd6cb02 LibWeb: Fix empty value attribute for 'file' input returning fakepath
It should be returning the empty string for this case.
2023-08-26 13:51:18 +02:00
Aliaksandr Kalenik
c03e025a32 LibWeb: Disambiguate GridTrackPlacement API
- Ambiguous `raw_value()` method is replaced with `line_number()` and
  `span()`.
- `line_name()` that before returned either line name or area name is
  replaced with `line_name()` and `area_name()`.
- `Position` type is replaced with `Line` and `Area` type so we don't
   have to guess while doing layout.

Affected test expectations:
- `template-lines-and-areas` - improvement over what we had before.
- `named-tracks` - rebaseline a giant test. will have to split it into
  smaller tests in the future.
2023-08-26 13:16:17 +02:00
Andi Gallo
29352f570a LibWeb: Fix table column constrainedness
Adjust implementation to reflect the CSS 2.1 definition of width.
2023-08-26 13:10:45 +02:00
Andreas Kling
c6cb876851 LibWeb: Use a serif font in the default UA style sheet
This matches how most/all other browsers behave today.
2023-08-26 12:13:00 +02:00