Commit graph

24092 commits

Author SHA1 Message Date
Kenneth Myhra 59a21c6274 LibWeb: Port CustomEvent to new String 2023-04-07 22:41:01 +02:00
Timothy Flynn a8fce9eec2 LibJS: Update spec numbers for the Intl Enumeration proposal
This proposal has been merged into the main ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/81856b3
2023-04-07 20:50:50 +02:00
Nico Weber d354c1b007 LibGfx: Implement meta prefix code support in webp decoder 2023-04-07 20:49:39 +02:00
Nico Weber 6d38824985 LibCompress: Tolerate more than 288 entries in CanonicalCode
Webp lossless can have up to 2328 symbols. This code assumed the deflate
max of 288, leading to crashes for webp lossless files using more than
288 symbols (such as Tests/LibGfx/test-inputs/simple-vp8l.webp).

Nothing writes webp files at this point, so the m_bit_codes and
m_bit_code_lengths arrays aren't ever used in practice with more than
288 entries.
2023-04-07 20:49:39 +02:00
Nico Weber 55b2977d5d LibGfx: Implement COLOR_TRANSFORM for webp lossless decoder 2023-04-07 20:49:39 +02:00
Nico Weber ebbe4dafa1 LibGfx: Implement PREDICTOR_TRANSFORM for webp lossless decoder
Very much not written for performance at this point.
2023-04-07 20:49:39 +02:00
Nico Weber b1cde0d432 LibGfx: Add CanonicalCode wrapper to webp lossless decoder
WebP lossless differs from deflate in how it handles 1-element codes.
Deflate consumes one bit from the bitstream to produce the element,
while webp lossless consumes 0 bits. Add a wrapper class to handle
this case.
2023-04-07 20:49:39 +02:00
Timothy Flynn f156d3d5e5 LibWeb: Create a basic layout node for HTMLVideoElement 2023-04-07 16:02:22 +02:00
Timothy Flynn 725d7c3699 LibWeb: Implement HTMLVideoElement's video{Width,Height} attributes 2023-04-07 16:02:22 +02:00
Timothy Flynn becd70eccb LibWeb: Begin implementing HTMLMediaElement's readyState attribute
It's not totally clear to me when all of these states are supposed to be
set. For example, nothing in the HTMLMediaElement spec says to "set the
readyState attribute to HAVE_ENOUGH_DATA". However, this will at least
advance the readyState to HAVE_METADATA, which is needed for other
useful attributes for debugging.
2023-04-07 16:02:22 +02:00
Timothy Flynn e10e041882 LibWeb: Implement HTMLMediaElement's duration attribute 2023-04-07 16:02:22 +02:00
Timothy Flynn 5f9fc5aedc LibWeb: Indicate that we may be able to play video MIME types 2023-04-07 16:02:22 +02:00
Timothy Flynn e2f32e6ab3 LibWeb: Parse and load the HTMLMediaElement's src attribute
The spec for loading a media element is quite huge. This implements just
enough to parse the attribute, fetch the corresponding media object, and
decode the media object (if it is a video). While doing so, this also
implements most network state tracking and firing DOM events that may be
observed via JavaScript.
2023-04-07 16:02:22 +02:00
Timothy Flynn 460e1bd072 LibWeb: Implement TrackEvent for media events 2023-04-07 16:02:22 +02:00
Timothy Flynn 3f1badf9b2 LibWeb: Implement VideoTrack and VideoTrackList
This implements the IDL for these types and some event handling around
them.
2023-04-07 16:02:22 +02:00
Timothy Flynn 9f8da9798a LibWeb: Define steps to queue a media element task on a HTMLMediaElement 2023-04-07 16:02:22 +02:00
Timothy Flynn 0a45554bf4 LibWeb: Define missing media HTML event names 2023-04-07 16:02:22 +02:00
Timothy Flynn 660b980660 LibWeb: Sort HTML event names 2023-04-07 16:02:22 +02:00
Timothy Flynn 6d5893a121 LibWeb: Implement HTMLMediaElement's networkState attribute 2023-04-07 16:02:22 +02:00
Timothy Flynn 9a370a5eed LibWeb: Support taking matching tasks out of a task queue
This will be needed for HTMLMediaElement.
2023-04-07 16:02:22 +02:00
Timothy Flynn 807891c0df LibWeb: Support unique task sources
Some elements, like HTMLMediaElement, must have a unique task sources
for every instance of that element that is created. Support this with a
simple wrapper around IDAllocator.
2023-04-07 16:02:22 +02:00
Timothy Flynn c978beb18b LibVideo: Extract video metadata for public-facing video track data
This copies the video data from the Matroska document into the Track
structure that outside users have access to. Because Track can actually
represent other media types, this is set up such that the Track can hold
metadata for those other types when they are needed.

This is needed for LibWeb's HTMLMediaElement implementation.
2023-04-07 16:02:22 +02:00
Cubic Love f522178881 Base: Add icons for Assistant
Add 32px and 16px application icons for Assistant
2023-04-07 11:44:23 +01:00
martinfalisse c839c51b0b LibWeb: Use max-width property in table formatting 2023-04-07 10:42:26 +02:00
Andreas Kling 7b4c76788b LibWeb: Don't put abspos grid/flex items in anonymous wrapper
Grid and flex containers have their own rules for abspos items, so we
shouldn't try to be clever and put them in the "current" anonymous
wrapper block. That behavior is primarily for the benefit of block &
inline layout.
2023-04-07 10:15:16 +02:00
Nico Weber 8760376abe LibGfx: Implement SUBTRACT_GREEN_TRANSFORM for webp lossless decoder 2023-04-07 09:47:04 +02:00
Nico Weber cdc77f7512 LibGfx: Add scaffolding for applying transforms to webp lossless decoder
Each of the four transforms will inherit from this class.
2023-04-07 09:47:04 +02:00
Nico Weber b15d3b2329 LibGfx: Add more dbgln_if()s to webp decoder
They were useful while debugging the decoder. Keep them in for a bit.
2023-04-07 09:47:04 +02:00
Nico Weber 2fc682c033 LibGfx: In webp decoder, check that each transform is used only once 2023-04-07 09:47:04 +02:00
Nico Weber ae1f7124ac LibGfx: Correctly handle more than one PrefixCodeGroup in webp decoder
The `static` here meant we always kept the alphabet sizes of the
first image we happened to load -- and a single webp lossless image
can store several helper images used during decoding.

