Commit Graph

1393 Commits

Author SHA1 Message Date
Bastiaan van der Plaat
bff6c0680a LibWeb/Geometry: Make DOMRect doubles unrestricted 2024-07-01 21:30:52 +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
Andreas Kling
4db05ecf69 LibWeb: Set the correct prototype for SVGAElement instances 2024-06-28 17:10:52 +02:00
Andreas Kling
a84261ee7a Tests/LibWeb: Add test that dumps all global JS constructors 2024-06-28 17:10:52 +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
Tim Ledbetter
9585da37ad Tests: Skip css-keyframe-fill-forwards.html ref test
This test is currently causing intermittent CI failures.

(cherry picked from commit 24c75922d8476b5096657acb5a1b4c71454ca616)
2024-06-26 18:56:33 -06:00
Andreas Kling
7ce350b8c0 Tests: Add a basic test for Declarative Shadow DOM 2024-06-25 19:22:35 +02:00
circl
63fa32416d Base: Move test-webm.webm out of /home/anon 2024-06-24 09:45:41 -06:00
Andreas Kling
85a4cfc59b LibWeb: Add the bare minimum to render SVGAElement (<a>) 2024-06-23 19:15:24 +02:00
Andreas Kling
ae906ca497 LibWeb: Treat width: {min,max,fit}-content as auto if ratio unresolvable
This appears to match other engines.
2024-06-23 19:15:24 +02:00
Andreas Kling
db1faef786 LibWeb: Fix overeager fallback to stretch-fit width for some flex items
If a flex item has a preferred aspect ratio and the flex basis is not
definite, we were falling back to using stretch-fit for the main size,
since that appeared to match other browsers.

However, we missed the case where we actually have a definite cross size
through which the preferred aspect ratio can be naturally resolved.
2024-06-23 19:15:24 +02:00
Andreas Kling
9c02ace897 LibWeb: Allow flex-basis: {min,max,fit}-content 2024-06-23 19:15:24 +02:00
Edwin Hoksberg
2b30414c1d LibWeb: Add attribute list that must always be compared without casing 2024-06-22 15:52:04 +02:00
Tim Ledbetter
31d7fa2442 LibWeb: Fire auxclick event on middle click
Previously, no event was fired on middle click. This change also allows
the UI to open a link in a new tab on middle click.
2024-06-22 14:57:36 +02:00
Andreas Kling
63f8feb9a4 LibWeb: Implement RecordingPainter::draw_text() via draw_text_run()
To get away from the ancient (and buggy) text layout code in
Gfx::Painter, we want to remove all the uses of Painter::draw_text().

