Commit graph

50352 commits

Author SHA1 Message Date
Tim Schumacher d194011570 AK: Add count_required_bits 2023-05-17 09:08:53 +02:00
Tim Schumacher 8434d76027 Ports: Update Ruby to version 3.2.2
Three patches that are apparently no longer needed have been removed.
2023-05-17 08:54:55 +02:00
Tim Schumacher d78bed2ffe Kernel: Alias _SC_PAGE_SIZE to _SC_PAGESIZE
Both of those are specified by POSIX.
2023-05-17 08:54:55 +02:00
Tim Schumacher 7ab0de9190 Meta: Only enable the SPICE server when using the SPICE display
Newer versions of QEMU prevent the user from running a GL-rendered
display while a SPICE display is active due to incompatibilities.

Since there is no way to disable QEMUs (apparently implicit) SPICE
display, make sure that we only enable SPICE support if the user
requested running with SPICE specifically. In this case, QEMU picks the
default SPICE client instead of rendering a display using whatever our
default on that platform would be.
2023-05-17 08:53:57 +02:00
Aliaksandr Kalenik c61bb1706f LibWeb: Use auto minimimum size while resolving flexible tracks in GFC 2023-05-17 07:48:38 +02:00
Aliaksandr Kalenik 5f2264a2bd LibWeb: Skip non-spanning items sizing if there are no such items
Otherwise base_size and growth_limit for tracks that do not have any
spanning items will be overriden with wrong values.
2023-05-17 07:48:38 +02:00
Aliaksandr Kalenik 95d17ee875 LibWeb: Rename flexible_length to flex_factor in GridSize
Let's match the name used in the spec.
2023-05-17 07:48:38 +02:00
Aliaksandr Kalenik a3759b6e76 LibWeb: Implement more of "Expand Flexible Tracks" in GFC
Implements "Otherwise, if the free space is an indefinite length:" from
the spec.
2023-05-17 07:48:38 +02:00
Andreas Kling 2e13f65ff4 LibWeb: Support flex-basis: calc(...)
1. Propagate calc() values from StyleProperties to ComputedValues.
2. Actually resolve calc() values when determining the used flex basis.

This makes the "support" section on https://shopify.com/ show up
correctly as a 2x2 grid (instead of 1x4). :^)
2023-05-17 07:40:17 +02:00
Andreas Kling e81d4ca1ac LibWeb: Fix off-by-one in CSS calc() "negate" operation
When negating a number, we should subtract it from 0, not 1. :^)
2023-05-17 07:40:17 +02:00
thankyouverycool 587c44cfbb FontEditor: Filter files by BitmapFont in FilePicker 2023-05-17 06:47:57 +02:00
thankyouverycool a62f204b25 FontEditor: Show complete filename in error messages
And clean up Save and Open action code style.
2023-05-17 06:47:57 +02:00
thankyouverycool 19b8b9d187 FontEditor: Show recently opened files in File menu
And update GlyphEditorWidget on initialize(). Fixes Editor not showing
the new active glyph when loading recent fonts from a menu.
2023-05-17 06:47:57 +02:00
thankyouverycool c10b1e3aea FontEditor: Add action text to Undo and Redo 2023-05-17 06:47:57 +02:00
Jelle Raaijmakers e6935cbaaf lsirq: Restore enumeration of interrupt line
This was broken by changes to `JsonObject::get_deprecated_string`.
2023-05-17 06:42:21 +02:00
Pankaj Raghav 6c7ee5344c Kernel: Add MSI support to AHCI
Add MSI support to AHCI. Prefer MSI interrupts over pin-based
interrupts.
2023-05-16 23:22:12 +02:00
Pankaj Raghav 8f62e62cfe Kernel: Add MSI support in PCI Device
Extend reserve_irqs, allocate_irq, enable_interrupt and
disable_interrupt API to add MSI support in PCI device.

The current changes only implement single MSI message support.
TODOs have been added to support Multiple MSI Message (MME) support in
the future.
2023-05-16 23:22:12 +02:00
Pankaj Raghav 35a844ac75 Kernel: Implement {enable,disable}_msi interrupts in PCI Device
Implement enabling and disabling MSI interrupts for a PCI device.

