Commit graph

62816 commits

Author SHA1 Message Date
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
Aliaksandr Kalenik 2f515827c0 Everywhere: Rename Gfx::OpenType::Font to Gfx::OpenType::Typeface
It's a leftover from VectorFont -> Typeface renaming
2024-07-13 09:31:02 +02:00
Aliaksandr Kalenik cac0228d3f LibGfx: Rename m_font to m_typeface in ScaledFont
It's a leftover from VectorFont -> Typeface renaming
2024-07-13 09:31:02 +02:00
Diego Frias 13a8c2a79d LibWasm: Make SIMD float min/max operations binary ops
They previously acted like comparison operators, which was not correct.
2024-07-13 01:27:55 +02:00
Diego 3efb11f5d8 LibWasm: Validate stack correctly in v128_store*_lane instructions
Previously the validator put a `v128` on the stack, which is not what
the spec defines.
2024-07-13 00:04: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
BenJilks a8c1bb0461 LibWeb: Draw dashed and dotted lines in Skia painter
Use the `SkDashPathEffect` path effect, to implement dashed and dotted
line styles.
2024-07-12 18:10:46 +03:00
Kenneth Myhra 24bed027b2 LibWeb: Align transform_stream_error_writable_and_unblock_write w/ spec
This aligns AO transform_stream_error_writable_and_unblock_write() with
the spec.

No functional change is introduced by this amendment.
2024-07-12 08:28:35 -04:00
Aliaksandr Kalenik 5c4ca5ac12 LibWeb: Support SVG gradient spread method in Skia painter
Progress on Tests/LibWeb/Ref/svg-gradient-spreadMethod.html
2024-07-12 15:03:44 +03:00
⭐caitp⭐ 2c396b5378 LibWeb: Remove set_event_characteristics()
These methods were overriding properties specified by the EventInit
property bags in the constructor for WheelEvent and MouseEvent.

They appear to be legacy code and no longer relevant, as they would have
been used for ensuring natively dispatched events had the correct
properties --- This is now done in separate create methods, such as
MouseEvent::create_from_platform_event.

This fixes a couple WPT failures (e.g. in
/dom/events/Event-subclasses-constructors.html)
2024-07-12 11:57:33 +03:00
fish4terrisa-MSDSM 5dde9cf327 CI: Fixed the broken steps in nightly-android 2024-07-11 23:26:05 -06:00
CheewyOFF 66659cf871 Readme: Change ladybird.dev to ladybird.org in README 2024-07-11 23:25:49 -06:00
Diego da8633b2d0 LibWasm: Fix spec-test gen for inline commands and special characters
`linking.wast` has an unusual pattern for invoke commands, which is now
accounted-for. Also, special unicode characters are now properly
serialized in JavaScript as string literals (this is only relevant for
`names.wast`).
2024-07-11 21:29:18 +02:00
sideshowbarker 6d097a1aa9 Documentation: Add how-to for building a Debug binary 2024-07-11 11:06:08 -06:00
Andrew Kaster 731431c870 Meta: Set proper BUILD_DIR for different build presets in ladybird.sh
Also set ASAN/UBSAN_OPTIONS environment variables when running with
the Sanitizer build preset.
2024-07-11 11:05:57 -06:00
⭐caitp⭐ 932a7d4d81 LibWeb: Pass event_init to base class constructor in FocusEvent
This fixes some WPT failures caused by the "view" parameter not being
initialized from the property bag.
2024-07-11 10:36:04 -06:00
Andrew Kaster 33746b7998 Android: Strip .gz suffix from ladybird-assets.tar
This is required to launch the app for me with Android Studio Koala.
2024-07-11 09:17:21 -06:00
Andrew Kaster 045bc3ffd6 Android: Pass new Lagom Tool install options to BuildLagomTools.sh 2024-07-11 09:17:21 -06:00
Andrew Kaster 970038ce67 Meta: Rename devcontainer to Ladybird 2024-07-11 08:48:15 -06:00
Aliaksandr Kalenik 8a315592cc LibWeb: Use viewport-relative position for radial gradient in Skia
Fixes incorrect radial gradient painting caused by passing
gradient-rect-relative position when Skia expects viewport-relative.
2024-07-11 15:54:33 +02:00
Aliaksandr Kalenik 386e151f96 LibWeb: Add and use to_skia_point() helper 2024-07-11 15:54:33 +02:00
Aliaksandr Kalenik 2c8267babf LibWeb: Add basic conic gradient support in Skia painter
For now it doesn't account for start angle and repeat length but it's
better than not painting conic gradients at all.
2024-07-11 15:54:33 +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
Andrew Kaster 3850214aac LibGfx: Add workaround for un-parseable OpenType font family names
Co-Authored-By: sideshowbarker <mike@w3.org>
2024-07-10 21:05:47 -06:00
Diego 420a626554 LibWasm: Make memory.grow grow the memory's type
After a `memory.grow`, the type of the memory instance should be
updated so potential memory imports on the boundary are unlinkable.
2024-07-11 01:31:22 +02:00
Diego d07cf26894 LibWasm: Fix loop arity for single-type blocktypes
Single-type blocktypes previously gave loop labels an arity of 1, even
though they're shorthand for `[] -> [T]`.
2024-07-11 00:51:03 +02:00
Diego 625fbc8085 LibWasm: Implement SIMD bitwise operations 2024-07-11 00:50:08 +02:00
sideshowbarker 0a55e36403 LibWeb: Fix handling of find-in-page with pseudo-element content
This change makes find-in-page ignore content that’s been added to the
document using CSS ::after or ::before pseudo-elements. Ignoring such
pseudo-element content for find-in-page matches the behavior in Chrome
and Safari (though not in Firefox).

