Commit Graph

61556 Commits

Author SHA1 Message Date
Tim Ledbetter
d6297ec074 LibWeb: Cast to the correct type in Element::auto_directionality()
Previously, we always cast to a HTMLInputElement when getting the value
of an auto directionality form associated element. This caused
undefined behavior when determining the directionality of an element
that wasn't a HTMLInputElement.
2024-05-28 09:51:07 +02:00
Tim Ledbetter
0b0ad5c9db LibWeb: Calculate width property resolved value correctly
This means that relative width values are now correctly resolved when
calling `getComputedStyle()`.
2024-05-28 08:08:31 +02:00
Tim Ledbetter
7d192ed8c1 LibWeb: Don't crash on clicking a label with an associated text input
Previously, we assumed that all label control paintables were of type
`LabelablePaintable`. This caused a crash when clicking on a label with
a text input control.
2024-05-28 08:07:05 +02:00
Shannon Booth
6466fca20a LibWeb: Implement BaseAudioContext.createGain 2024-05-28 08:06:09 +02:00
Shannon Booth
1fa7235fec LibWeb: Add Implement GainNode interface
As with all other current audio nodes we still need to wire up the
inputs and outputs so it can be properly used in an audio context - but
this is enough to implement the public IDL interface.
2024-05-28 08:06:09 +02:00
Shannon Booth
cb9e0c4e64 Ladybird/Qt: Wire up screen added and removed events 2024-05-27 17:24:51 -06:00
Shannon Booth
dfc7534eef Ladybird/Qt: Factor out a method to update the screen rects 2024-05-27 17:24:51 -06:00
Shannon Booth
97bf9e7953 LibWeb: Stub out Window-Management proposal extensions to Screen API
As defined in https://w3c.github.io/window-management
2024-05-27 17:24:51 -06:00
Simon Wanner
b79815c5a5 LibTextCodec: Add x-mac-cyrillic decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
07a9435da5 LibTextCodec: Add windows-1258 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
275b89720b LibTextCodec: Add windows-1257 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
c76308c7e6 LibTextCodec: Add windows-1256 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
eb9ed10573 LibTextCodec: Add windows-1253 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
2d35687db0 LibTextCodec: Add windows-874 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
1b6878b6ca LibTextCodec: Add KOI8-U decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
1fd3a6f48c LibTextCodec: Add ISO-8859-16 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
3e882f26db LibTextCodec: Sort checks in decoder_for mostly alphabetically
Keeps checks for common encodings (Latin1 & UTF-*) at the top.
2024-05-27 20:50:50 +02:00
Simon Wanner
56241df604 LibTextCodec: Add ISO-8859-14 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
4188e328ac LibTextCodec: Add ISO-8859-13 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
cc640f4363 LibTextCodec: Add ISO-8859-10 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
d73220837e LibTextCodec: Add ISO-8859-8(-I) decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
24028e353e LibTextCodec: Add ISO-8859-7 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
01c3b8091a LibTextCodec: Add ISO-8859-6 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
763d904ad5 LibTextCodec: Add ISO-8859-5 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
c6b17320db LibTextCodec: Add ISO-8859-4 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
6c84edaaa2 LibTextCodec: Add ISO-8859-3 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
fc783199f1 LibTextCodec: Add IBM866 decoder 2024-05-27 20:50:50 +02:00
Simon Wanner
96b3c35358 LibTextCodec: Implement table based decoders as SingleByteDecoder
Instead of copy-pasting the implementation, let's use a single class.
This "Single Byte Decoder" concept even exists in the Encoding Spec :^)
2024-05-27 20:50:50 +02:00
Simon Wanner
3029406c4b LibWeb: Handle TextDecoder's fatal flag 2024-05-27 20:50:50 +02:00
Diego
f8ac883fb4 LibWasm: Implement element section parsing 2024-05-27 19:38:45 +02:00
Kenneth Myhra
dacba5e610 Tests/LibWeb: Initialize 'arrayBuffer' to an UInt8Array
This initializes 'arrayBuffer' to an UInt8Array so that we can
manipulate the contents of 'arrayBuffer'. The test verifies that the
internal buffer is an ArrayBuffer.

Also:
* Correct comparison in test so that we compare arrayBuffer to
  arrayClone, not to itself.
* Remove FIXME, this outputs [object ArrayBuffer] in Firefox and Chrome
  too.
