Commit graph

15598 commits

Author SHA1 Message Date
Andreas Kling
7d5a369ac9 LibGfx: Fail PGM decode if there isn't enough color data in image
If we have less pixel color data than we need to fill the image, just
fail the decode.

Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29127
2021-01-05 15:14:29 +01:00
Andreas Kling
5e95d62ffe LibTTF: Guard against unsigned overflow in TTF table parsing
Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29170
2021-01-05 14:50:17 +01:00
TheMorc
688d249b2d Base: add 32x32 icon for Theme Editor, Hello World and Solitaire 2021-01-05 14:02:58 +01:00
Andreas Kling
51b880b038 LibJS: Disable ASAN during the conservative GC stack scan
This allows the JS fuzzer to survive garbage collection (so we can find
more interesting bugs!)

Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29266
2021-01-05 12:27:45 +01:00
Andreas Kling
fdd974b7ef LibJS: Fix UB downcast during GlobalObject construction
When constructing a GlobalObject, it has to pass itself as the global
object to its own Shape. Since this is done in the Object constructor,
and Object is a base class of GlobalObject, it's not yet valid to cast
"this" to a GlobalObject*.

Fix this by having Shape store the global object as an Object& and move
Shape::global_object() to GlobalObject.h where we can at least perform a
valid static_cast in the getter.

Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29267
2021-01-05 12:02:59 +01:00
Tom
279d2eee04 ResourceGraph: Show more accurate picture of memory consumption
Since we now commit memory that isn't actually yet allocated, it is
no longer available to other applications. So it is effectively
allocated.
2021-01-05 10:59:00 +01:00
Tom
d3e6cdf21f Kernel: Provide consistent memory stats in ProcFS
We should take the MM lock when gathering all the statistics that
we need so that the values are consistent.
2021-01-05 10:59:00 +01:00
Tom
de6a4d49b8 SystemMonitor: Beef up CPU and memory graphs
We now show the total CPU usage as well as the kernel portion.
For the memory graphs we show the amount of committed memory,
actually allocated memory, and the portion of the kernel heap.
2021-01-05 10:59:00 +01:00
Rok Povsic
b4a783d923 TextEditor+EditingEngine: Add support for the basics of Vim emulation 2021-01-05 00:00:36 +01:00
Rok Povsic
1c17ecdeb7 TextEditor: Change 'Find regex' shortcut to Ctrl+Shift+R
So there's not conflict with Vim Emulator's Ctrl+R redo.
2021-01-05 00:00:36 +01:00
Andreas Kling
32c319ba81 HackStudio: Make the title bar say "Hack Studio" too.. 2021-01-04 23:59:22 +01:00
Andreas Kling
737504464a HackStudio: The app menu should say "Hack Studio" 2021-01-04 23:55:48 +01:00
Andreas Kling
47d98a5b9f Base: Tweak app names to be in "Proper Noun" style 2021-01-04 23:55:28 +01:00
Andreas Kling
fedf561f57 Everywhere: Use GUI::CommonActions::make_about_action() 2021-01-04 23:51:49 +01:00
Andreas Kling
f0a59ab7fb Browser: Make the about menu item look a little nicer 2021-01-04 23:34:32 +01:00
Andreas Kling
da536c8d22 LibGUI: Add CommonActions::make_about_action()
This creates an "About" menu action given the app name and icon.
It takes care of showing the about dialog for you.
2021-01-04 23:31:42 +01:00
Andreas Kling
6bfcb9c2b0 SystemMenu: Tweak text "About..." => "About SerenityOS" 2021-01-04 23:23:55 +01:00
Andreas Kling
bb431b58c1 FileManager: Refer to self as "File Manager" (not "FileManager") 2021-01-04 23:23:32 +01:00
Andreas Kling
9faa8e0ce6 DisplaySettings: Refer to app as "Display Settings"
Application names are proper nouns, so let's write them with capitalized
first letters.
2021-01-04 23:22:38 +01:00
Andreas Kling
f2f4695bdd HackStudio: Correct use of ellipsis (...) in menu items 2021-01-04 23:07:04 +01:00
Andreas Kling
83bbbff753 FileManager: Correct use of ellipsis (...) in menu items 2021-01-04 23:06:02 +01:00
Andreas Kling
37f925ffc0 MenuApplets: Give executable icons to some menu applets
This makes SystemMonitor a bit more pleasant to look at. :^)
2021-01-04 23:01:26 +01:00
Andreas Kling
22325dd63e LibWeb: Don't careleslly insert inline-level boxes into inline-blocks
Just because an inline-block is inline doesn't mean it's ready to
accept random inline children. If it's a block, we may need to create
an anonymous wrapper first.

Fixes #4604.
2021-01-04 22:32:34 +01:00
Andreas Kling
d991658794 Kernel+LibC: Tidy up assertion failures with a dedicated syscall
This patch adds sys$abort() which immediately crashes the process with
SIGABRT. This makes assertion backtraces a lot nicer by removing all
the gunk that otherwise happens between __assertion_failed() and
actually crashing from the SIGABRT.
2021-01-04 21:57:30 +01:00
Itamar
8d04bb4d7b Toolchain: Disable exceptions by default
We now configure gcc to always use the -fno-exceptions flag.

