Commit Graph

29517 Commits

Author SHA1 Message Date
Sam Atkins
4f42e4ba90 LibGfx: Add 'IsDark' flag to SystemTheme and Palette
This explicitly states whether a given theme is a dark theme, so that
applications not using the system palette colors can still attempt to
match the overall theme.
2021-10-31 18:39:13 +01:00
Idan Horowitz
2eaed880b1 LibJS: Remove old Native Functions
Now that all the usages were updated to the new ThrowCompletionOr based
version we can remove the legacy version.
2021-10-31 18:20:37 +02:00
Idan Horowitz
9d1fb85f93 WebContent: Convert ConsoleGlobalObject functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
10b93506ad Tests: Convert test-wasm functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
ae510db72c FuzzilliJS: Convert native functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
bcf168f771 LibJS: Use ThrowCompletionOr accessors in CreateMappedArgumentsObject 2021-10-31 18:20:37 +02:00
Idan Horowitz
aa61110bdd LibWeb: Convert WebAssemblyTablePrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
f19512bf55 LibWeb: Convert WebAssemblyMemoryPrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
c7c914800c LibWeb: Convert WebAssemblyInstancePrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
a8d39bc070 LibWeb: Convert WebAssemblyObject functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
3e8c76d5ab LibWeb: Convert WebAssemblyObject AOs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz
a76cd669b1 LibWeb: Make GlobalObject the first parameter of WebAssembly AOs
Let's be consistent with the rest of LibJS (and the rest of the file).
2021-10-31 18:20:37 +02:00
Daniel Bertalan
b883652a83 Profiler: Cache parsed DWARF debug information in disassembly view
This changes browsing through disassembled functions in Profiler from a
painfully sluggish experience into quite a swift one. It's especially
true for profiling the kernel, as it has more than 10 megabytes of DWARF
data to churn through.
2021-10-31 16:54:02 +01:00
Daniel Bertalan
8e1f882ac9 Profiler: Load the actual kernel binary for disassembly
/boot/Kernel.debug only contains the symbol table and DWARF debug
information, and has its `.text` and other PT_LOAD segments stripped
out. When we try to parse its data as instructions, we get a crash from
within LibX86.

We now load the actual /boot/Kernel binary when we want to disassemble
kernel functions.
2021-10-31 16:54:02 +01:00
Daniel Bertalan
80b660132c Profiler: Share the mapped kernel between Profile and DisassemblyModel
There is no point in keeping around a separate MappedFile object for
/boot/Kernel.debug for each DisassemblyModel we create and re-parsing
the kernel image multiple times. This will significantly speed up
browsing through profile entries from the kernel in disassembly view.
2021-10-31 16:54:02 +01:00
Timothy Flynn
c19c306744 LibWeb: Convert all generated bindings to ThrowCompletionOr
This also required converting URLSearchParams::for_each and the callback
function it invokes to ThrowCompletionOr. With this, the ReturnType enum
used by WrapperGenerator is removed as all callers would be using
ReturnType::Completion.
2021-10-31 15:48:36 +01:00
Timothy Flynn
19ac19eae1 LibWeb: Convert the Navigator object to ThrowCompletionOr 2021-10-31 15:48:36 +01:00
Timothy Flynn
0f93c9d6c8 LibWeb: Convert the CSS namespace object to ThrowCompletionOr 2021-10-31 15:48:36 +01:00
Timothy Flynn
85dc3a8099 LibWeb: Convert the Window object to ThrowCompletionOr 2021-10-31 15:48:36 +01:00
Timothy Flynn
585e420707 LibWeb: Convert the Location object to ThrowCompletionOr 2021-10-31 15:48:36 +01:00
Timothy Flynn
1939c72ecc Spreadsheet: Convert JSIntegration to ThrowCompletionOr 2021-10-31 15:48:36 +01:00
Marco Cutecchia
7653be6062 WindowServer: Remove some commented code in WindowManager.cpp 2021-10-31 12:37:49 +01:00
Marco Cutecchia
81b260bd1c PixelPaint: Use a bucket cursor for the Bucket tool 2021-10-31 12:37:49 +01:00
Marco Cutecchia
0f24678eaf PixelPaint: Support using a bitmap as a tool's cursor 2021-10-31 12:37:49 +01:00
Marco Cutecchia
116bb4888f LibGUI: Support using a bitmap as override cursor 2021-10-31 12:37:49 +01:00
Tetsui Ohkubo
4bfe060336 FileOperation: Deduplicate file names on move
For file copying, when there is a file with the same name in the
destination directory, the file will be automatically renamed to
"file-2.txt", for example. This change expands that special-case
handling to file moving.
2021-10-31 12:36:35 +01:00
Marcin Undak
588ba72fe7 Kernel: Draw picture on screen when booting Raspberry Pi 2021-10-31 12:35:53 +01:00
Marcin Undak
e7141c4230 Kernel: Add very simple PPM parser for Aarch64
This is much simpler and more embeddable version than libGFX one.
Solely purpose is to draw initial boot logo on screen before kernel
is even booted.
2021-10-31 12:35:53 +01:00
Marcin Undak
dbb61620be Kernel: Add Framebuffer class for Raspberry Pi
It initializes framebuffer and exposes access to its properties.
2021-10-31 12:35:53 +01:00
Marcin Undak
3cc5752a69 Kernel: Refactor Aarch64 MailBox class
The goal was to reduce common setup of messages. Changes:
* MailBox turned into singleton to follow existing patterns
* Removed device specific messages from MailBox requiring
  clients to know the details instead
* Created base Message class which clients should deriver from

