Commit graph

572 commits

Author SHA1 Message Date
Andreas Kling 7cd1114f05 LibWeb: Remove unnecessary FIXME marker for CSSStyleDeclaration.cssFloat
(cherry picked from commit 4c94202e9734099b6e2839f5495b8280eec2ab2f)
2024-06-26 23:07:42 +02:00
Andreas Kling 99851591b5 LibWeb: Make CSSKeyframeRule.parentRule actually point to parent rule
(cherry picked from commit 19fa630fa7e8342673b2aaa23e451f221533f12c)
2024-06-26 23:07:42 +02:00
Andreas Kling ea2876bc6f LibWeb: Implement CSSKeyframesRule.cssRuleList
To make this straightforward, CSSKeyframesRule now uses a CSSRuleList
for internal storage.

(cherry picked from commit 7f2c833a39e150c7372299dcfe4d2d5590ae779f)
2024-06-26 23:07:42 +02:00
Andreas Kling da836c344a LibWeb: Implement CSSStyleDeclaration.parentRule
This readonly attribute returns the containing CSS rule, or null (in the
case of element inline style).

(cherry picked from commit a12d28fd3053638ce6f4215bed2d8d45cda86375)
2024-06-26 23:07:42 +02:00
Andreas Kling f1dcf567e4 Tests: Add a basic test for Declarative Shadow DOM
(cherry picked from commit 7ce350b8c069c13540c50631413b2150bab967d4)
2024-06-26 08:48:11 +02:00
circl 462abc242e Tests/LibWeb: Add test to verify correctness of getImageData
(cherry picked from commit dbc94ce92e09e987f8a07a5b1e978250286b015a)
2024-06-14 18:18:40 -04:00
Kenneth Myhra 702ff7eb46 LibWeb: Implement and wire up TransformStream's cancel callback
(cherry picked from commit e70886595ab83d650662f46be2ac2e147603c790)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 2668aa90da Test/LibWeb: Add test to prove a ReadableStream can be cancelled
(cherry picked from commit fc37bc328e065465f4d60cf90a3185973be10598)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 7cbe5c9d4a LibWeb: Implement static method ReadableStream.from(asyncIterable)
(cherry picked from commit 0ec0e92b100faf92256e704b9e94e9c90a04b642)
2024-06-09 16:24:09 +01:00
Jamie Mansfield ea69ec8e52 LibWeb: Use a single test for loading attribute 2024-06-08 14:16:48 -04:00
Jamie Mansfield e5a1f1e582 LibWeb: Test fetchPriority attribute on all elements 2024-06-08 14:16:48 -04:00
Jamie Mansfield 91c7920b34 LibWeb: Implement HTMLAreaElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 07cd441e95 LibWeb: Implement HTMLIFrameElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield c8e87352d8 LibWeb: Implement HTMLImageElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 901fb0d068 LibWeb: Implement HTMLLinkElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield a6fd653afa LibWeb: Use Reflect for HTMLAnchorElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield ade7c6c8fb LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 82fba65faa LibWeb: Implement HTMLImageElement.crossOrigin 2024-06-05 05:02:55 +01:00
Jamie Mansfield 5adce08003 LibWeb: Implement HTMLLinkElement.crossOrigin 2024-06-05 05:02:55 +01:00
Jamie Mansfield 5ae9b49099 LibWeb: Implement HTMLImageElement.fetchPriority 2024-06-05 05:02:55 +01:00
Matthew Olsson b5c682bc2e LibWeb: Copy the keyframes in KeyframeEffect's copy constructor 2024-06-03 10:53:32 +02:00
Matthew Olsson 37322baf54 LibWeb: Ensure all DocumentTimeline objects have the same time value
The DocumentTimeline constructor used the current millisecond time to
initialize its currentTime, but that means that a newly created timeline
would always have a different time value than other timelines that have
been through the update_animations_and_send_events function.
2024-06-03 10:53:32 +02:00
Matthew Olsson 0acf89234c LibWeb: Try to fix a flaky animation test
Not sure if this'll fix it fully, as the flake has only ever been
observed on CI.
2024-06-02 16:07:12 +02:00
Matthew Olsson 73aadddbc1 LibWeb: Reject invalid keyframe offset values 2024-06-02 16:07:12 +02:00
Matthew Olsson e13cd914a9 LibWeb: Handle animating the 'all' property 2024-06-02 16:07:12 +02:00
Matthew Olsson 6859826e3d LibWeb: Handle persisting an animation after it has been removed 2024-06-02 16:07:12 +02:00
Matthew Olsson a80af938eb LibWeb: Support subtree option in Animatable.getAnimations() 2024-06-02 16:07:12 +02:00
Matthew Olsson e2cb25e35c LibWeb: Support interpolation of mixed percentage dimension units 2024-06-02 15:12:17 +02:00
Matthew Olsson 1965943026 LibWeb: Reject invalid AnimationEffect duration string values 2024-05-29 08:18:24 +02:00
Matthew Olsson 3e221fbb2d IDLGenerators: Handle restricted/unrestricted floating point types 2024-05-29 08:18:24 +02:00
Matthew Olsson 2bd8093449 LibWeb: Detect explicit null timeline given in KeyframeAnimationOptions
We already do this for the timeline argument in the KeyframeEffect
constructor
2024-05-29 08:18:24 +02:00
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