Commit graph

46670 commits

Author SHA1 Message Date
Andreas Kling 63ac6ced31 LibGUI: Merge two loops over the segments in Breadcrummbar::relayout() 2023-02-02 14:49:54 +01:00
Andreas Kling eb9d2c64c8 LibGUI: Center TreeView item icons vertically
This makes tree views with icons look a lot better at larger font sizes.
2023-02-02 14:49:54 +01:00
Keir Davis 797a53b307 Piano: Propagate errors in PlayerWidget
Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2023-02-02 14:47:24 +01:00
Karol Kosek 4311fd2774 LibWeb: Implement Element.attachShadow and Element.shadowRoot :^) 2023-02-02 14:43:29 +01:00
Karol Kosek 9ed4fe7049 LibWeb: Allow to set a root mode value when constructing a ShadowRoot 2023-02-02 14:43:29 +01:00
Karol Kosek 01e2cc5330 LibWeb: Add a helper function for checking if element is a shadow host 2023-02-02 14:43:29 +01:00
Karol Kosek 2cc108a15e LibWeb: Rename DOM::shadow_root() to shadow_root_internal()
The shadowRoot property getter that will be added in subsequent commits
has an additional check that checks whether the shadow root is opened.
I didn't update the function logic to match with the IDL interface,
because it's very likely we don't want that check in the existing code,
so that for example closed shadow root elements can still be updated.
2023-02-02 14:43:29 +01:00
Karol Kosek 9a7f786262 LibWeb: Make ShadowRoot.mode return ShadowRootMode instead of String 2023-02-02 14:43:29 +01:00
Karol Kosek 34913c48d3 LibWeb: Actually initialize ShadowRoot bindings
`mode` and `host` attributes were always undefined.
2023-02-02 14:43:29 +01:00
Tim Ledbetter d4cb089acb PixelPaint: Update text tool font color on primary color change 2023-02-02 14:41:59 +01:00
Guilherme Gonçalves 230c0b34d4 LibWeb+LibWebSocket: DOM WebSocket subprotocol support
This adds support for WebSocket subprotocols to WebSocket DOM
objects, with some necessary plumbing to LibWebSocket and its
clients.

See the associated pull request for how this was tested.
2023-02-02 14:41:34 +01:00
Tim Ledbetter 9115e99e4b PixelPaint: Scale move tool resize anchors
The areas where the user must click to resize the image are now
scaled to ensure they do not overlap. This allows us to display the
correct cursor when zoomed out, as well as making the
borders look nicer.
2023-02-02 14:40:17 +01:00
Tim Ledbetter c82825379a PixelPaint: Show resize anchors when using the move tool
This commit adds a two color border around areas that the user must
drag to resize, when using the move tool.
2023-02-02 14:40:17 +01:00
Tim Ledbetter 4c617d370e PixelPaint: Highlight active layer when using the move tool
This commit adds a two color border around the currently selected
layer when using the move tool.
2023-02-02 14:40:17 +01:00
Tim Ledbetter 7b3bc883f1 PixelPaint: Set initial position correctly when using the move tool
This fixes an issue, where single clicking in the corner of the image
without moving the mouse would cause the layer to jump to the top left
corner of the canvas.
2023-02-02 14:40:17 +01:00
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