2024-05-27 17:37:27 +02:00
Idan Horowitz
95b9d77536 Kernel: Prevent reference to unaligned u32 in MBRPartitionTable init
This is technically UB, so triggers KUBSAN.
2024-05-27 17:35:42 +02:00
Idan Horowitz
b4cdd6a55c Kernel: Prevent integer overflow in USB::Hub::check_for_port_updates()
The maximum valid value is 255, so max + 1 doesn't fit in a u8.
2024-05-27 17:35:42 +02:00
Idan Horowitz
80dad2d0b5 Meta: Unbreak default grub configs after Prekernel/Kernel merge
These still assume the main boot image is called Prekernel, which is no
longer the case.
2024-05-27 17:35:42 +02:00
Jamie Mansfield
3095daa7c8 LibWeb: Implement HTMLImageElement.currentSrc
Removes some console noise from lner.co.uk :)
2024-05-27 17:34:59 +02:00
Jamie Mansfield
600daea544 LibWeb: Implement HTMLIFrameElement.loading 2024-05-27 17:34:59 +02:00
Jamie Mansfield
9ee061ea14 LibWeb: Implement HTMLImageElement.loading
Removes some console noise while loading mmu.ac.uk :)
2024-05-27 17:34:59 +02:00
Jamie Mansfield
c484625631 LibWeb: Add IDL enum for lazy loading attribute 2024-05-27 17:34:59 +02:00
Aliaksandr Kalenik
f989ebe180 LibWeb: Replace visit() with ifelseif chain in CommandList::execute()
Deeply nested stack traces caused by using visit() were really hard to
read in profiles.
2024-05-27 17:33:40 +02:00
Aliaksandr Kalenik
eff9bbf4c8 LibWeb: Pass whole command by reference into painting command executor
Now after making a change in a painting command we could avoid updating
method's parameters list across 3 classes.
2024-05-27 17:33:40 +02:00
Andreas Kling
2aab56bf71 LibJS: Null-check current executable in VM::dump_backtrace()
If there is no current executable (because we're in a native function
call), we shouldn't try to dereference it.
2024-05-27 17:33:29 +02:00
Andreas Kling
802af5ad9d LibWeb: Allow Element.insertAdjacentHTML on the document element
This fixes wpt/domparsing/insert_adjacent_html.html
2024-05-27 17:33:29 +02:00
Andreas Kling
f12dae7ea4 LibWeb: Update spec link & comments in Element.insertAdjacentHTML()
This has moved from DOM Parsing to HTML, and the comments are slightly
different.
2024-05-27 17:33:29 +02:00
Andreas Kling
e7febd347b LibWeb: Don't advertise the empty string as HTMLCollection property name
This fixes wpt/dom/collections/HTMLCollection-empty-name.html
2024-05-27 17:33:29 +02:00
MacDue
8988dce93d LibGfx: Add early bounds checking to accumulate_non_zero_scanline()
Nonzero fills are much more common (as the default fill rule), so if
this does result in any speed-up it makes sense to do it here too.
2024-05-27 13:02:17 +02:00
MacDue
9a3470c2c5 LibGfx: Fix bounds checking in accumulate_even_odd_scanline()
`edge_extent.max_x` is inclusive so it must be < `m_scanline.size()`.
2024-05-27 13:02:17 +02:00
Diego
e345d65def LibWasm: Use TRY macro when possible
This removes a lot of the error handling boilerplate, and is more
consistent with the rest of the codebase.
2024-05-27 12:44:21 +02:00
Aliaksandr Kalenik
0eeae7ff24 LibWeb: Use stack to represent blit/sample corners commands state
...instead of allocating separate BorderRadiusCornerClipper for each
executed sample/blit commands pair.

With this change a vector of BorderRadiusCornerClipper has far fewer
items. For example on twitter profile page its size goes down from
~3000 to ~3 items.
2024-05-27 04:26:17 +02:00
Aliaksandr Kalenik
9b65a2731b LibWeb: Remove clipper creation error check in sample_under_corners()
Before, this check was needed to prevent crashing when attempting to
allocate zero-size bitmap for sampled corners, which could have happened
if a corner had 0 radius in one axis.

Now, since SampleUnderCorners command is not emmited when radius is 0
in one axis, this check is no longer needed.
2024-05-27 04:26:17 +02:00
Aliaksandr Kalenik
9be65e35b5 Revert "LibGfx+LibWeb: Do not ignore corner radius if it is defined..."
This reverts commit 6b7b9ca1c4b32e76e0afef6bca0cb300e615b576.

The whole corner radius is invisible if it has 0 radius in any axis, so
the reverted commit was a mistake that led to error checking during
painting command execution b61aab66d9 to
avoid crashing on attempt to allocate 0 size bitmap.
2024-05-27 04:26:17 +02:00