Commit graph

46405 commits

Author SHA1 Message Date
Jelle Raaijmakers 403c0e6dab Ports: Install all dependencies instead of just one
Commit 9b7e217dda broke installation of port dependencies by
`return`ing as soon as the first dependency was found.
2023-02-02 14:38:48 +01:00
Jelle Raaijmakers 62f4486190 LibSoftGPU: Only enable texture stages if required
Copying over every texel (4x`f32x4`) for every texture unit is
relatively expensive. By checking if we even need to remember these
texel values, we reduce the time spent in `rasterize_triangle` by
around 2% as measured in Quake III.
2023-02-02 14:38:26 +01:00
Jelle Raaijmakers dcf33f9b8f Ports: Add bind mount automatically for Quake3
We need a `wxallowed` bind mount for the `ioquake3` binary to be able to
compile and run its executable scripts in memory. Instead of instructing
the user how to do so in `/etc/fstab`, we can now use the fancy
`/etc/fstab.d` facility :^)
2023-02-02 14:38:26 +01:00
Jelle Raaijmakers 69b94e4235 LibSoftGPU: Make blending simpler and more efficient
Previously, we would precalculate "alpha blend factors" on every
configuration update and then calculate the source and destination
blending factors in one go using all these factors. The idea here was
probably that we would get better performance by avoiding branching.

However, by measuring blending performance in Quake III, it seems that
this simpler version that only calculates the required factors reduces
the CPU time spent in `rasterize_triangle` by 3%.

As a bonus, `GL_SRC_ALPHA_SATURATE` is now also implemented.
2023-02-02 14:38:26 +01:00
Jelle Raaijmakers f0f9d8f1e0 Profiler: Standardize percentage formatting
This implements the same percentage formatting for the disassembly and
flamegraph views as we have for the profile model.
2023-02-02 14:37:01 +01:00
Timothy Flynn 5d1acdc455 FileSystemAccessServer: Send correct error code for failed file access
When a file cannot be accessed, we currently send errno as the error
code. However, there are system calls which occur (by way of dbgln)
between the failed file access and accessing errno. This prevents the
client-side detection of ENOENT from working.

Instead, send over the error we already have stored in the ErrorOr
object.
2023-02-02 14:36:01 +01:00
Linus Groh a7d03ba4c8 Meta: Add Martin Falisse to the contributors list :^)
With a slight delay, but hopefully inserted at the right position for
correct historical order.
2023-02-02 12:49:16 +00:00
Linus Groh ab9f496679 Meta: Add Rodrigo Tobar to the contributors list :^) 2023-02-02 12:39:02 +00:00
Linus Groh 78f14ad249 Meta: Add Erik Wouters to the contributors list :^) 2023-02-02 12:39:02 +00:00
Andrew Kaster 7598a99ef3 Ladybird: Spawn ladybird and headless-browser using helpers in WebDriver
This allows the WebDriver to take advantage of the common helper process
spawning code when launching ladybird, and to not assume a particular
directory layout.
2023-02-02 05:35:44 -07:00
Andrew Kaster 0d5d3f12e2 Ladybird: Clean up install rules for executables
Use a list of executables to make sure that we don't miss any of the
applications used by Ladybird and its friends like WebDriver, and make
sure to install include all executables and their runtime dependencies.
2023-02-02 05:35:44 -07:00
Andrew Kaster 8f70e365f0 Meta+CI: Disable Ladybird for fuzzer, compiler explorer and Android
And move it after the declaration of headless-browser, since WebDriver
depends on headless-browser.
2023-02-02 05:35:44 -07:00
Andrew Kaster ae9dc95b1f LibSQL+Ladybird: Accept a list of paths for spawning SQLServer in Lagom
Use the new get_paths_for_helper_process method in Ladybird to query
Qt for the runtime path of the current executable as well as the build
directory paths.
2023-02-02 05:35:44 -07:00
Andrew Kaster 3e6d790cf0 Ladybird: Abstract spawning helper processes into separate methods
This will let us use the same path discovery methods for WebContent,
SQLServer, and any other helper processes we need to launch.
2023-02-02 05:35:44 -07:00
Timothy Flynn 792258afe8 LibWeb: Restore handling of the serenity:ladybird/headless capability
This was refactored a bit incorrectly in d8fde14.
2023-02-02 12:21:44 +00:00
Andreas Kling 9347db6f91 LibGUI: Make Tray item height honor the current font size 2023-02-02 13:15:03 +01:00
Andreas Kling be3a9048be LibGUI: Relayout Breadcrumbbar on font change 2023-02-02 13:15:03 +01:00
Andreas Kling dd607fc619 LibGUI: Invalidate IconView cache on font change
Changing the font means we have to recalculate all the item rects etc.
2023-02-02 13:15:03 +01:00
Andreas Kling ff0766056b LibGUI: Don't hard-code TreeView row height
Instead of overriding AbstractTableView::row_height() and returning a
hard-coded height for some reason, just remove the override.

