Commit Graph

62588 Commits

Author SHA1 Message Date
Hendiadyoin1
9ee334e970 AK: Add introspection helpers to SIMD.h
(cherry picked from commit 8d6028d366c918b3656c0a4c6808a570dcecf8f4)
2024-07-17 09:56:13 -06:00
sideshowbarker
cc6d502e88 Tests: Enable WPT/run.sh to run an arbitrary subset of tests
The change causes Tests/LibWeb/WPT/run.sh to run an arbitrary subset of
tests you give it as arguments. If you don’t specify any arguments, it
has the same behavior as it does without this patch: It just runs an
explicit subset of test names hardcoded into the script.

Otherwise without this change, Tests/LibWeb/WPT/run.sh doesn’t have the
ability to run any tests other than the explicit subset of test names
hardcoded into the script
2024-07-17 09:55:11 -06:00
Lawrence Gimenez
7c0aa88e99 Documentation: Fixed typo at BrowsingContextsAndNavigables 2024-07-17 09:48:33 -06:00
Timothy Flynn
f29c3684a6 AK: Enable ASSERT in debug builds only
NDEBUG is defined in release builds. So we want to enable the ASSERT
macro when it *isn't* defined.
2024-07-17 09:45:43 -06:00
Aliaksandr Kalenik
3ddacaa705 Ladybird+LibWeb+WebContent: Always use Skia CPU backend in tests mode
Enforce the use of the CPU backend in test mode to ensure that ref-tests
produce consistent results across different computers, as this
consistency cannot be achieved with the GPU backend.
2024-07-17 17:58:53 +03:00
Sam Atkins
9fb44cb057 LibWeb/CSS: Make StringStyleValue hold a FlyString
We already have a FlyString of its value from parsing, and most users
also want a FlyString from it, so let's use that instead of converting
backwards and forwards.

The two users that did want a String are:
- Quotes, which make sense as FlyString instead, so I've converted that.
- Animation names, which should probably be FlyString too, but the code
  currently also allows for other kinds of StyleValue, and I don't want
  to dive into this right now to figure out if that's needed or not.
2024-07-17 15:08:44 +01:00
Sam Atkins
d2f04b9f04 LibWeb/CSS: Remove unused StyleProperties::grid_area()
This does not appear to be correct; the `grid-area` property's value is
quite complicated, and not just a string.
2024-07-17 15:08:44 +01:00
simonkrauter
b1d7a27468 LibWeb: Rename HTMLInputElement members related to range shadow tree
Choose a better name for private members which were added in
https://github.com/LadybirdBrowser/ladybird/pull/513
2024-07-17 13:11:55 +02:00
Aliaksandr Kalenik
66c88b432f LibWeb: Join text clip paths before application in Skia painter
Each item in clip_paths represents a glyph run, and applying them as a
clip in intersection mode one by one results in an empty clip. Instead,
now all clip paths are joined and applied as a clip together.

This change fixes rendering of "background-clip: text" when an element
has more than one glyph run.

Fixed ref-test: Tests/LibWeb/Ref/css-background-clip-text.html
2024-07-17 14:09:52 +03:00
Braydn
dbc2f7ed48 LibJS: Implement CreatePerIterationEnvironment for 'for' statements
Implement for CreatePerIterationEnvironment for 'for' loops per the Ecma
Standard. This ensures each iteration of a 'for' loop has its own
lexical environment so that variables declared in the loop are scoped to
the current iteration.
2024-07-17 11:20:11 +02:00
Jamie Mansfield
c8e6a95988 LibWeb/SVG: SVGGradientElement includes SVGURIReference 2024-07-16 21:43:53 +02:00
Jamie Mansfield
fbb5bc471d LibWeb/SVG: SVGScriptElement includes SVGURIReference 2024-07-16 21:43:53 +02:00
Jamie Mansfield
796de74956 LibWeb/SVG: SVGAElement includes SVGURIReference 2024-07-16 21:43:53 +02:00
Jamie Mansfield
6ca4c2beb0 LibWeb/SVG: Implement SVGAElement.relList 2024-07-16 21:43:53 +02:00
Jamie Mansfield
7562f89d4e LibWeb/SVG: Implement reflected attributes in SVGAElement
This change implements the download, ping, rel, hreflang, and type
attributes using the [Reflect] annotation in the IDL file.
2024-07-16 21:43:53 +02:00
Jamie Mansfield
5bac8e7730 LibWeb/SVG: Add spec link to SVGAElement 2024-07-16 21:43:53 +02:00
Jamie Mansfield
6f3c5f5ae9 LibWeb/SVG: Implement SVGElement.ownerSVGElement 2024-07-16 21:43:53 +02:00
circl
89531fb115 Tests/LibWeb: Add test for MouseEvent and WheelEvent bubbling 2024-07-16 21:10:16 +03:00
circl
f20010c1d3 LibWeb: Restore event characteristics of MouseEvents and WheelEvents
These were accidentally no longer set after
2c396b5378
2024-07-16 21:10:16 +03:00
Aliaksandr Kalenik
5eeb5eb36e LibWeb: Support SVGRadialGradientPaintStyle in Skia painter
Fixes:
Tests/LibWeb/Ref/svg-gradient-spreadMethod.html
Tests/LibWeb/Ref/svg-radialGradient.html
2024-07-16 19:11:56 +03:00
sideshowbarker
15d67f0da2 Meta: Make check-debug-flags.sh runnable in Bash 3.2
This change updates the Meta/check-debug-flags.sh script to avoid an
apparent Bach 3.2 parser bug. Specifically, it takes a comment and some
code of a process substitution and moves it into a separate function.