It really simplify the usage for more complicated message queues
like framebuffer setup - see followup commits.
2021-10-31 12:35:53 +01:00
Marcin Undak
82a73b8499 Kernel: Add temporary debug printing utilities for Aarch64
Added dbgln() and warnln() debug functions to help bootstraping.
Eventually they are going to be replaced by AK/Format.h implementation.
2021-10-31 12:35:53 +01:00
Kyle Ambroff-Kao
0329a37271 Userland: Handle terminal window resizing in less(1)
Before this patch less would query the terminal geometry only at
startup and use this information to render the file when
appropriate. If the terminal is resized then the output is broken in
several different ways because of this.

This patch adds a SIGWINCH signal handler receive notification any
time the terminal is resized. This signal handler just sets a flag to
notify the main loop that a resize has occurred.

The main loop of the program just calls get_key_sequence() to get
input from the user, interpreting keystrokes as commands like scroll
up or down. The get_key_sequence() function has been changed to return
Optional<String>, so it either returns a keystroke from the user or it
returns nothing as an empty Optional.

While the user is not pressing any keys on the keyboard, the program
is blocking on a read() system call in get_key_sequence(). When
SIGWINCH is received, this read() will return with -1 and errno is set
to EINTR since the system call was interrupted by the signal. When
this happens we just return an empty Optional.

The mainloop now checks to see if a resize has been requested by
checking the flag, and if it has it performs a resize.

init() now just calls resize() since the required logic is the same.

Setters for m_filename and m_prompt are removed because these are now
just initialized by the constructor, as they never change for the life
of the program.
2021-10-31 12:34:37 +01:00
Daniel Bertalan
fed9cb5d2d AK+Tests: Fix formatting of infinity and NaN values
When I added this code in 1472f6d, I forgot to add tests for it. That's
why I didn't realize that the values were appended to the wrong
FormatBuilder object, so an empty string was returned instead of the
expected "nan"/"inf". This made debugging some FPU issues with the
ScummVM port significantly more difficult.
2021-10-31 12:15:34 +01:00
ForLoveOfCats
2c93ee50cd SpaceAnalyzer: Display scan progress with popup window during analysis 2021-10-31 12:15:12 +01:00
Musab Kılıç
8f9948ad66 Calculator: Add Constants menu 2021-10-31 12:10:44 +01:00
Musab Kılıç
2ef8cbe6cf Calculator: Fix copy button not copying the fractional part bug :^) 2021-10-31 12:10:33 +01:00
Musab Kılıç
8936d15efa Calculator: Improve KeypadValue conversion to handle integer values 2021-10-31 12:09:37 +01:00
Tim Schumacher
8f060bed17 Toolchain: Use dynamic paths for cross-compile CMake toolchains
`CMAKE_INSTALL_PREFIX` is supposed to be the in-system installation
path. The sysroot path on the host doesn't belong there, since other
applications will duplicate that path when applying their respective
sysroot.
2021-10-31 12:09:25 +01:00
Ben Wiederhake
9a4e125468 Kernel: Remove misleading FIXME in DevTmpFS
This FIXME does not seem to apply anymore. Yes, symbolic links in all
filesystems appear to be slightly broken, but that has nothing to do
with File::absolute_path. Let's remove the wrong FIXME instead of adding
to the confusion.
2021-10-31 12:06:28 +01:00
Ben Wiederhake
c05c5a7ff4 Kernel: Clarify ambiguous {File,Description}::absolute_path
Found due to smelly code in InodeFile::absolute_path.

In particular, this replaces the following misleading methods:

File::absolute_path
This method *never* returns an actual path, and if called on an
InodeFile (which is impossible), it would VERIFY_NOT_REACHED().

OpenFileDescription::try_serialize_absolute_path
OpenFileDescription::absolute_path
These methods do not guarantee to return an actual path (just like the
other method), and just like Custody::absolute_path they do not
guarantee accuracy. In particular, just renaming the method made a
TOCTOU bug obvious.

The new method signatures use KResultOr, just like
try_serialize_absolute_path() already did.
2021-10-31 12:06:28 +01:00
Ben Wiederhake
88ca12f037 Kernel: Enable early-returns from VFS::for_each_mount 2021-10-31 12:06:28 +01:00
Ben Wiederhake
735da58d44 Kernel: Avoid OpenFileDescription::absolute_path 2021-10-31 12:06:28 +01:00
Ali Mohammad Pur
d020d46846 Shell: Unwind execution after runtime errors
This commit makes the Shell check for errors after a node is run(), and
prevents further execution by unwinding until the error is cleared.
Fixes #10649.
2021-10-31 12:02:20 +01:00
Jelle Raaijmakers
8f332ac6a3 LibC: Add labs()
We defined it in `stdlib.h` but forgot to implement it.
2021-10-31 12:00:57 +01:00
Brendan Coles
3ce4d0f89a Ports: Add FreeDink port 2021-10-31 11:52:27 +01:00
Brendan Coles
287bbabbc1 Ports: Add OpenGL Mathematics (GLM) port 2021-10-31 11:52:27 +01:00
Marco Cutecchia
0086466b61 Utilities: Add option to suppress errors to grep 2021-10-31 14:18:29 +03:30
Marco Cutecchia
647f89f15e Utilities: Add 'quiet' mode to grep 2021-10-31 14:18:29 +03:30
Timothy Flynn
0f91b22795 js: Convert JavaScript REPL to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
e8f722fb27 LibJS: Convert %IteratorPrototype% to ThrowCompletionOr 2021-10-31 07:50:30 +02:00