As a first step towards this, we implement the draw_text() display list
command in terms of the draw_text_run() command by performing the very
simple necessary layout in draw_text() beforehand.
2024-06-21 10:31:13 +02:00
Matthew Olsson
667e313731 LibWeb: Parse easing values manually
The values aren't that complex, so it doesn't make much sense to have a
dedicated generator for them. Parsing them manually also allows us to
have much more control over the produced values, so as a result of this
change, EasingStyleValue becomes much more ergonomic.
2024-06-16 07:12:46 +02:00
Andreas Kling
4c94202e97 LibWeb: Remove unnecessary FIXME marker for CSSStyleDeclaration.cssFloat 2024-06-14 20:45:37 +02:00
Andreas Kling
19fa630fa7 LibWeb: Make CSSKeyframeRule.parentRule actually point to parent rule 2024-06-14 20:45:37 +02:00
Andreas Kling
7f2c833a39 LibWeb: Implement CSSKeyframesRule.cssRuleList
To make this straightforward, CSSKeyframesRule now uses a CSSRuleList
for internal storage.
2024-06-14 20:45:37 +02:00
Andreas Kling
a12d28fd30 LibWeb: Implement CSSStyleDeclaration.parentRule
This readonly attribute returns the containing CSS rule, or null (in the
case of element inline style).
2024-06-14 20:45:37 +02:00
circl
dbc94ce92e Tests/LibWeb: Add test to verify correctness of getImageData 2024-06-14 16:54:32 +02:00
Andreas Kling
c14369e2e3 Tests: Update rebaseline-libweb-test script with new paths 2024-06-14 16:28:32 +02:00
Aliaksandr Kalenik
b2dcdf0096 LibWeb: Use button layout for input elements with button type 2024-06-14 07:58:55 +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
Hexeption
7ac6fd2746 LibWeb: Added HTMLLinkElement.as Tests 2024-06-13 07:58:11 +02:00
Kenneth Myhra
e70886595a LibWeb: Implement and wire up TransformStream's cancel callback 2024-06-09 21:27:26 -04:00
Kenneth Myhra
fc37bc328e Test/LibWeb: Add test to prove a ReadableStream can be cancelled 2024-06-09 21:27:26 -04:00
Kenneth Myhra
0ec0e92b10 LibWeb: Implement static method ReadableStream.from(asyncIterable) 2024-06-09 10:12:46 +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
Tim Ledbetter
2fed064791 Tests/LibWeb: Wait until document fully loaded before simulating click
This makes the `form-image-submission.html` test pass more reliably.
2024-06-08 07:59:21 +02:00
Andreas Kling
533eea1958 Tests: Skip Text/input/HTML/form-image-submission.html (flaky)
Issue: https://github.com/LadybirdWebBrowser/ladybird/issues/100
2024-06-07 19:39:45 +02:00
Jamie Mansfield
53d7aa53a2 LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy 2024-06-07 09:54:19 +02:00
Aliaksandr Kalenik
5285e22f2a LibWeb+WebContent: Move scrollbar painting into WebContent
The main intention of this change is to have a consistent look and
behavior across all scrollbars, including elements with
`overflow: scroll` and `overflow: auto`, iframes, and a page.

Before:
- Page's scrollbar is painted by Browser (Qt/AppKit) using the
  corresponding UI framework style,
- Both WebContent and Browser know the scroll position offset.
- WebContent uses did_request_scroll_to() IPC call to send updates.
- Browser uses set_viewport_rect() to send updates.

After:
- Page's scrollbar is painted on WebContent side using the same style as
  currently used for elements with `overflow: scroll` and
  `overflow: auto`. A nice side effects: scrollbars are now painted for
  iframes, and page's scrollbar respects scrollbar-width CSS property.
- Only WebContent knows scroll position offset.
- did_request_scroll_to() is no longer used.
- set_viewport_rect() is changed to set_viewport_size().
2024-06-05 07:03:42 +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
Andrew Kaster
c6e9f0e7b5 Meta+Documentation: Switch default build dir to Build/Ladybird
Also prefer using the new top-level CMakeLists.txt
2024-06-04 13:44:22 -06:00
Andreas Kling
1670eda095 Tests/LibWeb: Remove layout test for Gfx::BitmapFont 2024-06-04 18:45:30 +02:00
Timothy Flynn
41c9cb032f Test: Skip flakey Text/input/WebAnimations/misc/DocumentTimeline test
Ref https://github.com/LadybirdWebBrowser/ladybird/issues/19
2024-06-03 11:42:18 -06:00
Timothy Flynn
bdbe2fdcc5 Everywhere: Replace SERENITY_SOURCE_DIR with LADYBIRD_SOURCE_DIR
In order to have checkouts of both SerenityOS and Ladybird, we need to
use a different environment variable for Ladybird.
2024-06-03 15:57:59 +02:00
Andrew Kaster
d057d24d72 Tests: Add log-file option to WPT runner script
Always dropping the log file in /tmp isn't the greatest DX for debugging
failures
2024-06-03 10:55:12 +02: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
Jamie Mansfield
295c4ef51a LibWeb/Fetch: Use MimeType in DataURL 2024-06-02 19:55:53 +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