Otherwise, without this change, trying to run the check-debug-flags.sh
script with Bash 3.2 fails with the following error:

line 39: bad substitution: no closing `)' in <(

...apparently because Bash 3.2 chokes on the comment (and doesn’t choke
if the comment is completely removed).

Relates to https://github.com/LadybirdBrowser/ladybird/issues/283
2024-07-16 09:13:14 -06:00
sideshowbarker
570814a31e Meta: Make all pre-commit CI scripts work with Bash 3.2
This change makes all the pre-commit CI scripts runnable under Bash 3.2,
by replacing “mapfile” invocations in them code that first explicitly
creates an array, and then uses a while loop to populate the array.

Otherwise, without this change, the scripts all fail to run under Bash
3.2 — due to lack of support for “mapfile”.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/283

This also drops bash from the list of homebrew dependencies in the build
instructions — because with this change, homebrew bash (v4) is no longer
needed; things will now work with the Apple-provided bash (v3.2)
2024-07-16 08:56:22 -06:00
Aliaksandr Kalenik
4aba38e21f LibWeb: Use repeat tile mode if repeating length specified
...for radial gradient in Skia painter.
2024-07-16 17:40:34 +03:00
Aliaksandr Kalenik
fb03f36cfa LibWeb: Add support for repeating linear gradient in Skia painter 2024-07-16 17:40:34 +03:00
Aliaksandr Kalenik
dadf82f2a2 LibWeb: Handle gradient repeating as defined in the spec in Skia painter
Couple fixes found by reading the spec:
- Repeating should also happen in negative direction, so the whole
  [0, 1] is covered.
- Leftmost and rightmost stops should be clamped to [0, 1] range if
  needed, because Skia ignores everything outside of this range.
2024-07-16 17:40:34 +03:00
Ali Mohammad Pur
8c8310f0bd LibWasm: Make Absolute/Negate<SignedIntegral> explicitly work mod 2^N
Previously we relied on signed overflow, this commit makes the same
behaviour explicit (avoiding UB in the process).
2024-07-16 15:09:03 +02:00
Colin Reeder
99824eae14 LibWeb: Add support for indexed setter of HTMLOptionsCollection 2024-07-16 10:59:59 +01:00
Andreas Kling
2c918b540d LibWeb+RequestServer: Let RequestServer set HTTP Accept-Encoding header
Ultimately it's RequestServer who knows which kind of encodings it can
handle and decompress, so let's have it set the Accept-Encoding.
2024-07-16 11:01:01 +02:00
Timothy Flynn
bfc9dc447f AK+LibWeb: Replace our home-grown base64 encoder/decoders with simdutf
We currently have 2 base64 coders: one in AK, another in LibWeb for a
"forgiving" implementation. ECMA-262 has an upcoming proposal which will
require a third implementation.

Instead, let's use the base64 implementation that is used by Node.js and
recommended by the upcoming proposal. It handles forgiving decoding as
well.

Our users of AK's implementation should be fine with the forgiving
implementation. The AK impl originally had naive forgiving behavior, but
that was removed solely for performance reasons.

Using http://mattmahoney.net/dc/enwik8.zip (100MB unzipped) as a test,
performance of our old home-grown implementations vs. the simdutf
implementation (on Linux x64):

                Encode    Decode
AK base64       0.226s    0.169s
LibWeb base64   N/A       1.244s
simdutf         0.161s    0.047s
2024-07-16 10:27:39 +02:00
Timothy Flynn
58dfe5424f AK: Make the AK library's CMake a bit more standard
We no longer have multiple locations including AK (e.g. LibC). So let's
avoid awkwardly defining the AK library across multiple CMake files.

This is to allow more easily adding third-party dependencies to AK in
the future.
2024-07-16 10:27:39 +02:00
sideshowbarker
e797ea816b Tests: Drop --enable-qt-networking arg in WPT/run.sh
--enable-qt-networking doesn't exist on the AppKit chrome
2024-07-15 21:09:29 +01:00
BenJilks
3c897e7cf3 LibWeb: Propagate margin and offset when computing a box's baseline
When traversing the layout tree to find an appropriate box child to
derive the baseline from. Only the child's margin and offset was being
applied. Now we sum each offset on the recursive call.
2024-07-15 21:31:51 +02:00
Aliaksandr Kalenik
c8e29ad691 LibWeb: Add support for repeating radial gradient in Skia painter
Progress on Tests/Ref/css-gradients.html
2024-07-15 21:31:17 +02:00
Ali Mohammad Pur
4ef909c308 Tests/LibWasm: Mark two static functions "static"
-Wmissing-declarations would complain about these.
2024-07-15 18:39:24 +02:00
Diego Frias
8a0ef17d9a LibWasm: Correctly validate v128_load*_lane instructions 2024-07-15 09:58:04 -06:00
Diego Frias
f5326f1747 LibWasm: Implement rest of SIMD load/store instructions
Also implement `v128.any_true`.
2024-07-15 09:58:04 -06:00
circl
73e0dc1eec UI/Qt: Update icon to the new logo 2024-07-15 09:04:46 -06:00
simonkrauter
9df8e1f224 LibWeb: Support accent-color for range input and progress element
Fixes #466
2024-07-15 15:51:50 +01:00
Colin Reeder
5c315b532e LibWeb: Add more legacy -webkit- aliases 2024-07-15 15:45:33 +01:00
Aliaksandr Kalenik
247a07b606 LibWeb: Add support for repeating conic gradient in Skia painter 2024-07-15 15:56:34 +03:00
Aliaksandr Kalenik
1ad4cd55b5 LibWeb: Respect conic gradient start angle in Skia painter 2024-07-15 15:56:34 +03:00
Aliaksandr Kalenik
54fdbf78ab LibWeb: Rotate conic gradient in Skia painter to match CSS start angle
-90deg rotation need to be applied, so start conic gradient angle in
Skia matches CSS start angle.
2024-07-15 15:56:34 +03:00
Aliaksandr Kalenik
761fa97fef LibWeb: Add support for conic gradient transition hints in Skia painter 2024-07-15 15:56:34 +03:00
Diego Frias
f63a945ba0 LibWeb: Implement the :has() pseudo-class
See https://drafts.csswg.org/selectors-4/#relational.
2024-07-15 11:52:03 +01:00
Aliaksandr Kalenik
be1075e673 LibWeb: Support radial gradient with asymmetrical size in Skia painter
Progress on Tests/Ref/css-gradients.html
2024-07-15 13:43:50 +03:00
Aliaksandr Kalenik
af9b91e0f7 LibWeb: Mark bitmaps passed to Skia as immutable
All bitmaps passed to Skia during rendering are not supposed to be
mutated.
2024-07-15 12:36:13 +03:00
Andrew Kaster
31eec0a145 Documentation+Toolchain: Don't try to build CMake from source
This build step is a bit excessive. Let's require people to have an
up-to-date CMake from their system package manager instead.
2024-07-15 10:15:40 +02:00
Andrew Kaster
182f83d456 Documentation: Update VSCode Configuration to minimize rebuilds 2024-07-15 10:15:40 +02:00
Andrew Kaster
53f4e98818 Documentation: Re-organize and update build instructions
Add CMake 3.25 download instructions from apt.kitware.org, and add
option to grab gcc-13 from ubuntu-toolchain-r/test PPA.
2024-07-15 10:15:40 +02:00
Kotaro Ichihara
0307095f52 Meta: Make ladybird.sh old bash compatible 2024-07-14 19:55:50 -06:00