Otherwise, without this change, find-in-page doesn’t ignore the
pseudo-element content, and we instead crash in
DOM::Range::common_ancestor_container after hitting an assert, due to
the start container and end container for the matched range not having a
common ancestor.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/514
2024-07-10 19:31:57 +01: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
Dennis Camera e007c24ec9 LibJS: Implement extract_pointer_bits for ppc64
On PowerPC 64 pointers can use all 64 bits, however by convention on
Linux user-space addresses use only the lower 43 bits.
I'm not 100% certain that the masking off of the 16 high bits is the
proper solution, but it matches the rest of the LibJS code which assumes
pointers only use the lower 48 bits.

https://www.kernel.org/doc/ols/2001/ppc64.pdf
2024-07-10 11:04:46 -06:00
Sebastian Zaha 7604d15b99 UI/AppKit: Port --force-new-process option from Qt chrome 2024-07-10 11:03:47 -06:00
Sebastian Zaha 946ccfc108 UI/AppKit: Port --allow-popups option from Qt chrome
WebDriver requires this option to be present in order to run the WPT
tests.
2024-07-10 11:03:47 -06:00
Aliaksandr Kalenik 2539fd6a5c LibGfx+LibWeb: Support CSS gradient "transition hints" in Skia painter
Skia does not have built-in support for gradient transition hints. So
instead of adding custom gradient painting, now we do the same thing as
other engines and preprocess color stops by replacing transition hints
with a bunch of points lying between adjacent color stops and calculated
using non-linear formula from the spec. As a result we get visually
close enough rendering we would get by applying spec-formula
individually to each point of a gradient.
2024-07-10 20:01:04 +03:00
simonkrauter 7766909415 LibWeb: Harmonize look of range input element
Previously the entire slider track was colored.
Now only the lower part of the slider track (left side of the thumb) is
colored.
Chrome and Firefox do the same.
2024-07-10 10:59:41 -06:00
Colin Reeder 449f81bfbe LibWeb: Add support for -webkit-text-fill-color 2024-07-10 10:25:04 -06:00
simonkrauter b5e80db225 LibWeb: Define width for -webkit-slider-runnable-track
Fixes #512
2024-07-10 10:24:28 -06:00
Dennis Camera 90a2dcfde1 LibWeb: Implement KeyAlgorithms for big-endian 2024-07-10 10:23:26 -06:00
Dennis Camera 81a0aa5725 LibWeb: Implement CryptoAlgorithms for big-endian 2024-07-10 10:23:26 -06:00
Jess dba448799d Meta: Docs: Update Nix dev-shell commands 2024-07-10 10:19:43 -06:00
Caitlin Potter fac82119df LibWeb: Legacy Platform Objects don't force [[Configurable]]
Per https://github.com/whatwg/webidl/commit/3fb6ab4dbc6a42517c84acf0909,
this step in the spec didn't reflect the reality in mainstream browsers.
This change fixes a failure in WPT/dom/collections/
2024-07-10 10:19:27 -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
Tim Ledbetter 11039085d0 UI/Qt: Pass WebContentOptions to TaskManagerWindow constructor
Previously, the browser would crash when opening a task manager window
with the `--enable-qt-networking` flag set because we were passing the
default WebContentOptions to the underlying WebContentView.
2024-07-10 16:29:27 +02:00
Tim Ledbetter 28b95e8ed0 WebContent+WebWorker: Use custom certificate paths with Qt networking
This change adds a `--certificate` option to both WebContent and
WebWorker, which allows one or more custom root certificate paths to be
specified. Certificates are then loaded from these paths when Qt
networking is used.

This allows WPT tests that require a https connection to be run locally
with Qt networking.
2024-07-10 16:29:27 +02:00
Jamie Mansfield 772d64aca2 LibWeb: Add FIXMEs for missing SVGGeometryElement attributes 2024-07-10 10:28:43 +02:00
Jamie Mansfield c9f3a7ddbf LibWeb: Add FIXMEs for missing SVGElement attributes 2024-07-10 10:28:43 +02:00