Usually, the helper images wouldn't use a color cache but the main
image would, but the main image would then use the first entry from
the helper images due to the `static`, which led us to not decoding
the codes for the color cache symbols.
2023-04-07 09:47:04 +02:00
Kenneth Myhra 4d87072201 LibWeb: Port {HTML,UIEvents,XHR}::EventNames to new String 2023-04-06 23:49:08 +02:00
Kenneth Myhra 3aa485aa09 LibWeb: Move string literals to {HTML,UIEvents}::EventNames.h
This moves the reamining string literals from GlobalEventHandlers.h to
{HTML,UIEvents}::EventNames.h.
2023-04-06 23:49:08 +02:00
Matthew Olsson bdab61ad93 LibWeb: Add the WritableStreamDefaultWriter interface 2023-04-06 22:54:58 +02:00
Matthew Olsson e93560b769 LibWeb: Add the WritableStream interface 2023-04-06 22:54:58 +02:00
Matthew Olsson 78feba401d LibWeb: Move property_to_callback to Streams/AbstractOperations
This will be necessary for UnderlyingSink, which is WritableStream's
equivalent of UnderlyingSource, and functions in much the same way.
2023-04-06 22:54:58 +02:00
Timon Kruiper 200e91cd7f Kernel+LibC: Modify aarch64's __mcontext to store registers in an array
This commit also removes the unnecessary ifdefs from
sys/arch/aarch64/regs.h. Contributed by konrad, thanks for that.
2023-04-06 21:19:58 +03:00
Luke Wilde cb62ffbb8a LibWeb: Transform the default path in CRC2D#fill(CanvasFillRule)
Required by Factory Balls Forever to position anything that isn't an
image.
2023-04-06 17:45:07 +02:00
Andreas Kling b97229c9b5 LibWeb: Ignore preferred width when calculating intrinsic width of block
When calculating the intrinsic width of a block-level box, we now ignore
the preferred width entirely, and not just when the preferred width
should be treated as auto.

The condition for this was both confused and wrong, as it looked at the
available width around the box, but didn't check for a width constraint
on the box itself.

Just because the available width has an intrinsic sizing constraint
doesn't mean that the box is undergoing intrinsic sizing. It could also
be the box's containing block!
2023-04-06 16:47:40 +02:00
Emily Trau 332bb8a299 LibEDID: Fix compiler error when ENABLE_PNP_IDS_DOWNLOAD=OFF 2023-04-06 10:26:21 -04:00
Lucas CHOLLET cfaa51203f LibGfx/JPEG: Use a smaller type to store coefficients
No need to store them in `i32`, the JPEG norm specifies that they are
not bigger than 16 bits for extended JPEGs. So, in this patch, we
replace `i32` with `i16`. It almost divides memory usage by two :^)
2023-04-06 12:00:08 +01:00
Luke Wilde a744ae79ff LibWeb: Implement the :defined pseudo class
This selects an element if it is either a built-in element, or an
upgraded custom element.
2023-04-06 11:36:56 +02:00
Luke Wilde 32e27bc7fa LibWeb: Add a bunch of missing CEReactions
This is almost guaranteed not to be all CEReactions we need to add, but
this puts us in a much better situation.
2023-04-06 11:36:56 +02:00
Luke Wilde 034aaf3f51 LibWeb: Introduce CustomElementRegistry and creating custom elements
The main missing feature here is form associated custom elements.
2023-04-06 11:36:56 +02:00
Luke Wilde 083b547e97 LibWeb/WebIDL: Add the construct abstract operation
This will be used by custom elements to upgrade an element to a custom
element.
2023-04-06 11:36:56 +02:00
Luke Wilde 9b8b363445 LibWeb/WebIDL: Move call_user_object_operation out of line
This makes it in line with `invoke_callback`.
2023-04-06 11:36:56 +02:00
Evan Smal 5b906d9a40 HackStudio: Add configuration domain pledge for FileManager
This fixes a bug where clicking the "Save" button would crash the
application because 'FileManager' was a pledged domain.
2023-04-06 08:56:57 +01:00
Julian Offenhäuser 602f5459bf LibGfx: Fix out of bounds read in BitmapFont::masked_character_set()
When creating a copy of the font containing only the glyphs that are in
use, we previously looped over all possible code points, instead of the
range of code points that are actually in use (and allocated) in the
font. This is a problem, since we index into the array of widths to find
out if a given glyph is used. This array is only as long as the number
of glyphs the font was created with, causing an out of bounds read when
that number is less than our maximum.
2023-04-06 08:26:22 +01:00
Cameron Youell 0c98cde18e GMLPlayground: Pledge Calendar domain
This now allows for the preview of `@GUI::Calendar` without
crashing the whole program.
2023-04-06 08:24:25 +01:00
Kenneth Myhra 1080281e58 LibWeb: Port AbstractBrowsingContext to String 2023-04-06 08:41:43 +02:00
Kenneth Myhra 03d6cb88ff LibWeb: Port KeyboardEvent to new String 2023-04-06 08:41:43 +02:00