Removes two more TODO()s from PCI::Device.cpp :^)
2023-05-16 23:22:12 +02:00
Pankaj Raghav 1bc2c5c110 Kernel: Use PCIDeviceIdentifier is_msi_capable() to retrieve MSI status
Instead of iterating through the capabilities, use the is_msi_capable()
API from the PCIDeviceIdentifier class that belongs to the device.
2023-05-16 23:22:12 +02:00
Pankaj Raghav 09b5cefd43 Kernel: Add MSIInfo struct to PCI DeviceIdentifier
Add a struct named MSIInfo that stores all the relevant MSI
information as a part of PCI DeviceIdentifier struct.
Populate the MSI struct during the PCI device init.
2023-05-16 23:22:12 +02:00
Timothy Flynn d1a1b1ab75 LibWebView: Remove the DumpLayoutTree program
This program's purpose is now achieved with headless-browser, which has
the added benefit of being runnable outside of Serenity.
2023-05-16 13:22:23 -07:00
MacDue 77008d4bac Ladybird: Fix context menus being in slightly the wrong position
Previously, we were doing mapToGlobal() via the Tab widget, but the
widget position was actually relative to the WebContentView. This
meant context menus appeared slightly vertically offset from where
you clicked.
2023-05-16 13:22:15 -07:00
Timothy Flynn b0edc7b6e4 Ladybird: Add screenshot actions to the page context menu
Browser on Serenity has these actions already.
2023-05-16 19:47:18 +02:00
Timothy Flynn 374284d0d8 Browser: Move screenshot context menu actions above inspector actions
Feels a bit more natural, at least to align with muscle memory from
other browsers.
2023-05-16 19:47:18 +02:00
Sam Atkins f3fe9b64bf GMLPlayground: Keep view_frame_action around to prevent a crash
The `view_frame_action` variable only exists for the duration of
`initialize_menubar()`, so calling it in `m_preview_window->on_close`
would crash. This fixes that by storing the action pointer inside
MainWidget. (And storing the `view_window_action` too because it felt
weird storing one and not the other.)
2023-05-16 18:37:32 +01:00
Andreas Kling e938860126 LibWeb: Make text justification work between floats
While inline content between floating elements was broken correctly,
text justification was still using the original amount of available
space (without accounting for floats) when justifying fragments.
2023-05-16 14:35:10 +02:00
Andreas Kling bab6796099 LibWeb: Rewrite calculation of available space between floats
This code now works in terms of *intrusion* by left and right side
floats into a given box whose insides we're trying to layout.

Previously, it worked in terms of space occupied by floats in the root
box of the BFC they participated in. That created a bunch of edge cases
since the code asking about the information wasn't operating in root
coordinate space, but in the coordinate space of some arbitrarily nested
block descendant of the root.

This finally allows horizontal margins in the containing block chain to
affect floats and nested content correctly, and it also allows us to
remove a bogus workaround in InlineFormattingContext.
2023-05-16 14:35:10 +02:00
Andreas Kling 9bd4add734 LibGfx: Make FontDatabase lookups case insensitive
This seems mostly harmless and matches what CSS expects from us at the
moment. Eventually our CSS font selection will become more sophisticated
and stop relying on Gfx::FontDatabase for things like this, but for now
it's a simple stopgap that lets websites do "font-family: arial" :^)
2023-05-16 14:35:10 +02:00
Andi Gallo 9a6a635e51 LibWeb: Fix for absolutely positioned elements with specified height
Use inner height since the paintable adds padding back.

Fixes #18842.
2023-05-16 14:34:53 +02:00
Karol Kosek 3e12d84f0f LibGUI: Actually set the first allowed file extension list in FilePicker
Previously, the File Picker didn't activate the pre-selected filter.
2023-05-16 12:57:34 +01:00
Karol Kosek e02cbd9daa GMLPlayground: Make 'Open' action start in the Application source folder
Font Editor and Theme Editor already open the dialog in system folders
(/res/fonts and /res/themes). To be fair, they do have a special folder
just for their files, but I think this is good enough if you want to
start hacking an app :^)

