Commit Graph

62573 Commits

Author SHA1 Message Date
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
Diego Frias
ff7ca5c48c LibWebView: Trim whitespace when sanitizing file paths
Previously, the presence of surrounding whitespace would give file paths
the `https` schema instead of the `file` schema, making navigation
unsuccessful.
2024-07-14 23:44:36 +01:00
Jamie Mansfield
9ce727d315 LibWeb/Fetch: Use correct header for prefetch requests
See:
 - https://github.com/whatwg/fetch/commit/a5560d2
2024-07-14 12:08:20 +02:00
Jamie Mansfield
aee77b975c LibWeb/Fetch: Add missing fetch step for preloaded resources
This is currently no-op and a FIXME exists to implement the "consume a
preloaded resource" AO.
2024-07-14 12:08:20 +02:00
Maciej
9eb568eacb LibWeb: Make innerHTML for XML nodes actually return inner HTML
The spec says to just call the XML serialization algorithm, but it
returns the "outer serialization", and we need the "inner" one. Let's
just concatenate serializations of children; then the result produced is
similar to one from Blink or Gecko.
2024-07-14 11:49:31 +02:00
Maciej
cad3b085a8 LibXML: Set XMLNS namespace for xmlns attribute
This is what Blink and Gecko do, and is required for serialization
(innerHTML etc.) of XML elements to work.
2024-07-14 11:49:31 +02:00
Enver Balalic
f0a306fe50 LibWasm: Implement most of iNxM SIMD operations
With this we pass an additional ~2100 tests.
We are left with 7106 WASM fails :).

There's still some test cases in the iNxM tests that fail with
this PR, but they are somewhat weird.

Co-authored-by: Diego Frias <styx5242@gmail.com>
2024-07-14 11:35:11 +02:00
Diego
3a0f80bbae LibWasm: Ignore tests that check that we don't support 2+ memories
Since we support the multi-memory proposal, we should skip tests that
validate that we have only one memory. Once multi-memory gets included
in the main WebAssembly specification (and the testsuite is updated), we
can revert this commit.
2024-07-14 11:26:52 +02:00
simonkrauter
9da3e29818 LibWeb: Make scrollbar thumbs visible on dark background
Previously, the scrollbar thumbs were (almost) invisible, when the page
background color was similar to the scrollbar thumb color (DarkGray).
Now, in addition to the filled rounded rectangle, the scrollbar thumbs
are painted with a 1px solid LightGrey border. On a white or light color
background the border stays invisible.
2024-07-14 08:13:03 +02:00
simonkrauter
04526261c3 LibWeb: Use shorter variant of fill_rect_with_rounded_corners()
Instead of passing `thumb_corner_radius` 4 times, pass it only once.
2024-07-14 08:13:03 +02:00
Jamie Mansfield
1f1276ffb1 LibWeb: Implement HTMLMarqueeElement.trueSpeed 2024-07-13 19:57:51 +02:00
Jamie Mansfield
a917f8124c LibWeb: Implement HTMLMarqueeElement.scrollDelay 2024-07-13 19:57:51 +02:00
Jamie Mansfield
2a408ecfbc LibWeb: Implement HTMLMarqueeElement.scrollAmount 2024-07-13 19:57:51 +02:00
Jamie Mansfield
66528a17cb LibWeb: Implement HTMLFrameElement.noResize 2024-07-13 19:57:51 +02:00
Jamie Mansfield
e363e89189 LibWeb: Implement HTMLFrameElement.marginWidth 2024-07-13 19:57:51 +02:00
Jamie Mansfield
4edc946aed LibWeb: Implement HTMLFrameElement.marginHeight 2024-07-13 19:57:51 +02:00