Commit graph

50742 commits

Author SHA1 Message Date
Matthew Olsson
dd65d60069 LibWeb: Use doubles for Stream's high_water_mark and queue_total_size
This matches the IDL types
2023-05-27 13:55:14 +02:00
Matthew Olsson
f63d027b0b Meta: Fix unresolvable reference to WebIDL::OperationReturnsPromise 2023-05-27 13:55:14 +02:00
Matthew Olsson
bdfc14f24d LibWeb: Accept explicit "type: undefined" in UnderlyingSource 2023-05-27 13:55:14 +02:00
Matthew Olsson
5d48ade508 LibWeb: Use TRY() to convert invoke_callback result to an ExceptionOr
Otherwise, the JS::Completion is always interpretted as an error by
ExceptionOr.
2023-05-27 13:55:14 +02:00
Matthew Olsson
e5ff777b48 LibWeb: Capture stack values by copy in async lambdas in Stream AOs 2023-05-27 13:55:14 +02:00
Matthew Olsson
42fb847cc8 LibWeb: Use u64 for ReadableByteStream offsets instead of u32
These are specified in the IDL as "unsigned long long", which translates
to u64.
2023-05-27 13:55:14 +02:00
Ben Wiederhake
5fafd82927 AK+Everywhere: Don't crash on invalid months
Sadly, we don't have proper error propagation here. However, crashing
the Kernel just because a CDROM contains an invalid month seems like a
bad idea.
2023-05-27 12:17:50 +02:00
Ben Wiederhake
9d40ecacb5 AK: Fix signed overflow in unix time parts parsing 2023-05-27 12:17:50 +02:00
Ben Wiederhake
815ea06d2c AK: Test from_unix_time_parts intensively 2023-05-27 12:17:50 +02:00
Andreas Kling
e30709fca9 LibWeb: Don't throw away the layout tree on viewport resize
We'll throw it out automatically if some media query changes changes its
evaluation state in response to the resize, and that should be enough.
2023-05-27 11:43:56 +02:00
Andreas Kling
78d6e2db8c LibWeb: Don't invalidate style when attribute set to identical value
This was a fairly common source of unnecessary style invalidations.
2023-05-27 11:43:56 +02:00
Liav A
8142f7b196 Kernel: Mark sys$get_dir_entries as not needing the big lock
After examination of all overriden Inode::traverse_as_directory methods
it seems like proper locking is already existing everywhere, so there's
no need to take the big process lock anymore, as there's no access to
shared process structures anyway.
2023-05-27 10:58:58 +02:00
Liav A
2ab657d3b5 Kernel: Make Ext2FSInode::traverse_as_directory to take m_inode_lock
The contents of the directory inode could change if we are not taking so
we must take the m_inode_lock to prevent corruption when reading the
directory contents.
2023-05-27 10:58:58 +02:00
Liav A
46ef2f8e20 Kernel: Mark sys$fork as not needing the big lock
All shared structures are already protected by "atomic" spinlocks for
those structures, so there's no need to take the big process lock.
2023-05-27 10:58:58 +02:00
Liav A
0be79f9bc2 Kernel: Mark sys$umount as not needing the big lock
All accesses to the mount table are already serialized by the actual
spinlock of that table.
2023-05-27 10:58:58 +02:00
Liav A
902dac7f5f Kernel: Don't lock ProcFS mutex when calling traverse_as_directory
This is not needed, because when we are doing this traversing, functions
that are called from this function are using proper and more "atomic"
locking.
2023-05-27 10:58:58 +02:00
Liav A
bce17d06f5 Kernel: Don't lock SysFS filesystem mutex calling traverse_as_directory
This locking is simply not needed because the associated SysFS component
will use proper and more "atomic" locking on its own.
2023-05-27 10:58:58 +02:00
Ben Wiederhake
a467f78aa7 LibCore: Remove unused API of deprecated Core::IODevice 2023-05-27 07:16:01 +02:00
Ben Wiederhake
7e70ca1040 LibCore: Remove deprecated LineRange and LineIterator 2023-05-27 07:16:01 +02:00
Ben Wiederhake
f93ee3142d LibLine: Unify history reading, prefer File over DeprecatedFile 2023-05-27 07:16:01 +02:00
Ben Wiederhake
64a2a63df6 LibCore: Drop TestLibCoreIODevice
It does not make sense to test known-working code that is deprecated and
in the process of being removed. Also, this test becomes too cumbersome
to write without using read_all or line iteration in some form, and
migrating the test is just silly.
2023-05-27 07:16:01 +02:00
Andreas Kling
8ba7bd1b67 LibWeb: Accept fit-content as a value for min-width and max-width
This starts working immediately in BFC thanks to calculate_inner_width
being used for width constraints. :^)
2023-05-27 05:47:54 +02:00
Andreas Kling
1bb4e5c428 LibWeb: Support fit-content width for block-level boxes 2023-05-27 05:47:54 +02:00
Andreas Kling
a277c393b9 LibWeb: Support grid items with fit-content width :^) 2023-05-27 05:47:54 +02:00
Andreas Kling
299775345d LibWeb: Allow calculating intrinsic sizes of non-FC-roots
In order to support intrinsic size keywords (such as fit-content), we
need to be able to calculate the intrinsic sizes of any element, not
just those that form their own formatting context.