This does not affect our code since we do not use exceptions, and also
fixes the gcc port.
2021-01-04 21:57:03 +01:00
Linus Groh
7b9322dbc5 crash: Remove -x and -y which do not crash (write to / read from freed memory)
These do not crash the process anymore.
Fixes #4685.
2021-01-04 21:22:15 +01:00
Andreas Kling
ce2894c95b LibWeb: Restart the cursor blink cycle whenever the user edits content
Having the text cursor disappear during rapid continuous editing is
quite jarring, so let's make sure we always restart the blink cycle
whenever the user performs some kind of editing action in a frame.
2021-01-04 20:48:27 +01:00
Tom
901ef3f1c8 Kernel: Specify default memory order for some non-synchronizing Atomics 2021-01-04 19:13:52 +01:00
Tom
fb84f0ec9c AK: Add default memory order as template argument for Atomic<T>
This is useful for collecting statistics, e.g.
Atomic<unsigned, MemoryOrder::memory_order_relaxed> would allow
using operators such as ++ to use relaxed semantics throughout
without having to explicitly call fetch_add with the memory order.
2021-01-04 19:13:52 +01:00
Tom
a6c459dd29 AK: Decorate RefCountedBase::try_ref with nodiscard
Because try_ref only increments the ref count if it returned true,
it is important that any caller properly acts upon the return value.
2021-01-04 19:13:52 +01:00
AnotherTest
4adfdb98aa Shell: Remove debug log about child process going away
This is still an issue, but its existence isn't helping anyone, so just
remove it.
2021-01-04 19:13:18 +01:00
AnotherTest
1c4a425bff LibLine: Don't overwrite stuff when moving origin around
This fixes an issue (mainly) with multiline prompts, where a multiline
prompt would overwrite the lines before it when libline tries to display
it.
To reproduce, set `PROMPT="a\nb\nc> "` in the shell, then press return
a few times.
2021-01-04 19:13:18 +01:00
Brendan Coles
1f03b6ad57 Playground: Add help documentation 2021-01-04 18:50:26 +01:00
Andreas Kling
1e4b9a9cd9 LibGUI: Don't include invisible widgets in BoxLayout preferred size 2021-01-04 18:48:41 +01:00
Andreas Kling
4f4e6bc61b Spreadsheet: Tweak documentation window layout slightly 2021-01-04 18:47:29 +01:00
Andreas Kling
7124e63711 Spreadsheet: Tidy up cell formatting dialog a bit
Use some of the recent features in LibGUI to simplify and tidy up the
cell formatting interface. The widget layout API's are still not good
enough to make this easy, but at least it's getting better.
2021-01-04 18:42:50 +01:00
Andreas Kling
fa88a26554 Spreadsheet: Simplify conditional formatting property tab GML 2021-01-04 18:33:03 +01:00
Andreas Kling
5db34848fe Terminal: Use shrink-to-fit in the settings window 2021-01-04 18:26:52 +01:00
Andreas Kling
ded4d576df DisplaySettings: Use shrink-to-fit to simplify GML 2021-01-04 18:23:34 +01:00
Andreas Kling
21bacec13f LibGUI: Simplify ToolBarContainer by using shrink-to-fit
This class was implementing shrink-to-fit manually. No need for that
anymore now that we can use Widget's shrink-to-fit mode.
2021-01-04 18:21:05 +01:00
Andreas Kling
b03e1b08b5 LibGUI: Add Widget shrink-to-fit layout flag
If this flag is enabled for a widget, it will be automatically sized
based on its children. This only works for widgets using a layout.

This allows you to put widgets inside each other without having to
manually calculate how large the container should be. It's not the
perfect API but it's a decent progression in ergonomics. :^)
2021-01-04 18:17:14 +01:00
Andreas Kling
ce7b09a3c5 DisplaySettings: Set "open wallpaper" button style in GML 2021-01-04 15:28:51 +01:00
Andreas Kling
6041e48eaa LibCore: Make Core::Object::property() const 2021-01-04 13:41:13 +01:00
Emanuele Torre
370ce42430 Toolchain+LibTTF: Remove some blank line at the end of CMake files. 2021-01-03 23:58:54 +01:00
Emanuele Torre
6abba493b2 Meta: Rewrite the check-newlines-at-eof script in python
The bash version takes around 15 seconds to run; that is way too slow.
This python3 version should take less than one second to run. :^)

Also, the script will now also check .py files and .txt CMake files.
2021-01-03 23:58:54 +01:00
Glenford Williams
7dc52e04fe
Calculator: Port interface to GML (#4742) 2021-01-03 22:27:24 +01:00
Linus Groh
bf45a28a89 CrashReporter: Show termination signal
...in both text (using strsignal) and numeric form.
Closes #4775.
2021-01-03 22:12:42 +01:00
Linus Groh
0571a17f57 Kernel+LibELF: Store termination signal in coredump ProcessInfo 2021-01-03 22:12:42 +01:00
Tom
b5437216e2 SystemMonitor: Re-use the /proc/all file descriptor when updating
This makes it more likely to be able to get statistics when resources
are scarce.
2021-01-03 22:12:19 +01:00
Tom
1d33765e1c ResourceGraph: Re-use the ProcFS file descriptors when updating stats
This makes it more likely to be able to get statistics when resources
are scarce.
2021-01-03 22:12:19 +01:00