Commit graph

45002 commits

Author SHA1 Message Date
BodilessSleeper
84db0c8dbf LibJS: Remove call to ToPositiveInteger after CalendarDaysInMonth
Implements: tc39/proposal-temporal@261692a

In order to remove the call to to_positive_integer() there neeeded
to be a change of return type from ThrowCompletionOr<Value> to
ThrowCompletionOr<double>.
This is one of the changes that will come anyways with the following
commit: tc39/proposal-temporal@11aad40. :^)
2022-12-31 00:05:20 +01:00
Andrew Kaster
86995be111 LibAudio: Tolerate a file sample rate lower than the AudioServer's
Previously, trying to load a wav file in aplay or SoundPlayer with a
sample rate less than 44100 would crash in an assertion failure trying
to unchecked_append to a vector that was not resized properly.
2022-12-31 00:04:34 +01:00
Andrew Kaster
140000f37a LibAudio: Only join the background enqueuer thread if has been started
This prevent an assertion failure in SoundPlayer when closing it before
trying to play any audio files.
2022-12-31 00:04:34 +01:00
Andrew Kaster
18c559b0e3 SoundPlayer: Pledge proc so that we can actually open audio files 2022-12-31 00:04:34 +01:00
HawDevelopment
a5dfd5eeb6 Utilities: Fix top utility not calling exit() on SIGINT
Before, when running top, pressing Control+C (triggering SIGINT),
would not call the atexit handler. Therefor not restoring stdin.
2022-12-31 00:04:19 +01:00
Jan200101
058a39c6fc Ports: Use absolute path of script
The relative paths are not valid inside a port build directory.
This makes target_env source .hosted_defs.sh correctly.
2022-12-31 00:02:41 +01:00
Luke Wilde
b85f4ab66a Ladybird: Tell Qt that we manually handle the Cookie header
In some cases, Qt would silently drop the Cookie header and start
causing Cookie authenticated requests to start failing.
2022-12-30 23:52:09 +01:00
Liav A
e598f22768 Kernel: Disallow executing SUID binaries if process is jailed
Check if the process we are currently running is in a jail, and if that
is the case, fail early with the EPERM error code.

Also, as Brian noted, we should also disallow attaching to a jail in
case of already running within a setid executable, as this leaves the
user with false thinking of being secure (because you can't exec new
setid binaries), but the current program is still marked setid, which
means that at the very least we gained permissions while we didn't
expect it, so let's block it.
2022-12-30 15:49:37 -05:00
Xexxa
0e010790a4 Base: Add more emoji
🧑‍🍳 - U+1F9D1 U+200D U+1F373 COOK
🥷 - U+1F977 NINJA
💒 - U+1F492 WEDDING
 - U+27BF DOUBLE CURLY LOOP
2022-12-30 15:32:21 -05:00
kleines Filmröllchen
5ab9a9cb03 Toolchain: Fix aarch64 toolchain GDB build
We just need to pass -disable-werror, otherwise Clang will complain a
lot.
2022-12-30 15:31:04 -05:00
Nico Weber
e771320179 pro: Fix comment typo 2022-12-30 15:25:03 -05:00
Nico Weber
ca4ebf5d1b icc: Print rendering intent 2022-12-30 17:21:57 +01:00
Nico Weber
743e9fc786 LibGfx: Read rendering intent from ICCProfile header 2022-12-30 17:21:57 +01:00
Nico Weber
ac039d93f0 Ladybird: Fix typos 2022-12-30 17:21:57 +01:00
Karol Kosek
70885a3dee LibGUI: Automatically scroll to a new column on adding it in ColumnsView 2022-12-30 17:16:29 +01:00
Karol Kosek
35e3df7f13 LibGUI: Teach ColumnsView where indexes are placed (and scroll to them)
This makes the view to scroll when pressing arrow keys! :^)
2022-12-30 17:16:29 +01:00
Karol Kosek
7e52daa542 LibGUI: Don't destroy columns after selecting already opened one 2022-12-30 17:16:29 +01:00
Karol Kosek
e673fc4183 LibGUI: Determine model index from a content position in ColumnsView
We didn't take the scroll value into account when we were converting
a position to an index, which basically prevented us from selecting a
desired file if a list wasn't small enough to fit entirely in the widget
box.
2022-12-30 17:16:29 +01:00
Karol Kosek
e40726cb34 LibGUI: Don't show last separator in column 2022-12-30 17:16:29 +01:00
Karol Kosek
3b18858bb1 LibGUI: Replace a magic number with ColumnsView::column_separator_width 2022-12-30 17:16:29 +01:00
kleines Filmröllchen
7919fb8cae LibC: Mark fenv-family function arguments as used on aarch64
This makes LibC build under aarch64 Clang.
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
5d00e21852 Kernel/aarch64: Implement wait_cycles as a pause loop
The hand-written assembly does not compile under Clang due to register
size mismatches. Using a loop is slower (~6 instructions on O2 as
opposed to 2 with hand-written assembly), but using the pause
instruction makes this more efficient even under TCG.
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
984348ed0d Kernel/aarch64: Implement Processor::pause and Processor::wait_check
For pause we use isb sy which will put the processor to sleep while the
pipeline is being flushed. This instruction is also used by Rust in spin
loops and found to be more efficient, as well as being a rough
equivalent to the x86 pause instruction which we also use here.