Additionaly, this also adds a filter to show only .gml files by default.
2023-05-16 12:57:34 +01:00
Karol Kosek 5035378b03 Meta: Copy GML source files to serenity install
We already install C++ source files to allow debugging applications
in HackStudio.

Installing GML files can make editing application widgets a bit faster
and easier, as you no longer need to copy files to the system. :^)
2023-05-16 12:57:34 +01:00
Karol Kosek 8dcfb6bfbd GMLPlayground: Reuse request_close() in 'Open' and recent files actions 2023-05-16 12:57:34 +01:00
Karol Kosek e7954f62b3 GMLPlayground: Use current file name in the 'Save as...' dialog
Previously it was always "Untitled".
2023-05-16 12:57:34 +01:00
Karol Kosek 23ac52bc80 GMLPlayground: Use try_make for syntax highlighting and autocomplete 2023-05-16 12:57:34 +01:00
Karol Kosek 477ee34215 GMLPlayground: Set parent window for preview window
Closing the main window didn't close the preview window along with it.
2023-05-16 12:57:34 +01:00
Karol Kosek 94f408097a GMLPlayground: Remove one DeprecatedString usage 2023-05-16 12:57:34 +01:00
Karol Kosek 5fd4d34880 GMLPlayground: Handle drop events 2023-05-16 12:57:34 +01:00
Karol Kosek 8c00e57f56 GMLPlayground: Extract most logic into a MainWidget class 2023-05-16 12:57:34 +01:00
Karol Kosek 3c13faff57 GMLPlayground: Set file path when reading file
We weren't setting the path on the 'Open' action, which meant that a
startup file name was always visible in the title bar (unless we save a
file to a different path, or pick a file from the 'recent files' list).

By setting it to update the stored file path in the load_file()
function, it'll be guaranteed the file name will always be set.

This also will add the startup opened file to the recently opened files
list.
2023-05-16 12:57:34 +01:00
Tim Ledbetter 259f4ffce1 Base: Add man page for ping 2023-05-16 12:56:11 +02:00
Tim Ledbetter 58e75be199 ping: Add -i option to specify the time to wait between packets 2023-05-16 12:56:11 +02:00
Tim Ledbetter 755bd4d3c2 ping: Add -q option to specify quiet mode
Quiet mode suppresses all output except the statistics shown before
the program exits.
2023-05-16 12:56:11 +02:00
Sam Atkins be71ccb690 ps: Add -u option, to list processes associated with specified users 2023-05-16 12:54:18 +02:00
Sam Atkins cf998bc082 ps: Perform filtering step before the output loop
Previously we did some of the filtering before the loop, and some inside
it, which made things awkward to reason about. This also lets us avoid
generating a TTY string for each process unless there's a column for it.
2023-05-16 12:54:18 +02:00
Sam Atkins 3aff3c610a ps: Add -p option, and distinguish it from -q 2023-05-16 12:54:18 +02:00
Sam Atkins 45c429853a ps: Allow -q option multiple times, and separated by spaces or commas
Several differences here:
- Passing `-q` multiple times will add them together, instead of the
  last one overwriting the previous ones.
- `-q` PIDs can be separated by commas as well as spaces.
- We check that the PIDs are integers while parsing the arguments,
  instead of later on.

The "parse a list of things as an option" is extracted into a helper
function, because we're going to want the same logic for `-g`, `-G`,
`-p`, `-t`, `-u`, and `-U`.
2023-05-16 12:54:18 +02:00
Sam Atkins a6e701a67b ps: Add the -a option, to list all processes associated with terminals 2023-05-16 12:54:18 +02:00
Sam Atkins afb55d9fd8 ps: Add the -A option
This is identical to our existing `-e` option, but both are required by
POSIX.
2023-05-16 12:54:18 +02:00
Sam Atkins 02ee93d6c9 ps: Use Optional for column indices, instead of -1 meaning "not present" 2023-05-16 12:54:18 +02:00