Commit graph

57254 commits

Author SHA1 Message Date
kleines Filmröllchen
47b6030347 Meta: Replace run.sh by run.py
A Python script is much easier to maintain than the organically grown
variable mess that was run.sh.

For now, the script inherits most environment variable modifiability
from the shell script, but this is not a requirement.

While porting this script, a couple of improvements have been made:
- Spaces (especially in paths) cannot break most arguments anymore.
  Exceptions are environment variables specifying multiple arguments on
  purpose, these should be replaced in the future anyways.
- Force control over virtualization is now possible with
  SERENITY_VIRTUALIZATION_SUPPORT. If set to 0, this variable was
  sometimes ignored before.
- Handling Windows native QEMU is much more robust. Multiple incorrect
  checks for WSL, but not Windows native QEMU, were used before. This
  would also allow disabling native Windows QEMU much more easily in the
  future, which is necessary for GDB.
- Various machine types had wrong or outdated arguments, such as qn.

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2023-12-15 00:11:50 +01:00
Torstennator
b61e4e7cd9 PixelPaint: Repaint histogram data when the widget gets resized
This patch enables the histogram to redraw itself when it gets resized
without calculating the data again through the image.
2023-12-14 09:07:20 -07:00
Torstennator
c85c61571c PixelPaint: Make use of DynamicWidgetContainer
This patch adds the new DynamicWidgetContainer for the right panel
elements. This allows the user to collapse, expand or even detach
widgets to a separate window. The collapsed or expanded state is
persisted so that they are restored after application startup.
With this change it is possible to shrink the size of widgets to a
minimum in order to give more space to other currently important
widgets.
2023-12-14 09:07:20 -07:00
Torstennator
b65e711929 LibGUI: Add DynamicWidgetContainter
Add a new widget "DynamicWidgetContainer" that is used to group it's
child widgets within an collapsable and detachable container. The
DynmnicWidgetContainer is able to persist it's view state if a config
domain has been provided. Having that set will allow the widget to
restore it's view state automatically.
2023-12-14 09:07:20 -07:00
Torstennator
38974b4128 LibCore: Allow widgets to reparent 2023-12-14 09:07:20 -07:00
Dan Klishch
8afbeb1892 JSSpecCompiler: Print stderr in test runner if compiler invocation fails 2023-12-14 09:06:05 -07:00
Dan Klishch
8126e76e59 JSSpecCompiler: Compare CFG when running regression tests 2023-12-14 09:06:05 -07:00
Dan Klishch
ce6b987330 JSSpecCompiler: Add --dump-cfg option 2023-12-14 09:06:05 -07:00
Dan Klishch
ff44aea917 JSSpecCompiler: Add control flow building pass 2023-12-14 09:06:05 -07:00
Torstennator
c74e2d04d1 PixelPaint: Fix crash on mouse moves
This pr fixes a problem where the application would crash if the mouse
was moved while the editor was still loading the image. With this
change tool related mouse move events are discarded as long as there is
no active tool.
2023-12-14 09:04:31 -07:00
Torstennator
d462d6280a PixelPaint: Fix initial tool selection
This changes how the initial tool is beeing set on application startup.
With this change the initial tool is set the same way as when the tool
is changed via the frontend. Thus it also updates the tool properties
window which wasn't done before leaving the properties empty as long
the tool was changed for the first time.
2023-12-14 09:04:31 -07:00
Sönke Holz
2b44c4c3f7 Kernel/riscv64: Make the kernel compilable using GCC
This commit adds all necessary includes, so all functions are properly
declared.
PCI.cpp is moved to PCI/Initializer.cpp, as that matches the header
path.
2023-12-14 09:02:15 -07:00
Sönke Holz
4cd1e4d69e Kernel/riscv64: Use ALWAYS_INLINE instead of inline in CSR header
This fixes building the kernel with `-Og` when using GCC.
2023-12-14 09:02:15 -07:00
Sönke Holz
f04a2b81be Meta: Disable -Wcast-align warning on RISC-V
Also explicitly specify `-mstrict-align` (The current default `-mcpu`
on gcc doesn't support unaligned accesses, so aligned memory accesses
are already implicitly required).
The `-Wcast-align` warning seems to oversensitive as it flags code like
this: https://godbolt.org/z/c8481o8aa