For wait_check we use yield, which is a hinted nop that is faster to
execute, and I leave a FIXME for processing SMP messages once we support
SMP.

These two changes probably make spin loops work on aarch64 :^)
2022-12-30 08:32:46 -07:00
kleines Filmröllchen
4d475588bb Kernel/aarch64: Declare TrapFrame as struct
Clang doesn't like misdeclaring classes and structs.
2022-12-30 08:32:46 -07:00
Nico Weber
b7a627ab06 icc: Print data color space 2022-12-30 10:14:22 -05:00
Nico Weber
eaf1f67bb1 LibGfx: Read data color space from ICCProfile header 2022-12-30 10:14:22 -05:00
Nico Weber
7bb4cd74b8 LibWeb: Fix a (charming) comment typo 2022-12-30 10:14:22 -05:00
Ravi J
3a31f37b3d MouseSettings: Update "switch buttons" icon to reflect checkbox state
Using an additional "right button" variant of the graphic, it now
updates the icon based on the user's preference of primary button.
2022-12-30 09:20:42 -05:00
djwisdom
2ba66a9941 Documentation: Update FontEditor document to be in-sync with latest 2022-12-30 09:12:36 -05:00
Aliaksandr Kalenik
8259ff12bd LibWeb: Margin bottom collapsing between parent and last child 2022-12-30 14:21:19 +01:00
Aliaksandr Kalenik
7088a87f49 LibWeb: Margin top collapsing between parent and first child
Implement collapsing of a box margin-top and first in-flow
child margin-top by saving function that updates y position
of containing block inside BlockMarginState and then for
every child until "non-collapsed through" child is reached
y position of containing block is updated by calling
update_box_waiting_fox_final_y_position_callback.
2022-12-30 14:21:19 +01:00
Aliaksandr Kalenik
fe8304d5de LibWeb: Introduce structure that maintains collapsible margins in BFC
Previously y position of boxes in block formatting context
was calculated by looking at y position of previous in-flow
sibling and adding collapsed margin of "collapse through"
boxes lying between box currently being laid out and it's
previous in-flow sibling.