This makes tree view row heights honor the current font size.
2023-02-02 13:15:03 +01:00
Timothy Flynn bb4fda3b97 LibJS: Format the era of ISO year 0 as BC
This is a normative change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/2034315
2023-02-02 12:12:26 +00:00
martinfalisse f0312de7eb Ladybird: Left-align long url in address bar
Previously when there was a very long url that spanned outside of the
address bar, the text shown would be the one starting from the very end
of the url instead of from the beginning, so you would be seeing the
query parameters for example, instead of the domain.
2023-02-02 12:10:31 +00:00
Marcus Nilsson feef83359d DisplaySettings: Made select wallpaper use allowed file types 2023-02-02 04:05:42 -07:00
Marcus Nilsson be464c357a LibGUI: Add allowed file types to FilePicker
This patch adds a ComboBox to `FilePicker` where the user can select
which file types to show, all files that doesn't have an
extension that's in the selected file type will be hidden.

When creating a FilePicker with `FilePicker::construct` or
`FilePicker::get_open_filepath`, allowed file types can be
specified as the last argument.

If no file types are provided then there will be no visual change in the
GUI.

'All Files' and 'Image Files' have shorthands with
`GUI::FileTypeFilter::all_files()` and
`GUI::FileTypeFilter::image_files()`, respectively.
2023-02-02 04:05:42 -07:00
Marcus Nilsson fe5dfe4cd5 LibGUI: Add allowed file extensions to FileSystemModel
This allows FileSystemModel to take an optional list of allowed file
extensions which it will use to filter out all files that don't end
with that file extension.

The file extensions are set via `set_allowed_file_extensions` which has
a coresponding `get_allowed_file_extensions`.
2023-02-02 04:05:42 -07:00
MacDue c3bd841d50 SQLServer: Unveil /etc/passwd
This is now required to launch the SQLServer for Browser (without
this it now fails to launch).
2023-02-02 02:17:06 -07:00
Liav A cd3c51f29b Kernel/Graphics: Export DDC I2C address definition to global header file 2023-02-02 02:10:33 -07:00
Liav A 0c64abb5e3 Kernel: Split I2C functionality from IntelNativeDisplayConnector code
Splitting the I2C-related code lets the DisplayConnector code to utilize
I2C operations without caring about the specific details of the hardware
and allow future expansion of the driver to other newer generations
sharing the same GMBus code.