This used to be added for aarch64 in a473cfd71b, but was later removed
in 11896868d6.
2023-12-14 09:02:15 -07:00
Sönke Holz
7768f97333 Meta: Force signed char on all architectures 2023-12-14 09:02:15 -07:00
Tim Schumacher
a1cf2708ee LibCompress: Implement the XZ BCJ filter for ARM64 2023-12-14 08:59:23 -07:00
Tim Schumacher
e2d4952f0f AK: Add Array::from_repeated_value() 2023-12-14 08:59:23 -07:00
Tim Schumacher
afea177d41 Ports/qemu: Update to 8.1.3 2023-12-14 16:43:37 +01:00
Tim Schumacher
592c3a8cb4 Ports: Remove termcap
termcap has last been updated in 2002, and is relying on a lot of
deprecated C99 behavior. All two current users are fine without it,
so just remove it completely.
2023-12-14 16:43:37 +01:00
Andrew Kaster
14c724e8e2 Ports: Use valid URL for libopus 2023-12-14 08:36:25 -07:00
Andrew Kaster
db7eff582e Meta: Update cacert.pem to 2023-12-12 2023-12-14 08:36:25 -07:00
Andrew Kaster
ec11743fae LibWeb: Use StructuredSerializeWithTransfer in window.postMessage()
And update tests to transfer message a message port between iframes.
2023-12-14 08:36:11 -07:00
Andrew Kaster
84ac6a454f LibWeb: Use `Vector<Handle<Object>>` in transfer variants of serialize
Also trap the invalid object index inserted for transferred values in
deserialization. In the future we should avoid inserting that
placeholder value in the data stream at all.
2023-12-14 08:36:11 -07:00
Andrew Kaster
73697058b0 LibWeb: Add ports attribute to MessageEvent and MessageEventInit
Still some FIXMEs left though, as the IDL generator doesn't know what
a FrozenArray is, nor how to properly create a sequence of a Platform
Object.
2023-12-14 08:36:11 -07:00
Aliaksandr Kalenik
e464d484c4 LibWeb: Implement getBoundingClientRect() for inline paintables
This fixes the issue that occurred when, after clicking an inline
paintable page would always scroll to the top. The problem was that
`scroll_an_element_into_view()` relies on `get_bounding_client_rect()`
to produce the correct scroll position and for inline paintables we
were always returning zero rect before this change.
2023-12-14 16:25:27 +01:00
Aliaksandr Kalenik
874af6048f LibWeb/Painting: Remove command to paint progress bar
It is no longer used because we started using shadow dom for progress
element.
2023-12-14 16:24:15 +01:00
Andrew Kaster
c145d5410c Userland: Don't leak objects when constructor arguments throw
Similar to d253beb2f7.

Found with Ali's clang-query script in Shell:

