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
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
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
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
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
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
Kenneth Myhra
e14be3927a
LibWeb: Port FocusEvent to new String
2023-04-06 08:41:43 +02:00
matcool
cc33a57620
LibWeb: Use intrinsic aspect ratio when calculating max content height
2023-04-05 16:23:56 +02:00
Kenneth Myhra
1120011de4
LibWeb: Add FormData support to XHR
...
This adds FormData support to XHR so that it can post
multipart/form-data encoded data.
2023-04-05 09:43:52 +01:00
Kenneth Myhra
5df4d66d91
LibWeb: Add get accessor to internal entry list of FormData
2023-04-05 09:43:52 +01:00
Kenneth Myhra
84722ae2ef
LibWeb: Implement multipart/form-data encoding algorithm
2023-04-05 09:43:52 +01:00
Timothy Flynn
69e8216f2c
LibWeb: Do not use OS error codes in the error callback for file:// URLs
...
The error code passed here is expected to be an HTTP error code. Passing
errno codes does not make sense in that context.
2023-04-04 22:41:20 +01:00
Timothy Flynn
ddb4137ed4
LibWeb: Ensure fetch errors set their response types/codes appropriately
...
If we fail to set the response type to an error, calling code will think
the fetch was successful. We also should not default to an error code of
200, which would also indicate success.
2023-04-04 22:41:20 +01:00
MacDue
b85d24b1f4
LibWeb: Expand background-position layers into x/y position lists
...
This fixes multi-layer backgrounds with background positions. This
is a little awkard, so maybe it would be better to refactor the
parsing code to make these lists directly, but right now this is
the simplest fix.
2023-04-03 20:54:36 +02:00
MacDue
ca02c433d2
LibWeb: Add getter for separator to StyleValueList
2023-04-03 20:54:36 +02:00
Timothy Flynn
15532df83d
AK+Everywhere: Change AK::fill_with_random to accept a Bytes object
...
Rather than the very C-like API we currently have, accepting a void* and
a length, let's take a Bytes object instead. In almost all existing
cases, the compiler figures out the length.
2023-04-03 15:53:49 +02:00
MacDue
bed55ac669
LibWeb: Parse and plumb background-position-x/y
...
This parses the new background-position-x/y longhands and properly
hooks up them up. This requires converting PositionStyleValue to
just contain two EdgeStyleValues so that it can be easily expanded
into the longhands.
2023-04-03 07:10:33 +02:00
MacDue
2a659693bc
LibWeb: Add EdgeStyleValue
...
This represents a single edge and offset, this will be needed for
the values of background-position-x/y.
2023-04-03 07:10:33 +02:00
MacDue
d5e61168b2
LibWeb: Add longhand properties for background-position
...
If background-position was not longhand enough for you, we've
now got background-position-x and background-position-y :^)
2023-04-03 07:10:33 +02:00
martinfalisse
289285cd6e
LibWeb: Add borders functionality to CSS Grid
2023-04-02 19:08:04 +02:00
martinfalisse
6f52272d34
LibWeb: Fix regression in definite grid row heights
...
Fixes a row height bug when a grid item in a row has a definite height.
2023-04-02 19:08:04 +02:00
martinfalisse
e65f4b3dc5
LibWeb: Rename PositionedBox to GridItem
...
This seems like a more accurate description of what this class really
is, and easier to understand in my opinion.
2023-04-02 19:08:04 +02:00
Andreas Kling
8bb0be7d4f
LibWeb: Don't apply presentational hints to associated pseudo elements
...
CSS properties generated by presentational hints in content attributes
should not leak into pseudo elements.
2023-04-02 15:00:06 +02:00
Andreas Kling
620a34a463
LibWeb: Don't apply element inline style to associated pseudo elements
...
An element's inline style, if present, should not leak into any pseudo
elements generated by that element.
2023-04-02 15:00:06 +02:00
Andreas Kling
9cded6e1b5
LibWeb: Fix application of intrinsic aspect ratio to flex column items
...
The intrinsic aspect ratio of a box is a width:height ratio, so if we
have the width and need the height, we should divide, not multiply. :^)
2023-04-02 06:45:44 +02:00
Andreas Kling
2413de7e10
LibWeb: Make HTMLImageElement loads delay the document load event
...
This is something we're supposed to do according to the HTML spec.
Note that image loading is currently completely ad-hoc, and this just
adds a simple DocumentLoadEventDelayer to the existing implementation.
This will allow us to use images in layout tests, which rely on the
document load event firing at a predictable time.
2023-04-02 06:45:44 +02:00
Matthew Olsson
36ca1386e8
LibWeb: Add ReadableStream.locked/cancel()/getReader()
2023-04-01 23:43:07 +01:00
Matthew Olsson
d8710aa604
LibWeb: Implement ReadableStream's constructor
2023-04-01 23:43:07 +01:00
Matthew Olsson
66dec1bf54
LibWeb: Add UnderlyingSource struct for ReadableStream constructor
2023-04-01 23:43:07 +01:00