Tim Ledbetter
c36ba450be
LibWeb: Generate binding for HTMLObjectElement.contentWindow attribute
...
This only required adding the appropriate definition to the IDL file,
as `NavigableContainer` already implements the logic that we need.
2024-05-18 18:12:08 +02:00
Tim Ledbetter
2447a25753
LibWeb: Implement the labels attribute for all labelable elements
...
This returns a `NodeList` of all the labels associated with the given
element.
2024-05-18 18:09:18 +02:00
Tim Ledbetter
3dc86747f0
LibWeb: Implement the HTMLOutputElement.htmlFor attribute
...
This returns a DOMTokenList that reflects the `for` attribute.
2024-05-18 11:23:20 +02:00
Tim Ledbetter
acc1fa3c62
LibWeb: Generate binding for the HTMLObjectElement.form attribute
...
This only required adding the appropriate definition to the IDL file,
as `FormAssociatedElement` already implements the logic that we need.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
6bf22075ed
LibWeb: Implement the HTMLLabelElement.form attribute
...
This returns the form element associated with the given label element's
control or null if the label has no control.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
d0555f3176
LibWeb: Flesh out DOMTokenList::supports() implementation
...
This change makes `DOMTokenList::supports()` work as expected for
`relList` attributes.
2024-05-16 20:31:23 +02:00
Tim Ledbetter
51fc30a191
LibWeb: Implement the HTMLLinkElement.relList attribute
...
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
fc4e0cf10e
LibWeb: Implement the HTMLFormElement.relList attribute
...
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
0a3e1846f0
LibWeb: Implement the HTMLAreaElement.relList attribute
...
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
b7fd39c2e6
LibWeb: Implement the HTMLAnchorElement.relList attribute
...
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
763b7f0e0c
LibWeb: Implement the HTMLOptionElement.form attribute
...
This returns the parent form of a HTMLOptionElement or null if the
element has no parent form.
2024-05-16 08:03:13 +02:00
Andrew Kaster
28f728dfdb
LibWeb: Implement FontFace.load() for url() based font sources
2024-05-16 08:02:43 +02:00
MacDue
6c9069fa5d
LibWeb: Implement the SVG clip-rule attribute
...
This controls the fill rule used when rasterizing `<clipPath>` elements.
2024-05-14 23:01:18 +01:00
Andrew Kaster
60b3436ea3
LibWeb: Support loading FontFaces constructed with binary data
2024-05-14 12:31:10 -06:00
Shannon Booth
452ffa56dc
LibWeb: Implement BaseAudioContext.createDynamicsCompressor
2024-05-14 13:45:43 -04:00
Shannon Booth
27242c6be6
LibWeb: Implement Document.dir
...
This was seen getting called on stuff.co.nz (before it crashes due to an
unrelated navigation bug)
2024-05-14 13:35:36 -04:00
Shannon Booth
9b6a1de777
LibWeb: Implement URL.parse
...
This was an addition to the URL spec, see:
https://github.com/whatwg/url/commit/58acb0
2024-05-13 09:21:12 +02:00
Shannon Booth
5a0f7c5f63
LibWeb/Tests: Add a basic test for a blob URL given to a Worker
2024-05-12 15:46:29 -06:00
Shannon Booth
5e7678d1c6
LibWeb: Implement AudioBuffer.copyFromChannel
2024-05-12 19:11:37 +02:00
Shannon Booth
793cab7357
LibWeb: Add a test for construction of WheelEvent
2024-05-12 14:24:18 +00:00
Shannon Booth
e5206f5529
LibWeb: Only use lowercase attributes on toggle for HTML documents
2024-05-12 07:28:09 +01:00
Andrew Kaster
2bc51f08d9
LibWeb: Implement or stub FontFace interface's attribute getters/setters
...
We only support parsing half of these, so the ones we don't recognize
get a friendly exception thrown.
2024-05-11 07:30:29 +01:00
Timothy Flynn
1fbf1bc4ac
LibWeb: Don't try to click a form image until it has loaded
...
We are often trying to click the image before it has finished loading.
This results in us trying to click a 0x0 rect. Instead, wait until the
image load event.
This fixes a flake with form-image-submission.html often seen on CI.
2024-05-09 19:29:47 +02:00
Shannon Booth
71819153cb
LibWeb: Implement Element::scroll(HTML::ScrollToOptions)
2024-05-07 17:21:52 -06:00
Tim Ledbetter
57f0ea186e
LibWeb: Update Element::directionality() to match current spec text
...
This fixes a crash that occurred when determining the directionality of
input elements.
2024-05-07 16:45:28 -06:00
Shannon Booth
f7ba07cc8b
LibWeb: Handle non-object JSON in XMLHttpRequest response
...
This fixes a crash seen on https://web.basemark.com/run/
2024-05-04 14:11:10 +02:00
Shannon Booth
94354ea7fb
LibWeb: Clamp AudioParam's value between min and max
...
The spec isn't _super_ clear on how this is meant to be done, but the
way I understand this is that we should simply clamp the returned
'current value' between 'min' and 'max'.
Firefox does not appear to do this clamping, but Chrome does.
2024-05-04 14:01:38 +02:00
Shannon Booth
e2b5ff2450
LibWeb: Implement OscillatorNode.frequency
...
Which is an AudioParam clamped by the nyquist_frequency.
2024-05-04 14:01:38 +02:00
Shannon Booth
099c9e4a7e
LibWeb: Implement OscillatorNode.type
...
This is a simple getter and setter of the OscillatorType enum, with
error checking to not allow 'custom', as that should only be changed
through 'setPeriodicWave()'.
2024-05-04 14:01:38 +02:00
Shannon Booth
b48ba823b9
LibWeb: Implement AudioNode.context
...
This is just a simple getter which returns the audio context that
created this audio node.
2024-05-04 14:01:38 +02:00
Shannon Booth
97576d27b9
LibWeb: Add constructor for OscillatorNode
...
This is still missing a bunch of spec steps to construct the
audio node based on the parameters of the OscillatorNode, but it is at
least enough to construct an object to be able to add a basic test which
can get built upon as more is implemented.
2024-05-04 14:01:38 +02:00
Shannon Booth
e070309258
LibWeb: Implement Element.outerHTML setter
2024-05-04 13:54:33 +02:00
Andreas Kling
527ad9ac01
LibWeb: Implement XMLHttpRequest.responseURL
...
This was used on https://twinings.co.uk/ so let's support it :^)
2024-05-01 12:52:03 +02:00
Tim Ledbetter
02a8966b61
LibWeb: Serialize empty media rules with a single newline
...
This deviates from the CSSOM specification but all modern browsers do
this.
2024-05-01 07:21:21 +02:00
Tim Ledbetter
a2cccf9420
LibWeb: Use correct spacing when serializing media features
...
Previously, there was no space between the media feature name and value.
2024-05-01 07:21:21 +02:00
Tim Ledbetter
b9f0ea2178
LibWeb: Evaluate media rules for adopted style sheets
...
Previously, media rules were not evaluated for adopted style sheets.
2024-04-29 08:10:38 +02:00
Tim Ledbetter
f4e0c5395a
LibWeb: Don't apply disabled adopted style sheets to the document
...
Previously, we would apply any adopted style sheet to the document if
its alternate flag was not set. This meant that all adopted style
sheets would be applied, since constructed style sheets never have this
flag set.
2024-04-29 08:10:38 +02:00
Tim Ledbetter
84193f2746
LibWeb: Align StyleSheet title getter with the specification
...
The CSSOM specification says that StyleSheet.title should return null
if the title field is empty.
2024-04-29 08:10:38 +02:00
Timothy Flynn
34b446ab34
LibWeb: Assign the Content-Type fetch response header as appropriate
...
The condition here was inverted.
2024-04-28 12:32:04 +02:00
Tim Ledbetter
1127fa1e01
IDLGenerators: Set namespace object prototype to Object.prototype
...
Previously, namespace objects were constructed with no prototype, so
calling methods like `toString()` on them would unexpectedly throw an
exception.
2024-04-26 20:02:42 +02:00
Tim Ledbetter
dda730c46b
LibWeb: Exclude [Global] interfaces from legacy platform object method
...
Previously, [Global] interfaces were not excluded from the
`internal_own_property_keys()` call. This caused a crash when iterating
over the properties of the Window object.
2024-04-26 20:02:21 +02:00
Shannon Booth
baaaa0008e
LibWeb: Look for first ID _or_ name in HTMLCollection::named_item
...
Previously we would look for a matching ID, and then for a matching
name. If there was an element in the collection which had a matching ID
as well as an element with a matching name, we would always return the
element with a matching ID irrespective of what order that element was
in.
2024-04-26 07:44:01 -04:00
Timothy Flynn
f6407276f7
LibWeb: Stop the video decoder thread when the video element is GC'd
...
Otherwise, the thread will continue to run and access the media data
buffer, which will have been freed.
The test here is a bit strange, but the issue would only consistently
repro after several GC runs.
2024-04-26 09:49:11 +02:00
Shannon Booth
0c8a98ac94
LibWeb: Begin implementing the interface for AudioBuffer
...
Implement the constructor and getChannelData function, working towards
the functionality that we need in order to implement
OfflineAudioContext.
2024-04-25 19:26:19 -04:00
Aliaksandr Kalenik
988c8451d4
LibWeb: Skip HTMLLinkElement resource fetching for documents without BC
...
Fixes crashing after following steps:
1. Open https://github.com/SerenityOS/serenity
2. Click on "Pull requests" tab
The problem was `navigable` null pointer dereferencing in
`decode_favicon()`. But navigable is null because the document was
created by `parseFromString()` DOMParser API.
With this change we skip fetching initiated by HTMLLinkElement if
document does not have a browsing context:
- Favicon is not displayed for such documents so no need to fetch.
- Stylesheets fetching won't affect such document because style or
layout does not run for them.
2024-04-25 09:31:01 +02:00
Cnidarias
1a1e5aaf54
LibWeb: Add null check for get_client_rects() on non paintable elements
2024-04-24 18:04:28 +02:00
Bastiaan van der Plaat
7fa45c5fdf
LibWeb: Add map element areas property
2024-04-24 15:23:45 +02:00
Bastiaan van der Plaat
3e507102ea
LibWeb: Add datalist element options property
2024-04-24 15:23:45 +02:00
Andrew Kaster
651e78fedb
LibWeb: Convert callers of ImageCodecPlugin to the async API
...
The HTMLLinkElement caller is a bit hairy, so we shove an await() in
there temporarily. This is sure to cause fun times for anyone debugging
task/microtask execution order.
2024-04-23 12:32:04 -06:00
Aliaksandr Kalenik
dd73cccf8f
LibWeb: Fire "scroll" events on DOM elements
...
Before this change "scroll" events were only fired on document but now
it happens for all elements with scrollable overflow.
2024-04-23 11:00:35 +02:00