Jamie Mansfield
9c4e80a3ec
LibWeb/SVG: Implement default_tab_index_value for a element
...
Another FIXME bites the dust :^)
2024-08-14 20:39:35 +01:00
Shannon Booth
deff8df2c7
LibWeb: Actually perform "update the href steps"
...
We completely missed this step, which made setters not actually do
anything!
Fixes 336 test failures on:
https://wpt.live/url/url-setters-a-area.window.html
2024-08-08 14:59:42 +01:00
Jamie Mansfield
fa5800ebc5
LibWeb: Implement HTMLTableCellElement.cellIndex
...
See:
- http://wpt.live/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex.html
2024-08-07 00:53:38 +01:00
Andreas Kling
a1519e67fb
LibWeb: Fire navigation event as required in History.pushState()
2024-08-06 16:33:23 +02:00
Andreas Kling
e3408c4a7f
LibWeb: Allow changing the query of file:// URL via history.pushState()
...
The spec didn't match how other browsers behave, and we dutifully did
what the spec said. A spec bug has been filed, so let's fix this locally
for now with a FIXME.
2024-08-06 16:33:23 +02:00
Jamie Mansfield
c891b83fc0
LibWeb: Don't crash with invalid import maps
...
See:
- http://wpt.live/import-maps/multiple-import-maps/with-errors.html
2024-08-06 09:40:44 +02:00
Jamie Mansfield
1d12cb69d4
LibWeb: Implement HTMLTrackElement.readyState
2024-08-06 07:57:33 +01:00
Shannon Booth
cc55732332
LibURL+Everywhere: Only percent decode URL paths when actually needed
...
Web specs do not return through javascript percent decoded URL path
components - but we were doing this in a number of places due to the
default behaviour of URL::serialize_path.
Since percent encoded URL paths may not contain valid UTF-8 - this was
resulting in us crashing in these places.
For example - on an HTMLAnchorElement when retrieving the pathname for
the URL of:
http://ladybird.org/foo%C2%91%91
To fix this make the URL class only return the percent encoded
serialized path, matching the URL spec. When the decoded path is
required instead explicitly call URL::percent_decode.
This fixes a crash running WPT URL tests for the anchor element on:
https://wpt.live/url/a-element.html
2024-08-05 09:58:13 +02:00
Andreas Kling
0e1256e5a4
LibWeb: Make requestAnimationFrame() callback IDs sequential
...
This is required by the spec, so let's stop returning random IDs in
favor of a simple sequential integer sequence.
2024-08-05 09:12:07 +02:00
Jamie Mansfield
bedb626c29
LibWeb: Set script force async to false when async changes
2024-08-04 19:25:29 +01:00
Jamie Mansfield
77c41a82be
LibWeb: Script force async flag should default to true
...
See:
- http://wpt.live/html/semantics/scripting-1/the-script-element/async_001.htm
2024-08-04 19:25:29 +01:00
Shannon Booth
f511c0b441
LibURL+LibWeb: Do not percent decode in password/username getters
...
Doing it is not part of the spec. Whenever needed, the spec will
explicitly percent decode the username and password.
This fixes some URL WPT tests.
2024-08-04 12:59:02 +01:00
Andreas Kling
273593afba
LibWeb: Don't proceed with Element.click() on disabled form controls
...
Fixes an infinite reload loop on some of the dom/events/ tests in WPT.
2024-07-26 14:25:04 +02:00
Timur Sultanov
1ce9bbdd6d
Tests: Add test for selection option in <select>
...
Verify that we can select option using JS
2024-07-26 09:15:39 +01:00
Jamie Mansfield
793248aec9
LibWeb/HTML: Implement HTMLMediaElement.addTextTrack
...
Removes some noise from the console when browsing bbc.co.uk :^)
2024-07-26 09:30:19 +02:00
Timur Sultanov
2bf37cb914
Tests: Add tests for <select> element behavior
...
Check that `<select>` element has options available immediately
2024-07-25 16:58:12 +02:00
Edwin Hoksberg
5f154ba372
LibWeb: Implement Element::check_visibility
2024-07-20 09:14:50 +01:00
Andreas Kling
4e0edd42b9
LibWeb: Cap HTML dimension values at 17895700 (same as Firefox)
...
Instead of allowing arbitrarily large values (which could eventually
overflow an i32), let's just cap them at the same limit as Firefox does.
Found by Domato.
2024-07-20 06:41:25 +02:00
Andreas Kling
1c00e5688d
LibWeb: Fix StringView OOB access when parsing 3-character legacy color
...
Found by Domato.
2024-07-20 06:41:25 +02:00
Jamie Mansfield
6ca4c2beb0
LibWeb/SVG: Implement SVGAElement.relList
2024-07-16 21:43:53 +02:00
Maciej
9eb568eacb
LibWeb: Make innerHTML for XML nodes actually return inner HTML
...
The spec says to just call the XML serialization algorithm, but it
returns the "outer serialization", and we need the "inner" one. Let's
just concatenate serializations of children; then the result produced is
similar to one from Blink or Gecko.
2024-07-14 11:49:31 +02:00
Tim Ledbetter
34b9873664
LibWeb: Populate filename in WindowOrWorkerGlobalScope.reportError()
...
Previously, when `WindowOrWorkerGlobalScope.reportError()` was called
the `filename` property of the dispatched error event was blank. It is
now populated with the full path of the active script.
2024-07-08 11:26:24 +02:00
Natsuki Ikeguchi
ccb3a2f7ad
LibWeb: Add initial implementation of global.reportError()
2024-07-07 13:53:01 +01:00
Tim Ledbetter
bdaa7f0e8e
LibWeb: Implement the HTMLTrackElement.kind
attribute
...
This reflects the HTML `kind` attribute.
2024-06-30 13:08:42 +02:00
Tim Ledbetter
c4d5ae28ea
LibWeb: Implement a minimal version of Window.find()
...
This is a non-standard API that other browsers implement, which
highlights matching text in the current window.
This is just a thin wrapper around our find in page functionality, the
main motivation for adding this API is that it allows us to write tests
for our find in page implementation.
2024-06-27 10:09:39 +02:00
circl
dbc94ce92e
Tests/LibWeb: Add test to verify correctness of getImageData
2024-06-14 16:54:32 +02:00
Aliaksandr Kalenik
8feaecd5c8
LibWeb: Create BlockContainer layout node for <input type="button">
...
...and shadow tree with TextNode for "value" attribute is created.
This means InlineFormattingContext is used, and button's text now
respects CSS text-decoration properties and unicode-ranges.
2024-06-14 07:58:55 +02:00
Jamie Mansfield
0c683af57e
LibWeb: Test referrerPolicy attribute on all elements
2024-06-08 08:01:42 +02:00
Jamie Mansfield
fdb4e05d7f
LibWeb: Use a single test for loading attribute
2024-06-08 08:01:42 +02:00
Jamie Mansfield
1dda129fe1
LibWeb: Test fetchPriority attribute on all elements
2024-06-08 08:01:42 +02:00
Jamie Mansfield
53d7aa53a2
LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy
2024-06-07 09:54:19 +02:00
Jamie Mansfield
2ffda00347
LibWeb: Implement HTMLImageElement.crossOrigin
2024-06-05 05:42:47 +01:00
Jamie Mansfield
d7d60268ec
LibWeb: Implement HTMLLinkElement.crossOrigin
2024-06-05 05:42:47 +01:00
Jamie Mansfield
8315ad6759
LibWeb: Implement HTMLImageElement.fetchPriority
2024-06-05 05:42:47 +01: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
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
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