When a non-FC-root element is passed to calculate_some_intrinsic_size(),
we now create a synthetic BFC to handle sizing of them.
2023-05-27 05:47:54 +02:00
Andreas Kling
09eb3ef405 LibWeb: Add fit-content as a valid size value for CSS width 2023-05-27 05:47:54 +02:00
Nico Weber
1dfb065a9c LibGfx+LibVideo: Make BooleanDecoder usable for both VP8 and VP9
The marker bit is VP9-only, so move that into a new initialize_vp9()
function.

finish_decode() is VP9-only, so rename that to finish_decode_vp9().
2023-05-27 05:47:42 +02:00
Nico Weber
fbc53c1ec3 LibGfx+LibVideo: Move VP9/BooleanDecoder to LibGfx/ImageFormats
...and keep a forwarding header around in VP9, so we don't have to
update all references to the class there.

In time, we probably want to merge LibGfx/ImageDecoders and LibVideo
into LibMedia, but for now I need just this class for the lossy
webp decoder. So move just it over.

No behvior change.
2023-05-27 05:47:42 +02:00
Aliaksandr Kalenik
ab5b89eb95 LibWeb: Add basic parsing of grid shorthand CSS property
Introduces incomplete parsing of grid shorthand property. Only
<grid-template> part of syntax is supported for now but it is enough
to significantly improve rendering of websites that use this shorthand
to define grid :)
2023-05-27 05:47:14 +02:00
Andi Gallo
1e526af430 LibWeb: Fix width calculation for floating replaced elements
The path for floating, replaced elements must not fall through to the
path taken for floating, non-replaced elements. The former works like
inline replaced elements, while the latter uses a completely different
algorithm which doesn't account for intrinsic ratio. Falling through
overrides the correct value computed by the former.

