Shannon Booth
b980224640
Ports/cmake: Update cmake to version 3.26.4
2023-07-16 00:05:53 -06:00
MacDue
1bc7b0320e
LibGfx: Approximate elliptical arcs with cubic beziers
...
Unlike all other primitives elliptical arcs are non-trivial to
manipulate, it's tricky to correctly apply a Gfx::AffineTransform to
them. Prior to this change, Path::copy_transformed() was still
incorrectly applying transforms such as flips and skews to arcs.
This patch very closely approximates arcs with cubic beziers (I can not
visually spot any differences), which can then be easily and correctly
transformed in all cases.
Most of the maths here was taken from:
https://mortoray.com/rendering-an-svg-elliptical-arc-as-bezier-curves/
(which came from https://www.joecridge.me/content/pdf/bezier-arcs.pdf ,
now a dead link).
2023-07-16 06:22:55 +02:00
MacDue
2a1bf63f9e
LibGfx: Use AK::sincos() and AK::Pi<double> in Path::elliptical_arc_to()
2023-07-16 06:22:55 +02:00
MacDue
8d4f90df4e
LibGfx: Pass angles as floats to Path::elliptical_arc_to()
...
These are stored as floats internally and other parameters are
FloatPoints, so taking doubles is a little inconsistent. Doubles are
needed for the endpoint -> center parametrization conversion, but that
does not need exposing in the API.
2023-07-16 06:22:55 +02:00
Sam Atkins
58c91f0a99
LibC: Remove duplicate log statement
...
Now that warnln() also outputs to the debug console, this would print
the error twice.
2023-07-16 00:59:13 +02:00
Sam Atkins
e0b7717a6a
FileManager: Remove duplicate log statement
...
Now that warnln() also outputs to the debug console, this would print
the error twice.
2023-07-16 00:59:13 +02:00
Sam Atkins
d48c68cf3f
AK: Automatically copy all warn/warnln logs to debug console
...
This is only enabled inside Serenity, as on Lagom, all out/warn/dbg logs
go to the same console anyway.
2023-07-16 00:59:13 +02:00
MacDue
d2766bd5fe
Tests/LibGfx: Test we can decode everything in TinyVG
...
This tests that we can successfully parse the "everything" TVG files,
which make use of every feature in TinyVG.
Test files taken from https://github.com/TinyVG/examples (MIT).
2023-07-15 21:36:28 +02:00
MacDue
cf05da131f
LibGfx/TinyVG: Close polygon path in OutlineFillPolygon
2023-07-15 21:36:28 +02:00
MacDue
a853f7b133
LibGfx/TinyVG: Map gradients to equivalent SVG gradients
2023-07-15 21:36:28 +02:00
MacDue
fb61082a6c
LibGfx/TinyVG: Don't move fill/stroke styles that are used in a loop
2023-07-15 21:36:28 +02:00
MacDue
bebfb81c85
LibGfx/TinyVG: Parse and ignore line_width
in paths
...
TinyVG allows varying the line width along a path, this is not supported
in LibGfx so we just ignore this (but still need to parse the field).
2023-07-15 21:36:28 +02:00
Aliaksandr Kalenik
8d940d57a4
LibJS: Delete for_each_lexical_function_declaration_in_reverse_order()
...
This function became unused after the only place where it was used was
refactored in 7af7e90e3f
2023-07-15 21:34:45 +02:00
Aliaksandr Kalenik
3c6fdde466
LibWeb: Fix hit testing for fixed position nodes
...
Subtract the scroll offset translation from the position when checking
for intersection between boxes within fixed position nodes.
2023-07-15 19:57:17 +01:00
Daniel Bertalan
e64a8751d1
LibJS: Do not use the $
special character in file names
...
The dollar sign is a special character in POSIX shells and in the Ninja
build file format. If the file name contains a `$`, something goes wrong
in the escaping/unescaping of this symbol, and CMake/GCC/Clang generate
invalid dependency files where not all instances of `$` are escaped
properly. Because of this, Ninja fails to rebuild `$262Object.cpp` if
the headers included by it have changed.
Stale `$262Object.cpp.o` files have been the cause of mysterious crashes
multiple times which only go away after doing a clean build. Let's
prevent these from happening again by removing the `$` from the
filename.
2023-07-15 11:09:22 -04:00
Shannon Booth
2b46e6f664
Everywhere: Update copyrights with my new serenityos.org e-mail :^)
2023-07-15 16:21:29 +02:00
Andreas Kling
2887976ce9
LibWeb: Fully resolve max-width values on inline-block elements
...
This fixes an issue where `max-width: fit-content` (and other
layout-dependent values) were treated as 0 on inline-blocks.
2023-07-15 12:30:07 +02:00
Kenneth Myhra
1f4f750052
Tests/LibWeb: Verify setting {readable,writable}Type throws RangeError
...
This test proves that setting transformer.{readable,writable}Type to a
value throws a RangeError.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
221f18f72e
Tests/LibWeb: Add TransformStream flush callback test
...
This test proves the ability of TransformStream to execute
caller supplied code in the flush callback, and have access to
TransformStreamDefaultController.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
5c6125c92b
Tests/LibWeb: Add TransformStream start callback test
...
This test proves the ability of TransformStream to execute
caller supplied code in the start callback, and have access to
TransformStreamDefaultController.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
74fdf59941
Tests/LibWeb: Add TransformStream transform callback test
...
This test proves the ability of TransformStream to execute to execute
caller supplied code in the transform callback that can transform
incoming chunks, and have access to TransformStreamDefaultController.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
1faca5ed9f
Tests/LibWeb: Add TransformStream Identity Transform test
...
This test proves the ability of TransformStream to convert between
writable and readable streams.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
d4f729a6d3
LibWeb: Implement TransforStream's constructor
2023-07-15 11:59:39 +02:00
Kenneth Myhra
7117cb7a35
LibWeb: Add set_up_transform_stream_default_controller_from_transformer
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f7c532d093
LibWeb: Add AO set_up_transform_stream_default_controller()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
86455bbb74
LibWeb: Add AO initialize_transform_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
a52f9970bc
LibWeb: Add AO create_readable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
8e6b386ff7
LibWeb: Add AO initialize_readable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f91c150cfc
LibWeb: Add AO transform_stream_default_source_pull_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
894f1e9d62
LibWeb: Add AO create_writable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
7d8f24c227
LibWeb: Add AO initialize_writable_stream()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
641b9edd89
LibWeb: Add AO transform_stream_default_sink_close_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
48921add86
LibWeb: Add AO transform_stream_default_sink_abort_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
18aa588968
LibWeb: Add AO transform_stream_default_sink_write_algorithm()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
11c0600729
LibWeb: Add AO transform_stream_default_controller_perform_transform()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
4d4fc53f5c
LibWeb: Implement TransformStreamDefaultController::terminate()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
e1740938fc
LibWeb: Add AO transform_stream_default_controller_terminate()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
4ae82983a4
LibWeb: Implement TransformStreamDefaultController::enqueue()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
e028918a64
LibWeb: Add AO transform_stream_default_controller_enqueue()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
d2236e5ca5
LibWeb: Add AO readable_stream_default_controller_has_backpressure()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
2d0a2756b4
LibWeb: Implement TransformStreamDefaultController::error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
9efcc01387
LibWeb: Add AO transform_stream_default_controller_error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
69fb6f15f9
LibWeb: Add AO transform_stream_error()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
ad73c03ea3
LibWeb: Add AO transform_stream_error_writable_and_unblock_write()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
91f58eb220
LibWeb: Add AO transform_stream_set_backpressure()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
d8d0e8a6ea
LibWeb: Add AO transform_stream_default_controller_clear_algorithms()
2023-07-15 11:59:39 +02:00
Kenneth Myhra
0091a60448
LibWeb: Add TransformStreamDefaultController scaffolding
...
This adds the scaffolding of TransformStreamDefaultController so we can
start implementing the necessary abstract operations for it.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
f1d69d789b
LibWeb: Add TransformStream scaffolding
...
This adds the scaffolding of TransformStream so we can start
implementing the necessary abstract operations for it.
2023-07-15 11:59:39 +02:00
Kenneth Myhra
90fdd598c2
LibWeb: Make sure we do not generate duplicate variable names
2023-07-15 11:59:39 +02:00
Kenneth Myhra
12ff48047f
LibWeb: Add Transformer API
...
This adds the Transformer API which the TransformStream() constructor
accepts as its first argument.
2023-07-15 11:59:39 +02:00