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
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
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
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
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
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
e070309258
LibWeb: Implement Element.outerHTML setter
2024-05-04 13:54:33 +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
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
Andreas Kling
4a795bef48
Tests/LibWeb: Fix iframe-load-event-for-bad-xml.html test
...
This was supposed to be an async test (and work correctly, too!)
This fixes up fa43321938
2024-04-18 21:17:01 +02:00
Andreas Kling
fa43321938
LibWeb: Fire iframe load event for frames with badly encoded XML
...
When loading an XML resource into an iframe and the resource fails to
decode (e.g due to invalid UTF-8), we must still fire a load event.
This fixes the regression in subtest 69 of Acid3.
2024-04-18 15:40:16 +00:00
Andreas Kling
c08ba8ac4c
LibWeb: Fix new ImageData(width, height) when width != height
2024-04-15 11:27:34 +02:00
Andreas Kling
134c4b6335
LibWeb: Fix CRC2D.getImageData() when width != height
...
We were mistakenly using the width as both width and height when getting
ImageData from a 2D canvas.
2024-04-15 11:27:34 +02:00
Jamie Mansfield
e487f70bbf
LibWeb: Support "importmap" scripts
2024-04-15 10:11:54 +02:00
Andreas Kling
870a954e11
LibWeb: Implement Element.outerHTML
...
This piggybacks on the same fragment serialization code that innerHTML
uses, but instead of constructing an imaginary parent element like the
spec asks us to, we just add a separate serialization mode that includes
the context element in the serialized markup.
This makes the image carousel on https://utah.edu/ show up :^)
2024-04-09 18:17:14 -04:00
Shannon Booth
db0519ddc1
LibWeb: Fire a pointer event on synthetic clicks
2024-04-08 14:25:08 +02:00
Tim Ledbetter
3876875bd8
LibWeb: Stub out missing cross origin properties on the window object
...
Previously, trying to access the `close`, `closed` or `blur` properties
on a cross origin window would cause a crash.
2024-04-02 07:46:16 +02:00
Shannon Booth
851114e462
LibWeb/Tests: Add a basic set of tests for document.all
2024-04-01 14:41:00 +02:00
Kenneth Myhra
c17171b86c
LibWeb: Add ImageData constructor with data
2024-03-30 19:29:14 +01:00
Kenneth Myhra
30a02fef91
LibWeb: Add one of the two documented constructors to ImageData
...
Also adds the IDL types:
- dictionary ImageDataSettings
- enum PredefinedColorSpace.
2024-03-24 11:09:09 +01:00
Tim Ledbetter
2227674b91
LibWeb: Don't crash when updating a select with detached option elements
...
`Node::shadow_including_root()` was missing a null check, which caused
a crash when manipulating a select element, whose option elements were
initially detached.
2024-03-23 20:56:26 +01:00
Aliaksandr Kalenik
f932d5d825
LibWeb: Look for labeled control in DOM tree instead of layout tree
...
...because "change" event should be dispatched on control even if it
has "display: none" style.
This change fixes selection in labels dropdown on GitHub's "new issue"
page.
2024-03-23 12:46:37 +01:00
Tim Ledbetter
aabf1a65b1
LibWeb: Align CORSSettingsAttribute values with the specification
...
This change makes our crossOrigin attribute getter behave the same way
as other browsers.
2024-03-22 11:29:57 +01:00
Tim Ledbetter
158d9a5921
LibWeb: Ensure enumerated attributes are always limited to known values
...
Previously, the invalid value default wasn't taken into account when
determining the value that should be returned from the getter of an
enumerated attribute. This caused a crash when an enumerated attribute
of type DOMString? was set to an invalid value.
2024-03-22 11:29:57 +01:00
Kenneth Myhra
c92f556aa5
LibWeb: Add {,de}serialization steps for FileList
2024-03-20 09:16:01 +01:00
Kenneth Myhra
5397340724
LibWeb: Add {,de}serialization steps for DOMQuad
2024-03-20 09:16:01 +01:00
Kenneth Myhra
52f056503d
LibWeb: Add {,de}serialization steps for CryptoKey
2024-03-20 09:16:01 +01:00
Tim Ledbetter
3a7a84f39b
LibWeb: Limit progress element attribute values to the correct ranges
...
The max attribute is now clamped to ensure it is limited to positive
numbers and the value attribute is clamped to ensure it is non-negative.
2024-03-18 11:16:35 +01:00
Tim Ledbetter
ecbc686bc8
LibWeb: Allow progress element value to be set higher than the max value
...
Previously, we returned from the value setter if the specified value
was above the max value. This is not required, as the getter clamps the
returned value to the max value.
2024-03-18 11:16:35 +01:00
Tim Ledbetter
e795c24fdd
LibWeb: Don't crash when modifying detached progress element attributes
2024-03-18 11:16:35 +01:00
Kenneth Myhra
94c6389fc0
LibWeb: Add {,de}serialization steps for DOMRect
2024-03-17 17:16:09 +01:00
Kenneth Myhra
9f5fa4f4a0
LibWeb: Add {,de}serialization steps for DOMRectReadonly
2024-03-17 17:16:09 +01:00
Kenneth Myhra
b7006b2423
LibWeb: Add {,de}serialization steps for DOMPoint
2024-03-17 17:16:09 +01:00
Kenneth Myhra
bf4fb39bfb
LibWeb: Add {,de}serialization steps for DOMPointReadonly
2024-03-17 17:16:09 +01:00
Kenneth Myhra
8d2f7cfb58
LibWeb: Add {,de}serialization steps for DOMMatrix
2024-03-17 17:16:09 +01:00
Kenneth Myhra
181424377d
LibWeb: Add {,de}serialization steps for DOMMatrixReadonly
2024-03-17 17:16:09 +01:00
Timothy Flynn
bb38cc1010
LibWeb: Do not blindly create File objects when adding FormData entries
...
We were unconditionally creating new File objects for all Blob-type
values passed to `FormData.append`. We should only do so if the value is
not already a File object (or if the `filename` attribute is present).
We must also carry MIME type information forward from the underlying
Blob object.
2024-03-14 10:10:33 +01:00