Linus Groh
9f03647f1f
LibJS: Convert to_temporal_overflow() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
b1e7e62657
LibJS: Convert get_string_or_number_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8d6ac267dc
LibJS: Convert Temporal::get_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
08dd1c3e2d
LibJS: Convert get_options_object() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f2b5ddd167
LibJS: Convert iterable_to_list_of_type() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
683e31e1ff
LibJS: Convert to_integer_throw_on_infinity() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
fea27143e9
LibJS: Initialize value in ThrowCompletionOr<void> default constructor
...
Otherwise, TRY() will crash when calling release_value() on the empty
m_value Optional.
2021-09-16 22:34:24 +01:00
Ben Wiederhake
5f0f0ac413
crash: Don't test for qemu-unsupported feature
...
See #10042 for details. In short: qemu doesn't seem to implement that
feature, therefore the test correctly fails. However, that does not help
us, so we skip that test.
2021-09-16 20:51:24 +00:00
Ben Wiederhake
c680ef0a09
crash: Run automatically during CI
2021-09-16 20:51:24 +00:00
Ben Wiederhake
e8d37b7b17
crash: Check whether the msyscall mitigation actually works
2021-09-16 20:51:24 +00:00
Tobias Christiansen
f8ea730f29
LibWeb: Flexbox: Add default value for AlignItems
...
Previously there was no default value and wrapping broke when the
container didn't have a align-items specified.
2021-09-16 22:51:15 +02:00
Sam Atkins
6c992e5dce
LibGfx: Don't try to paint 0px-wide lines
...
In some cases, we were infinite-looping when asked to paint something
with a thickness of '0', so now every Painter method that takes a
thickness, does a check for a thickness <= 0 and bails early. After all,
you can't draw something that's 0px wide. :^)
2021-09-16 22:30:33 +02:00
Sam Atkins
3964b81d2b
LibWeb: Add for CSS fill/stroke/stroke-color
properties for SVG
...
In the spec, `fill` and `stroke` are supposed to be a shorthands for
various properties. But since the spec is still a working draft, and
neither Firefox or Chrome support the `fill-color` or `stroke-color`
properties, we'll stick with `fill` and `stroke` as simple colors for
now.
Also, note that SVG expects things in "user units", and we are assuming
that 1px = 1 user unit for now.
2021-09-16 22:30:33 +02:00
Sam Atkins
2c8c56684b
Base: Add CSS styles to SVG test page
...
SVG is styleable using CSS, so this adds an extra triangle to the page,
which is styled with CSS instead of attributes.
2021-09-16 22:30:33 +02:00
Marcus Nilsson
dc9b18da22
PixelPaint: Implement automatic scrolling in LayerListWidget
...
The previous implementation of automatic scrolling in LayerListWidget
relied on mousemove events to perform the scrolling, which didn't
produce the expected behavior. Instead use the new auto scroll timer.
2021-09-16 22:29:21 +02:00
Marcus Nilsson
eec411c508
LibGUI: Add a AutoScroll timer to AbstractScrollableWidget
...
This commit adds a timer to AbstractScrollableWidget that can be used
when implementing automatic scrolling. By overriding
on_automatic_scrolling_timer_fired() we can calculate the scrolling
delta when dragging objects, and redraw as needed. A helper function,
automatic_scroll_delta_from_position() gives us a delta that
we can use to calculate speed and direction. By default
m_autoscroll_threshold is 20 pixels from the edge, and gives a linear
change in scroll delta.
2021-09-16 22:29:21 +02:00
Marcus Nilsson
522119ab95
LibGUI: Implement is_min() & is_max() helpers to AbstractSlider
2021-09-16 22:29:21 +02:00
Ali Mohammad Pur
c7a99aafac
LibJS: Use ScopePusher to correctly push the scope in for statements
...
We were previously pushing a scope but forgetting to actually set it as
the current scope.
2021-09-16 21:51:45 +02:00
Andreas Kling
63a0ebcc90
js: Add a simple loadJSON(path) built-in to load JSON from a file
...
This is very handy when you want to load data from /proc, for example.
2021-09-16 21:49:50 +02:00
Andrew Kaster
d0506730b8
Meta: Ensure BUILD_LAGOM is set when running serenity.sh test lagom
...
If the superbuild created the lagom binary directory, it won't set
BUILD_LAGOM=ON in the CMake cache for that binary directory. Insert a
check into build_target() to make sure that if the user explicitly asks
for the lagom target, we have all our ducks in a row.
2021-09-16 15:47:13 +00:00
Andrew Kaster
454a839f49
CI+Meta: Update Sonar Cloud CI job for new SuperBuild configuration
...
This requires exposing the `configure` step on the `serenity`
ExternalProject in the SuperBuild CMakeLists so that we can continue to
only build the generated sources and not the entire OS.
2021-09-16 15:47:13 +00:00
Andrew Kaster
a78f967b93
Documentation: Recommend setting PREFIX_PATH instead of INSTALL_PREFIX
...
This was straight up the wrong CMake variable to set. We care about
where the project will find Lagom, not where it wants to install its own
binaries to.
2021-09-16 15:47:13 +00:00
Andrew Kaster
04d91e90c2
Meta: Fix Lagom RPATH for non-Ubuntu Linux and macOS hosts
...
Multi-lib distros like Gentoo and Fedora install lagom-core.so into
lagom-install/lib64 rather than lib. Set the install RPATH based on
CMAKE_INSTALL_LIBDIR to avoid the wrong path being set in the binaries.
Also apply macOS specific RPATH rules to fix the build on that platform.
2021-09-16 15:47:13 +00:00
Brian Gianforcaro
951cd68979
Shell: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
4a53c66b7f
FileSystemAccessServer: Only compute basename when prompting
...
pvs-studio flagged this as a potential performance optimization,
we only need to compute the basename when it's used.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
677f227774
LibX86: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b9c53a096a
LibVT: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
744de5ec69
LibThreading: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
bff33c67ab
LibThreading: Neither Mutex or MutexLocker should be movable / copyable
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
fdea5e1628
LibRegex: Pass RegexStringView and Vector<RegexStringView> by reference
...
Flagged by pvs-studio, it looks like these were intended to be passed by
reference originally, but it was missed. This avoids excessive argument
copy when searching / matching in the regex API.
Before:
Command: /usr/Tests/LibRegex/Regex --bench
Average time: 5998.29 ms (median: 5991, stddev: 102.18)
After:
Command: /usr/Tests/LibRegex/Regex --bench
Average time: 5623.2 ms (median: 5623, stddev: 86.25)
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
507effce5b
LibPDF: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
0db46eecdc
LibIPC: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
e2d154c74d
LibJS: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
fda48d7a6b
LibGfx: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
f327f54399
LibGfx: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
a7364eef3c
LibGUI: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
4fe99ff0d6
Kernel: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
24207d3795
Kernel: Fetch range once for each iteration of find_regions_intersecting
...
pvs-studio flagged this as a potential optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
e8ec1e908d
Kernel: Only instantiate main_program_metadata in the scope it's needed
...
pvs-studio flagged this as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b530201111
Kernel: Make IPv4SocketTuple operator== by reference
...
No reason for this to copy when comparing equality.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
85d36e56d2
Kernel: Pack Flock struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
07b314e843
Kernel+LibC: Pack SC_stat_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
be15bd3c86
Kernel+LibC: Pack SC_mount_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
dcb327a83b
Kernel+LibC: Pack SC_setsockopt_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
9956607283
Kernel+LibC: Pack SC_accept4_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b45ca5d56e
Kernel+LibC: Pack SC_inode_watcher_add_watch_params struct better
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
dba5710efa
LibCrypto: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
5dbc72a158
LibELF: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
889ade06fe
LibWeb: Use explicit move to avoid unnecessary RefPtr ref / unref
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
2b57018196
LibWeb: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00