Fixes #19061.
2023-05-26 21:20:56 +02:00
Aliaksandr Kalenik
7cc20f4cb5 LibWeb: Reset margin collapsing state only if box indeed add clearance
This fixes the issue when margin collapsing state was always reset if
a box has clear property not equal to none even if it does not actually
introduce clearance.
2023-05-26 18:11:35 +02:00
Sam Atkins
b0a43404b9 LibWeb: Avoid nullptr dereference when parsing grid sizes 2023-05-26 17:53:11 +02:00
Andreas Kling
0d4c7fa392 LibJS/Bytecode: Make for..in iterate property names as string
Makes 107 new tests pass in test262. :^)
2023-05-26 17:52:51 +02:00
Caoimhe
360b8b166f Kernel/aarch64: Use the correct MMIO base address in the MMU 2023-05-26 08:29:26 -06:00
Caoimhe
b0eff23a46 Documentation: Add note about testing UART on the Raspberry Pi 4B 2023-05-26 08:29:26 -06:00
Cameron Youell
0afdde0eef LibWeb: Consume sign in SVG::parse_elliptical_arg_argument
This was crashing on google.com with the linux chrome user agent,
interestingly it seems like this behavior may have been accidental as
only two of the three `parse_number()` were changed in f7dbcb6
2023-05-26 14:54:00 +02:00
Andi Gallo
5cec517153 LibWeb: Get reference height from closest non-anonymous ancestor
Ignore anonymous block boxes when resolving percentage weights that
would refer to them, per the CSS 2 visual formatting model
specification. This fixes the case when we create an anonymous block
between an image which uses a percentage height relative to a parent
which specifies a definite height.

Fixes #19052.
2023-05-26 14:53:53 +02:00
Timothy Flynn
706a20c4d4 LibJS: Disallow creating ArrayBuffers larger than 2^53 - 1
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/25f9744
2023-05-26 05:23:55 +02:00
Timothy Flynn
d31b780760 LibJS: Update spec numbers for the Well-Formed Unicode Strings proposal
This proposal has been merged into the main ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/d95f42d
2023-05-26 05:23:55 +02:00
PrestonLTaylor
5d3b7a5ecc LibWeb: Return DOMException instead of crashing when setting attributes 2023-05-26 05:23:09 +02:00
Aliaksandr Kalenik
6891676fce LibGfx: Fix glyph render to create implied points in start/end of path
Implied point = point created by two subsequent "off curve" points.

Fixes following issues in function that builds glyph path from points:
- If first point is "off curve" it was wrongly treated as "on curve"
  which caused wrong first point position in the path.
- If both first and last points in the path are "off curve" implied
  point was not created between them which caused wrong path shape in
  the end of the path.
2023-05-26 05:21:08 +02:00
sec05
6a886e4aac Browser: Download Widget file and directory text changes
fixes #18678

This is because the "From:" URL regularly overflows the line, leading
to an unreadable mess. Make sure that the labels for the widget
don't wrap as well, as the widget is fixed height and width.
2023-05-25 17:45:16 -06:00
Andreas Kling
624f43c12b LibWeb: Do the CORS cross-origin workaround to find MIME type for images
This makes cross-origin image loads actually see the MIME type the
server tells us. :^)
2023-05-25 12:53:41 -07:00
Andreas Kling
aeffa0d988 LibWeb: Make Fetch::Infrastructure::HeaderList::is_empty() public 2023-05-25 12:53:41 -07:00
Daniel Bertalan
906abbdf53 Kernel/aarch64: Fix build after #17842 2023-05-25 08:26:07 -07:00
Andreas Kling
475bac89e1 LibWeb: Don't crash on unimplemented CSS display type
If some page throws "display: ruby-text" or some such at us, let's just
complain and carry on.
2023-05-25 16:49:34 +02:00
Andreas Kling
9c8da4374d LibWeb: Try failed font lookups again without weight and slope
If CSS requests a font that we have loaded, but we didn't associate it
with a specific weight and/or slope, let's still use it if it matches
the family name.

This is a hack until we implement proper CSS font selection.
2023-05-25 16:49:34 +02:00
Sam Atkins
f6fae315e3 LibWeb: Add CustomIdentStyleValue, along with parsing for it
This corresponds to the `<custom-ident>` type in CSS grammar.
2023-05-25 15:31:20 +01:00
Jelle Raaijmakers
b76219f702 Meta: Add myself to CODEOWNERS for LibSQL 2023-05-25 06:19:16 -07:00
Jelle Raaijmakers
69e09fed39 LibSQL: Free heap storage when deleting rows 2023-05-25 06:19:16 -07:00