Here introduced BlockMarginState structure that maintains
array of currently collapsible margins hence we no longer
need to look at previous sibling to calculate y position
of a box.
2022-12-30 14:21:19 +01:00
Timothy Flynn
e3d5b67eaf SQLStudio: Remove (unimplemented) ability to open database storage files
It may be handy to have some sort of storage inspector at some point but
for now, it doesn't make sense to open a database file. So only allow
opening script files, and don't make assumptions on their extension.
2022-12-30 14:17:18 +01:00
Timothy Flynn
690389ae81 SQLStudio: Display error message boxes when connections/executions fail
In a GUI application, this is vastly more useful than logging to the
terminal or ignoring the error completely.
2022-12-30 14:17:18 +01:00
Timothy Flynn
5822520e6d SQLStudio: Add an option to select or specify the database to connect to
This adds a combo box to the action toolbar to allow for entering a
database name manually or selecting from the list of existing databases.
The action to run a script is now disabled while we are not connected to
a database.
2022-12-30 14:17:18 +01:00
Timothy Flynn
640e22bbdb SQLStudio: Only display the character/word count of selected text
It's not particularly useful to see the word count of a SQL script,
except for when displaying the number of selected words. This changes
SQLStudio to behave exactly like HackStudio in this regard. We will use
segment 0 to display the selected text stats (if any) and segment 2 for
the cursor position. Segment 1 will be used in an upcoming commit for
the current SQL connection status. We also now handle displaying action
text the same way as HackStudio.
2022-12-30 14:17:18 +01:00
Timothy Flynn
a4d2b366b6 SQLStudio: Close the current SQL connection before opening a new one 2022-12-30 14:17:18 +01:00
Timothy Flynn
74cd0a0c82 SQLStudio: Simplify action handling a bit
Most actions do not need to care about whether there is an open editor
tab, as we can (and should) disable those actions when there isn't an
open tab. We can also hide the verify_cast handling inside a helper
function.
2022-12-30 14:17:18 +01:00
Timothy Flynn
b8e4ca3b0f SQLStudio: Protect against possible crash when saving an empty file
The underlying Core::Stream methods require the bytes passed in to be
non-empty. Simply opening the file is enough to ensure the file is
created with empty contents if the editor's text is empty.
2022-12-30 14:17:18 +01:00
Timothy Flynn
9b1e754d56 SQLStudio: Convert SQLStudio to GML 2022-12-30 14:17:18 +01:00
Timothy Flynn
82363aa1c4 sql+SQLStudio: Recover from errors preparing SQL statements
In both applications, display the SQL statement that failed to parse.
For the REPL, ensure the REPL prompts the user for another statement.
For SQLStudio, we don't continue executing the script as it likely does
not make sense to run statements that come after a failed statement.
2022-12-30 14:17:18 +01:00
Timothy Flynn
c08956028a SQLServer: Mark a deferred invocation lambda as mutable
Otherwise the `move(result)` statement inside the lambda does not
actually move anything, because `result` is constant without the mutable
attribute. Caught by clangd.
2022-12-30 14:17:18 +01:00
Timothy Flynn
21255cb2b8 SQLServer: Explicitly return empty optionals over IPC upon errors
These are currently hitting the `decltype(nullptr)` constructor, which
marks the response as invalid, resulting in no response being sent to
the waiting client.
2022-12-30 14:17:18 +01:00
Timon Kruiper
51b69be970 Kernel/aarch64: Move ifdef in StorageManagement.cpp
The recent changes of removing i386 broke the aarch64 build, and moving
the ifdef fixes the aarch64 build.
2022-12-29 19:32:20 -07:00
Timon Kruiper
e9b4e07b0a Kernel/aarch64: Start and initialize Scheduler and run multiple threads
This commit changes the init.cpp file to start and initialize the
Scheduler, and actually runs init_stage2. To show that it actually
works, another thread is spawned and executed simultaneously, by context
switching between the two!
2022-12-29 19:32:20 -07:00
Timon Kruiper
a5e98d3644 Kernel/aarch64: Add implementation of Processor::switch_context
This initial implementation makes it possible to actually context switch
between different kernel threads! :^)
2022-12-29 19:32:20 -07:00
Timon Kruiper
0b95d8cd24 Kernel/aarch64: Implement thread_context_first_enter
This requires two new functions, context_first_init and
restore_context_and_eret. With this code in place, we are now running
the first idle thread! :^)
2022-12-29 19:32:20 -07:00
Timon Kruiper
262309d9bf Kernel/aarch64: Implement Processor::initialize_context_switching
This changes the stack pointer to the initial_thread stack pointer, and
pushes two pointers onto the stack that point to the initial_thread. The
function then jumps to the ip of the initial_thread, which will be
thread_context_first_enter, and hangs there because that function is not
yet implemented.
2022-12-29 19:32:20 -07:00
Timon Kruiper
892f81b01a Kernel/aarch64: Add initial implementation of Processor::init_context
This does not handle everything correctly yet, such as setting the
correct state for running userspace applications, however this should be
enough to get kernel scheduling to work.
2022-12-29 19:32:20 -07:00
Timon Kruiper
9554e5ca48 Kernel/aarch64: Add Saved Program Status Register EL1 (SPSR_EL1) 2022-12-29 19:32:20 -07:00