Commit graph

29543 commits

Author SHA1 Message Date
Tim Schumacher 02446a5431 Ports: Enable SDL support in Angband 2021-11-01 11:34:25 +01:00
Ben Wiederhake 4e1318fb0e less: Fix condition to read more data
While mathematically equivalent, the presence of a size_t forces the
comparison to work with size_t's. This means that '-1 < 0' is false,
contrary to the 'mathematically pure' interpretation of the inequality.
2021-11-01 10:55:10 +01:00
Ben Wiederhake 5096f9cff5 hexdump: Avoid using read_all
I like using hexdump to 'have a look' at binary files, for example
/dev/random or /dev/hda. Obviously, this usecase requires that hexdump
tries not to buffer the 'entire' device.
2021-11-01 10:55:10 +01:00
Ben Wiederhake a5dda0b0c5 hexdump: Make non-ASCII output easier to read
Enclose the ASCII-interpretation in pipes, show non-ASCII bytes as a
dot, and fix the length of the last line.

Note that this makes it more similar to the behavior of many other
implementations.
2021-11-01 10:55:10 +01:00
Rodrigo Tobar 866c9cc1a5 echo: Obey -n when text is empty 2021-11-01 10:47:13 +01:00
Tim Schumacher 8e6de62d57 Ports: Fix typo in ffmpeg dependencies
This makes ffmpeg build again!
2021-11-01 10:45:15 +01:00
Brendan Coles aea2583cde Ports: gnucobol: Build with ncurses and without NLS 2021-11-01 10:44:57 +01:00
Arne Elster be9a7057ff HexEditor: Give magic constants names
There are a lot of numbers just floating around in the code.
Give them proper names.
2021-11-01 01:48:51 +01:00
Arne Elster 4aab6ff839 HexEditor: Use size_t where applicable
File positions as well as selection positions should be size_t,
as they are never negative and can become quite big.
2021-11-01 01:48:51 +01:00
Arne Elster 6b5456f132 HexEditor: Remove magic color constant for modified bytes
The magic constant does not work together well with themes.
As there does not seem to be a suitable palette color for this,
simply invert the color.
2021-11-01 01:48:51 +01:00
Arne Elster 41edc21a8e HexEditor: Show blinking caret at current position
For better visibility of wether the editing focus is on the hex or the
ascii view, render a blinking caret instead of a solid cell background.
For that to work, it's also necessary to change the way selection works.
The selection shouldn't extend to the current position but up to the
byte before it.
2021-11-01 01:48:51 +01:00
SeekingBlues b9da877941 Kernel: Do not try opening the same file when dumping perfcore
Dumping perfcore would always fail with EEXIST. This regressed in #10707
because of an incorrect indentation in the for loop.
2021-10-31 21:10:17 +01:00
Kenneth Myhra f848d65fd9 Ports/vim: Add symlink 'vi' pointing to target 'vim'
This adds a symlink named 'vi' which points to the target 'vim'. It's
useful in scenarios where a third-party application might rely on 'vi'.
2021-10-31 21:09:49 +01:00
Andreas Kling 248ff8e971 strace: Teach mmap() pretty-printer about more MAP_FOO flags 2021-10-31 21:07:29 +01:00
Andreas Kling 472401a51e Revert "wc: Count last line even if it doesn't end in newline"
This reverts commit f356c4ab91.

According to Dr. POSIX, `wc -l` should print the number of *newlines*
in the input.
2021-10-31 21:07:29 +01:00
Andreas Kling aff2b42f82 UserspaceEmulator: Fix inconsistent log formatting
Remove some extra { and } around the PID in log output that weren't used
consistently in all logging.
2021-10-31 21:07:29 +01:00
Andreas Kling d3eb513152 Base: Use outln() in the HackStudio basic C++ program template 2021-10-31 21:07:29 +01:00
Timothy Flynn 95e492de59 LibWeb: Convert throw_dom_exception_if_needed() to ThrowCompletionOr
This changes Web::Bindings::throw_dom_exception_if_needed() to return a
JS::ThrowCompletionOr instead of an Optional. This allows callers to
wrap the invocation with a TRY() macro instead of making a follow-up
call to should_return_empty(). Further, this removes all invocations to
vm.exception() in the generated bindings.
2021-10-31 18:51:07 +01:00
Ben Wiederhake e3b7c305bc Kernel: Don't crash on writes to ProcFS 2021-10-31 18:44:12 +01:00
Ben Wiederhake f20a42e871 Kernel: Write test that crashes ProcFS 2021-10-31 18:44:12 +01:00
Ben Wiederhake 03526a7f2b AK: Make BumpAllocator work in multi-threaded environments
Fixes #10578.
2021-10-31 18:43:03 +01:00
Sam Atkins 2c901ae2be Browser: Add "Color scheme" setting
This allows the user to override whether to use a dark or light theme in
supporting websites.
2021-10-31 18:39:13 +01:00
Sam Atkins 84414da546 LibWeb: Implement prefers-color-scheme media query feature
This allows supporting websites to use a light or dark theme to match
our desktop theme, without being limited to palette colors. This can be
overridden with the `WebContentServer::set_preferred_color_scheme()` IPC
call.
2021-10-31 18:39:13 +01:00
Sam Atkins 53edaa3b26 LibWeb+WebContent: Add set_preferred_color_scheme IPC call
This allows the owner of a WebView to override whether to use a dark
theme or not, instead of just using the system theme's IsDark property.
2021-10-31 18:39:13 +01:00
Sam Atkins c8550da9c5 LibWeb: Add Web::CSS::PreferredColorScheme enum 2021-10-31 18:39:13 +01:00
Sam Atkins 079d9e2e0b Base: Add 'IsDark' flag to all system themes 2021-10-31 18:39:13 +01:00
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