Commit graph

15815 commits

Author SHA1 Message Date
Andreas Kling
e187a5365a LibWeb: Store the used font in Layout::NodeWithStyle
This is a step towards not having to carry the full set of specified
values around with every layout node.
2021-01-06 14:58:48 +01:00
Andreas Kling
5721b2a3da LibWeb: Rename LayoutStyle => CSS::ComputedValues
This object represents the CSS "computed values" so let's call it that.
2021-01-06 14:58:48 +01:00
Sahan Fernando
edeec2974f Everywhere: Force linker hash style to be gnu 2021-01-06 09:42:08 +01:00
Sahan Fernando
b370ee3423 LibELF: Implement GNU Hashing algorithm for dyn relocations 2021-01-06 09:42:08 +01:00
Davide Carella
2444bf6d3b Keymaps: Created a new keymap for Italian keyboards.
It now supports curly braces thanks to the new Shift+AltGr map.
2021-01-06 09:32:08 +01:00
Davide Carella
e2213c5665 KeyboardMapper: Added a new radio button that shows the Shift+AltGr map. 2021-01-06 09:32:08 +01:00
Davide Carella
f146ff87f1 CharacterMap: Added a new Shift+AltGr map.
If this map isn't found in a keymap the Alt+Gr map gets used.
2021-01-06 09:32:08 +01:00
Davide Carella
ca9e0a70f5 Syscall: Changed 'setkeymap' to take also the Shift+AltGr map. 2021-01-06 09:32:08 +01:00
Brendan Coles
41c4ce3c58 Screensaver: Disable double buffering and hide cursor 2021-01-06 09:31:25 +01:00
Andreas Kling
92fe63fbec LibGfx: Tolerate PNGs with fewer palette entries than possible
We shouldn't reject indexed palette PNGs just because they have fewer
palette entries than the bit depth allows. Instead, we need to check
for OOB palette accesses and fail the decode *then*.
2021-01-06 01:34:25 +01:00
Andreas Kling
4a7d948f14 LibWeb: Simplify one kind of whitespace collapsing
For a non-empty TextNode chunk that begins with collapsible whitespace,
we can simply step right over the whitespace by adjusting the chunk.
2021-01-06 00:54:54 +01:00
Andreas Kling
8649f923ea LibWeb: Set override cursor on IPWV itself instead of whole window
When changing the mouse cursor (e.g when hovering over a link) we now
only change the InProcessWebView's override cursor instead of setting
the cursor at the window level.

This fixes an issue where the I-beam or hand cursors would somehow
"escape" from the web view and over to other widgets.
2021-01-05 22:22:44 +01:00
Andreas Kling
8a5c1d1d4e Browser: Add a very basic content filter list
Let's start out with something small, just to make sure the feature
gets tested.
2021-01-05 21:58:14 +01:00
Andreas Kling
a6d52e0c97 LibWeb: Add a basic content filter (ad blocking!) :^)
This patch adds a global (per-process) filter list to LibWeb that is
used to filter all outgoing resource load requests.

Basically we check the URL against a list of filter patterns and if
it's a match for any one of them, we immediately fail the load.

The filter list is a simple text file:

    ~/.config/BrowserContentFilters.txt

It's one filter per line and they are simple glob filters for now,
with implicit asterisks (*) at the start and end of the line.
2021-01-05 21:20:15 +01:00
Andreas Kling
1c8eaf28cd LibGUI: Add GUI::Application::active_window()
Instead of each window having a bool flag that says whether that window
is currently active, have a pointer to the active window on the app
object instead.
2021-01-05 17:13:17 +01:00
Andreas Kling
8b90e8d08b LibGUI: Remove unused hook Window::on_activity_change 2021-01-05 17:13:16 +01:00
Brendan Coles
5c0c4f4b2d Playground: Support opening gml file by path as command line argument 2021-01-05 17:12:54 +01:00
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