Commit Graph

3144 Commits

Author SHA1 Message Date
Jamie Mansfield
d4a7cfb68f LibWeb: Stub BroadcastChannel interface
This is enough to get the 1Password login page to load :^)
2024-07-13 19:53:02 +02:00
Tim Ledbetter
0a0651f34e LibWeb: Implement Node.normalize()
This method puts the given node and all of its sub-tree into a
normalized form. A normalized sub-tree has no empty text nodes and no
adjacent text nodes.
2024-07-13 09:35:54 +02:00
Tim Ledbetter
e18501f67f LibWeb: Don't dispatch click events to disabled FormAssociatedElements
Disabled FormAssociatedElements also no longer receive focus when
clicked.
2024-07-13 09:33:16 +02:00
Aliaksandr Kalenik
c09b5b8df0 LibGfx+LibWeb: Rename Gfx::WOFF2::Font to Gfx::WOFF2::Typeface
It's a leftover from VectorFont -> Typeface renaming
2024-07-13 09:31:02 +02:00
Aliaksandr Kalenik
1d2e559e13 LibGfx+LibWeb: Rename Gfx::WOFF::Font to Gfx::WOFF::Typeface
It's a leftover from VectorFont -> Typeface renaming
2024-07-13 09:31:02 +02:00
Diego
906fa04822 LibWasm: Properly check for indeterminate NaNs in SIMD tests
Because `nan:arithmetic` and `nan:canonical` aren't bound to a single
bit pattern, we cannot check against a float-containing SIMD vector
against a single value in the tests. Now, we represent `v128`s as
`TypedArray`s in `testjs` (as opposed to using `BigInt`s), allowing us
to properly check `NaN` bit patterns.
2024-07-12 18:27:47 +02:00
Diego
524e09dda1 LibWasm: Check for correct NaN bit patterns in tests
Some spec-tests check the bit pattern of a returned `NaN` (i.e.
`nan:canonical`, `nan:arithmetic`, or something like `nan:0x200000`).
Previously, we just accepted any `NaN`.
2024-07-12 18:27:47 +02:00
simonkrauter
191531b7b1 LibWeb: Use correct default value for <input type=range>
Previously the input element was displayed with value 0, when no value
was set in the HTML. Now it uses `value_sanitization_algorithm()`, which
will calculate the default value.
In `value_sanitization_algorithm()` there was a logical mistake/typo.
The comment from the spec says "unless the maximum is less than the
minimum".
The added layout test would fail without the code changes.
Fixes #520
2024-07-11 11:56:13 +02:00
Kenneth Myhra
907dc84c1e LibWeb: Implement min option for ReadableStreamBYOBReader.read()
When the min option is given the read will only be fulfilled when there
are min or more elements available in the readable byte stream.

When the min option is not given the default value for min is 1.
2024-07-11 11:55:15 +02:00
BenJilks
bee42160c5 LibWeb: When solving abspos lengths, use min max constrained height
Solving using the unconstrained height, when solving for bottom, would
either leave a gap over overflow its container.
2024-07-10 19:41:12 +02:00
Colin Reeder
449f81bfbe LibWeb: Add support for -webkit-text-fill-color 2024-07-10 10:25:04 -06:00
Dennis Camera
033057683c Everywhere: Don't install code generators and test binaries 2024-07-10 10:13:21 -06:00
Colin Reeder
d427344f39 LibWeb: Handle inline-start and inline-end as float values
Should resolve #449 for LTR languages at least
2024-07-10 17:41:18 +02:00
Jamie Mansfield
9d1ea4c7e0 LibWeb: Implement SVGElement.className 2024-07-10 10:28:43 +02:00
Andreas Kling
4e7558c88b LibWeb: Don't fire resize event until document actually resizes once
The first time Document learns its viewport size, we now suppress firing
of the resize event.

This fixes an issue on multiple websites that were not expecting resize
events to fire so early in the loading process.
2024-07-10 10:27:31 +02:00
rmg-x
629068c2a7 LibWeb: Ensure normal line-height on HTMLInputElement
Previously, setting CSS `line-height: 0` on an `input` element would
result in no text being displayed.

Other browsers handle this by setting the minimum height to the
"normal" value for single line inputs.
2024-07-10 07:05:52 +02:00
Diego
e8fd8982f8 LibWasm: Give names to functions exported to JS via ref.func
https://webassembly.github.io/spec/js-api/index.html#name-of-the-webassembly-function
2024-07-10 00:37:18 +02:00
Maciej
d890be6e0f LibWeb: Prepare script when src is set the first time
From https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:
When a script element el that is not parser-inserted experiences one
of the events listed in the following list, the user agent must
immediately prepare the script element el:
- [...]
- The script element is connected and has a src attribute set where
  previously the element had no such attribute.