```
for $(find AK Userland -type f -name '*.h' -o -name '*.cpp') {
    in_parallel -j 12 -- clang-query -p \
    Build/lagom/compile_commands.json $it -c \
    'm cxxNewExpr(has(cxxConstructExpr(hasAnyArgument(hasDescendant( \
        allOf(isExpandedFromMacro("TRY"), stmtExpr()))))))' \
    } | grep -v 'matches.' | tee results
```
2023-12-13 19:21:03 -07:00
Andrew Kaster
d253beb2f7 LibCore: Don't leak proto-Resources when loading non-existent paths
The construct `adopt_ref(*new Obj(TRY(get_resource())))` is another
manifestation of a classic anti-pattern. In old C++, you would leak the
object's memory if the argument threw an exception, or if a member
initializer threw an exception. In our case, we leak if the MappedFile
returns an Error. This is pretty concerning, and we should avoid this
pattern at all costs, and try to use the "safer" helpers whenever
possible.
2023-12-13 17:28:07 -05:00
Kemal Zebari
771467f92f LibGUI: Fix debug line causing crash when drag event has no mime data
Resolves #10618.
2023-12-13 17:26:41 -05:00
Bastiaan van der Plaat
04b591b2e0 Ladybird/Qt: Listen to DPI changes and update WebContentView accordingly 2023-12-13 22:25:27 +01:00
Aliaksandr Kalenik
51ecfdf71f LibWeb: Add unscaled fallback font in case Font::with_size() failed 2023-12-13 22:25:00 +01:00
Aliaksandr Kalenik
de4b240429 LibWeb: Add missing null check in font_with_point_size() 2023-12-13 22:25:00 +01:00
Andrew Kaster
6e4d5b310f Meta: Port recent changes to gn build
299d35aadc
7d9fe44039
58f08107b0
2cb0039a13
bc70144df1
48a9d0ede8
149e382735
2023-12-13 10:51:27 -07:00
Andrew Kaster
e0f990f1cb CMake: Don't download IDNA files when ENABLE_NETWORK_DOWNLOAD is OFF
Also tweak the debug message for the Emoji test file.
2023-12-13 10:51:27 -07:00
Nicolas Ramz
cd6c7f3fc4 LibGfx/ILBMLoader: Add support for PC DeluxePaint files 2023-12-13 10:39:13 +00:00
Aliaksandr Kalenik
b108d51c5b LibJS: Only consider VM-accessible execution contexts as strong roots
Partially reverts 3dc5f467a8 to fix
GC memory leak that happens because we treated all execution contexts
as strong roots.
2023-12-13 11:19:13 +01:00
Bastiaan van der Plaat
cbb660c756 LibWeb: Make request_select_dropdown more similar to context menu api 2023-12-13 10:30:13 +01:00
Bastiaan van der Plaat
aee8b39c65 Ladybird/Qt: Open context menus at requested position 2023-12-13 10:30:13 +01:00
Bastiaan van der Plaat
8b0abb8ded Ladybird/Qt: Don't use devicePixelRatio() directly 2023-12-13 10:30:13 +01:00
Aliaksandr Kalenik
41a3c19cfe LibWeb: Make HTML::DecodedImageData to be GC-allocated
This change fixes GC-leak caused by following mutual dependency:
- SVGDecodedImageData owns JS::Handle for Page.
- SVGDecodedImageData is owned by visited objects.
by making everything inherited from HTML::DecodedImageData and
ListOfAvailableImages to be GC-allocated.

Generally, if visited object has a handle, very likely we leak
everything visited from object in a handle.
2023-12-12 23:01:08 +01:00
Andrew Kaster
57a04c536c Ladybird: Enable rich debug messages on all processes
Android is excluded from this patch because the Android dbgln routes
messages to the NDK logger, which already includes process and time
information.
2023-12-12 10:11:24 -07:00
Andrew Kaster
4db5e2ba22 AK: Print timestamp, process name, and pid on all platforms
This requires duplicating some logic from Core::Process::get_name()
into AK, which seems unfortunate. But for now, this greatly improves the
log messages for testing Ladybird on Linux.

The feature is hidden behind a runtime flag with a global setter in the
same way that totally enabling/disabling dbgln is.
2023-12-12 10:11:24 -07:00
Andrew Kaster
87cbc63334 LibELF: Remove loader reservation after most allocating operations
It's possible for a malloc inside load_program_headers() to steal the
reserved memory space we created for the program headers. Remove the
reservation later in the method.
2023-12-12 17:41:44 +01:00
Aliaksandr Kalenik
57e5abae92 LibJS+LibWebView+WebContent+Ladybird: Output GC-graph into a file
Instead of displaying a massive JSON in stdout, it's more practical
to save the GC-graph to a file.
2023-12-12 15:35:35 +01:00
Andreas Kling
ed1bee222b LibJS: Give Shape::TransitionType an underlying 8-bit type
This shrinks Shape by 8 bytes. :^)
2023-12-12 15:26:46 +01:00
Dan Klishch
8dfca6c464 LibWebView: Do not treat prefix of public suffix as valid public suffix 2023-12-12 06:44:54 -05:00
Liav A
dbae1873ec Base: Add manual page for drain(1) 2023-12-12 06:44:10 -05:00
Liav A
f67b9cb680 Utilities/drain: Add an option to specify different block size
This is useful for a situation when handling a small file than 512 KiB
or being under low system memory pressure.
2023-12-12 06:44:10 -05:00
Andreas Kling
5204020d42 LibWeb: Add missing DOM::Position::visit_edges()
Caught by running the test suite under ASAN.
2023-12-12 01:08:07 +01:00
Andreas Kling
6cbcd521a2 LibJS/JIT: Add fast path for UnaryMinus on Int32
5% speedup on Octane/mandreel.js :^)
2023-12-12 00:10:44 +01:00