We should require a timeout for GMBus operations always, because faulty
hardware could let us just spin forever. Also, if nothing is listening
to the bus (which should result in a NAK), we could also spin forever.
2023-02-02 02:10:33 -07:00
Liav A ddc5c41253 Kernel: Fix a long-standing problem with GMBus in Intel Grahpics code
Thanks to Andrew Kaster, which gave a review back in October, about a
big PR I opened (#15502), I managed to figure out why we always had a
problem with the first byte being read into the EDID buffer with the
GMBus code. It turns out that this simple invalid cast was making the
entire problem and using the correct AK::Array::data() method fixed this
notorious long standing problem for good.
2023-02-02 02:10:33 -07:00
Simon Haegler 5220afcf73 Documentation: Add troubleshooting note regarding KVM GDB 2023-02-02 02:02:23 -07:00
Agustin Gianni bfbb4bcd9b Kernel: Remove trap based syscall handling
This patch removes the x86 mechanism for calling syscalls, favoring
the more modern syscall instruction. It also moves architecture
dependent code from functions that are meant to be architecture
agnostic therefore paving the way for adding more architectures.
2023-02-02 01:52:52 -07:00
Agustin Gianni e71c320154 Kernel: Change the way we call a syscall in signal_trampoline_dummy
The function signal_trampoline_dummy was using int 0x82 to call
SC_sigreturn. Since x86 is no longer supported, the correct way
to call a syscall is using the syscall instruction.

This paves the way to remove the syscall trap handling mechanism.
2023-02-02 01:52:52 -07:00
Kemal Zebari 5d7331b4ed Browser: Disallow empty URLs in the bookmark editor
When an empty URL is given to `BookmarkEditor`, it will now
disable the button that saves the bookmark change since an empty
URL is an invalid URL.
2023-02-02 01:18:33 +01:00
martinfalisse 24ab91f4d3 Ladybird: Go to homepage on init
If a url wasn't passed in as a parameter to Ladybird, go to the homepage
as defined in the settings on init.
2023-02-01 19:14:20 +00:00
martinfalisse abf8dd96de Ladybird: Refactor navigating to url on startup
These changes will prevent duplication of code later when there will
also be the possibility to navigate to the homepage url as defined in
the settings on startup.
2023-02-01 19:14:20 +00:00
martinfalisse 65cf562a71 Ladybird: Add ak_string_from_qstring function
This will be used later when doing the conversion from the QString in
QSettings for the homepage URL.
2023-02-01 19:14:20 +00:00
Tim Ledbetter 4be6ee85e0 PixelPaint: Ensure layers are positioned correctly when painting
Previously, layer bitmaps could move slightly relative to their
boundary and the image background when panning and zooming.
2023-02-01 19:36:39 +01:00
Tim Ledbetter 607c8045dc PixelPaint: Allow dragging when color picking using the Alt key 2023-02-01 19:21:58 +01:00
Tim Ledbetter 06e09cf415 PixelPaint: Disable current tool when color picking using the Alt key 2023-02-01 19:21:58 +01:00
Tim Ledbetter 2f5bbc68ed PixelPaint: Use eyedropper cursor when color picking using Alt key 2023-02-01 19:21:58 +01:00
Tim Ledbetter 45e60a416b PixelPaint: Use layer coordinates when color picking using Alt key
Previously, raw coordinates were being used, which meant that color
was being sampled from the wrong position.
2023-02-01 19:21:58 +01:00
Lucas CHOLLET 81bd91c1c3 SystemServer: Propagate errors
This patch also includes some changes in the way that the environment
and arguments are passed to `exec`. It was needed to fit the signature
of `Core::System::exec`. That's beneficial though, as we are now doing
`String` manipulation in a fallible environment, so we can propagate
more errors.
2023-02-01 19:21:10 +01:00
Lucas CHOLLET cd0b7656fa ConfigServer: Unveil "/etc/passwd"
This is needed to use functions like `getpwuid()`.
2023-02-01 19:21:10 +01:00
Nico Weber fb79fc0ba6 Tests: Add a basic ICC profile test
icc-v4.jpg is Meta/Websites/serenityos.org/happy/3rd/bgianf.jpg.
There are a whole bunch of jpgs with v4 color profiles and I just picked
one fairly arbitrarily. It looks like a fairly standard v4 matrix
profile that in this form is also present in many jpgs taken by mobile
phone cameras. It uses parametric curves.

icc-v2.png is based on ./Documentation/WebServer_localhost.jpg since
that is the only image in the repo with a v2 color profile. It also has
all kinds of interesting and somewhat exotic tags, such as an 'dscm' (an
Apple extension to have a description of type 'mluc', since normal
'desc' is required ot have type 'desc' in v2 files -- in v4, 'desc' has
type 'mluc') tag of type 'mluc' that actually contains data in several
languages and that exercises the non-BMP UTF-16BE decoder. It's however
still also a fairly standard v2 matrix profile, which uses 'curv'
instead of 'para' for its curves ('para' is v4-only).

I converted that jpeg file to png, and cropped most of the image
data to save on file size by running:

    sips -s format png --cropToHeightWidth 21 42 in.jpg --out out.png
2023-02-01 19:19:30 +01:00
Nico Weber d43b306814 LibGfx: Give ICC::TagType a virtual destructor
ICC::Profile deletes these objects via base class pointers, so this
is needed that destructors in the subclasses get called.

(Found by asan on CI when adding test coverage.)
2023-02-01 19:19:30 +01:00
Cubic Love 0cfce93e51 Base+Presenter: Add icons for Presenter
Add application and filetype icons for Presenter in 32px and 16px
2023-02-01 19:17:48 +01:00
Timothy Flynn 38b0b32bb4 Meta: Set LD_LIBRARY_PATH to Build/lagom for Lagom test targets
Some tests, such as those under LibGL, try to load shared libraries at
runtime which are stored in Build/lagom. Because all tests' working
directory is that of their CMakeLists.txt file, they fail to find those
shared libraries at runtime.

Set LD_LIBRARY_PATH to Build/lagom so the tests may find the shared
libraries. This fixes, for example, both of these commands:

    ./Meta/serenity.sh test lagom TestAPI
    ./Meta/serenity.sh run lagom TestAPI
2023-02-01 12:28:02 -05:00
Timothy Flynn 1bbd889f67 Meta: Set the Lagom test working directory for run-lagom-target
When we call add_test() from each test's CMakeLists.txt, we specify the
working directory to be that of the CMakeList.txt file itself. Create a
property to store that directory and reference it when run-lagom-target
is invoked by serenity.sh.

Note that for non-test Lagom targets which do not set this property, the
working directory will be Build/lagom (because the property will be the
empty string, which CMake resolves relative to the current build path).
2023-02-01 12:28:02 -05:00
Nico Weber 0a97206a25 Meta: Derust fuzzer build docs
The document wasn't updated in 9c2211f246.
2023-02-01 14:44:58 +00:00
Sam Atkins ced59fb3a0 Spider: Make double-click skip the new-game animation 2023-02-01 14:19:15 +00:00
Sam Atkins 8744e8b561 Spider: Use a single State enum instead of a series of booleans 2023-02-01 14:19:15 +00:00