Tim Ledbetter
bb923983fc
LibWeb: Implement WorkerGlobalScope.importScripts()
...
This method allows workers to synchronously import one or more scripts.
2024-05-29 08:17:18 +02:00
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
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
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
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
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
Shannon Booth
17ae65cedc
LibWeb: Implement AudioBuffer.copyToChannel
2024-05-26 07:48:37 +02:00
Shannon Booth
67b1f4af55
LibWeb: Implement HTMLFormElement.encoding
2024-05-26 07:47:59 +02:00
Shannon Booth
aeb815cc66
LibWeb: Implement HTMLFormElement.enctype
2024-05-26 07:47:59 +02:00
Matthew Olsson
a8ef84f8c3
LibWeb: Use LengthPercentage for calc values in Transformation matrix
2024-05-25 22:19:47 +02:00
Matthew Olsson
15a8baee03
LibWeb: Save time for animationcancel event before transitioning to idle
...
The if statement in the dispatch implies we are in the idle state, so of
course the active time will always be undefined. If this was cancelled
via a call to cancel(), we can save the time at that point. Otherwise,
just send 0.
2024-05-24 07:25:10 +02:00
Andreas Kling
f4636a0cf5
LibWeb: Stop spamming animation events on the wrong event target
...
This patch fixes two issues:
- Animation events that should go to the target element now do
(some were previously being dispatched on the animation itself.)
- We update the "previous phase" and "previous iteration" fields of
animation effects, so that we can actually detect phase changes.
This means we stop thinking animations always just started,
something that caused each animation to send 60 animationstart
events every second (to the wrong target!)
2024-05-23 12:10:06 +02:00
Andrew Kaster
bab546472e
LibWeb: Mark FontFaceSet as a setlike IDL interface
...
And implement more of the constructor logic.
2024-05-23 10:57:34 +02:00
Tim Ledbetter
d2b3007248
IDLGenerators: Use spec-compliant algorithm to parse integer values
2024-05-23 04:15:46 +02:00
Tim Ledbetter
2a7cf1c588
LibWeb: Implement the width and height attributes where missing
...
This change adds the `width` and `height` properties to
`HTMLVideoElement` and `HTMLSourceElement`. These properties reflect
their respective content attribute values.
2024-05-21 19:28:43 +02:00
Tim Ledbetter
9f9aa62128
LibWeb: Implement the hspace and vspace attributes
...
These properties reflect their respective content attributes.
2024-05-21 19:28:43 +02:00
Kenneth Myhra
e2c4019bfc
LibWeb: Close acquired writer in AO readable_stream_pipe_to()
...
Also adds a test to prove that the WritableStream's close callback is
called.
2024-05-20 16:57:52 -04:00
Tim Ledbetter
a6d6729034
LibWeb: Implement the MouseEvent.relatedTarget attribute
...
This returns the secondary target of a mouse event. For `onmouseenter`
and `onmouseover` events, this is the EventTarget the mouse exited
from. For `onmouseleave` and `onmouseout` events, this is the
EventTarget the mouse entered to.
2024-05-20 08:21:41 +02:00
Shannon Booth
3ccbc83168
LibWeb: Add a stubbed slot for DynamicsCompressorNode.reduction
...
For now, this slot is always 0 - (the default value per spec). But
once we start actually processing audio streams this internal slot
should be changed correspondingly.
2024-05-19 09:26:20 +02:00
Shannon Booth
cf615cbd1c
LibWeb: Add AudioParams for DynamicsCompressorNode
2024-05-19 09:26:20 +02:00
Shannon Booth
ccdf82c9be
LibWeb: Implement scrollIntoView with 'center' block position
...
This fixes a crash on:
https://docs.github.com/en/get-started/learning-about-github/githubs-plans
2024-05-19 07:22:17 +02:00
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
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