2024-07-09 20:30:27 +01:00
Diego
5382fbb617 LibWasm: Remove Wasm::ValueType::Kind::Null* variants
As far as I know, they're not in the spec and don't serve any purposes
in the internals of LibWasm.
2024-07-09 14:22:00 +02:00
Maciej
65d8d205ee LibWeb: Implement HTML DragEvent class
This just defines the class, drag events aren't actually fired yet.
2024-07-09 11:28:32 +01:00
doctortheemh
4ef76f3198 LibGfx: Decode AVIF images
Use libavif to decode AVIF images in LibGfx.
2024-07-09 08:15:47 +02:00
Diego
c103001f16 LibWasm: Fix lossy NaN bit pattern conversions in spec-test gen 2024-07-08 15:12:16 +02:00
Diego
6493acf2f4 LibWasm: Preserve sign bit across JS boundary in test-wasm
A `Uint8Array` can now be passed in the Wasm testjs files to be
transmuted into a Wasm value.
2024-07-08 15:12:16 +02:00
Luke Warlow
63a5ff70e5 LibWeb: Implement :modal pseudo class
Adds the :modal pseudo class which matches dialogs opened with
showModal().
2024-07-08 11:34:06 +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
simonkrauter
cbc4832a53 LibWeb: Extend meter test 2024-07-07 08:07:19 +02:00
Ali Mohammad Pur
e0465b8939 Revert "LibTLS+Everywhere: Switch to using WolfSSL"
This reverts commit 8bb610b97a.
Linking wolfSSL seems to cause more legal trouble than it's worth due to
it being GPLv2, so let's undo this for now.
2024-07-06 15:15:34 -06:00
Tim Ledbetter
21eefb788b Tests/WPT: Enable Qt neworking when running WPT tests 2024-07-06 14:50:26 -06:00
Ali Mohammad Pur
8bb610b97a LibTLS+Everywhere: Switch to using WolfSSL
This commit replaces all TLS connection code with wolfssl.
The certificate parsing code has to remain for now, as wolfssl does not
seem to have any exposed API for that.
2024-07-06 22:15:19 +02:00
Gingeh
e1c61d654f LibWeb/CSS: Add tests for color functions 2024-07-06 05:18:00 -06:00
Jamie Mansfield
ecad28657a LibWeb/HTML: Implement TextTrackList IDL interface 2024-07-06 11:41:13 +02:00
Aziz Berkay Yesilyurt
13cd653d1c LibWeb/HTML: Update Text Input Styling
So that it is closer to the spec.
https://www.w3.org/TR/css-ui-4/#input-rules
2024-07-06 10:21:35 +02:00
Arthur Hartwig Carlsson
9ed2669fc8 LibWeb: Don't insert out-of-flow elements into block pseudo elements
Like 1132c858e9, out-of-flow elements such
as float elements would get inserted into block level `::before` and
`::after` pseudo-element nodes when they should instead be inserted as a
sibling to the pseudo element. This change fixes that.

This fixes a few layout issues on the swedish tax agency website
(skatteverket.se). :^)
2024-07-06 10:02:29 +02:00
Arthur Hartwig Carlsson
c84ff9f693 Tests: Make rebaseline-libweb-test OS aware
This makes it so that `rebaseline-libweb-test` can be run on *nix or
MacOS as the path to `headless-browser` on MacOS is
`./bin/Ladybird.app/Contents/MacOS/headless-browser` while it is
`./bin/headless-browser` on *nix.
2024-07-05 16:29:00 -06:00
BenJilks
47aee289d8 LibWeb: Change flex remaining space distribution to include gap
The remaining space is in addition to, not of in place of the
main gap.
2024-07-05 21:31:41 +02:00
Caitlin Potter
80cd3712c2 LibWeb: Implement WebIDL constructor flow for derived classes
Following the rules in the algorithm from
https://webidl.spec.whatwg.org/#js-platform-objects, "To Internally
create a new object implementing the interface interface", this change
incorporates the steps to load a prototype from new.target, and write
it to the created instance returned from constructor_impl(). This
mirrors the code for generate_html_constructor(), which incorporates
additional steps needed by Custom Elements.

Bug #334
2024-07-05 21:04:27 +02:00
Dennis Camera
b54a1c6284 AK: Implement ShortString for big-endian 2024-07-05 09:49:23 -06:00
Tim Ledbetter
23eba28c22 Everywhere: Remove Serenity specific code from tests
We no longer run our tests on Serenity.
2024-07-05 07:29:51 +02:00
Jamie Mansfield
67e3ac8916 LibWeb/HTML: Stub TextTrack IDL interface 2024-07-05 07:15:04 +02:00
Luke Warlow
a9669639ce LibWeb: Implement popover property and attribute
The popover property now reflects the attribute.

It cannot currently use the Reflect IDL concept because the empty string
value is special cased.
2024-07-05 07:14:50 +02:00
Bastiaan van der Plaat
c81a640f3e LibWeb/CSS: Serialize transform scale percentage values as numbers 2024-07-04 14:41:35 +02:00
Tim Ledbetter
34741d09c6 LibWeb: Update Range::set_base_and_extent() to the latest spec text
This allows it to work with content inside shadow roots.
2024-07-04 14:38:56 +02:00
Timothy Flynn
698a95d2de AK: Decode paired UTF-16 surrogates in a JSON string
For example, such use is seen on Twitter.
2024-07-04 14:16:16 +02:00
Luke Warlow
6623177265 LibWeb: Implement support for scrollbar-gutter
This property is now correctly parsed.

Ladybird always uses overlay scrollbars so this property does nothing.
2024-07-04 13:22:40 +02:00
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