Commit graph

17112 commits

Author SHA1 Message Date
Andreas Kling
af6a633468 LibELF: Remove an ungodly amount of DYNAMIC_LOAD_DEBUG logging
This logging mode was unusable anyway since it spams way too much.
The dynamic loader is in a pretty good place now anyway, so I think
it's okay for us to drop some of the bring-up debug logging. :^)

Also, we have to be careful with dbgln_if(FOO_DEBUG, "{}", foo())
where foo() is something expensive, since it might get evaluated
even if !FOO_DEBUG.
2021-02-23 19:43:44 +01:00
Andreas Kling
37420f1baf LibELF: Move ELF hash functions to their own file (and make constexpr) 2021-02-23 19:43:44 +01:00
Andreas Kling
145923bdc9 AK: Slap Optional with the ALWAYS_INLINE stick
I saw some Optional constructors when profiling the dynamic loader
and that seemed silly since we can inline them at no/little cost.
2021-02-23 17:42:05 +01:00
Andreas Kling
de52fe6156 Kernel: Only build with -fsanitize=* if using GCC
Clangd (CLion) was choking on some of the -fsanitize options, and since
we're not building the kernel with Clang anyway, let's just disable
the options for non-GCC compilers for now.
2021-02-23 17:41:34 +01:00
Andreas Kling
31ac93d051 AK: Optimize StringView::operator==(const char*) a little bit
Don't compute the strlen() of the string we're comparing against first.
This can save a lot of time if we're comparing against something that
already fails to match in the first few characters.
2021-02-23 17:41:18 +01:00
Andreas Kling
87bb00f6ab Build: Only use -fstack-clash-protection with GCC
This is not yet supported by Clang, so let's disable it for non-GCC
compilers for now. (CLion was whining about it.)
2021-02-23 17:41:03 +01:00
Brandon Scott
99e6c9b23d Browser: Implement view source for out of process mode
Implemented view source functionality for out of process mode
and moved view source dialog creation into seperate static
method.
2021-02-23 16:23:56 +01:00
Brandon Scott
2f56a86a4e LibWeb: Added get source functionality and hook event 2021-02-23 16:23:56 +01:00
Brandon Scott
306501fd4a WebContent: Added IPC calls for getting source 2021-02-23 16:23:56 +01:00
Brendan Coles
a032c836c4 HexEditor: Add menu icons for search menu items 2021-02-23 15:56:11 +01:00
AnotherTest
7c2754c3a6 AK+Kernel+Userland: Enable some more compiletime format string checks
This enables format string checks for three more functions:
- String::formatted()
- Builder::appendff()
- KBufferBuilder::appendff()
2021-02-23 13:59:33 +01:00
AnotherTest
c989e55195 LibWeb: Fix a tiny appendff() format issue
This would've just left the colour on for a few characters, nothing _too_ bad.
2021-02-23 13:59:33 +01:00
AnotherTest
347d741afb AK+Userland: Extend the compiletime format string check to other functions
Thanks to @trflynn89 for the neat implicit consteval ctor trick!
This allows us to basically slap `CheckedFormatString` on any
formatting function, and have its format argument checked at compiletime.

Note that there is a validator bug where it doesn't parse inner replaced
fields like `{:~>{}}` correctly (what should be 'left align with next
argument as size' is parsed as `{:~>{` following a literal closing
brace), so the compiletime checks are disabled on these temporarily by
forcing them to be StringViews.

This commit also removes the now unused `AK::StringLiteral` type (which
was introduced for use with NTTP strings).
2021-02-23 13:59:33 +01:00
AnotherTest
29c8d34be7 HackStudio: Fix a misuse of dbgln() intended as dbgln_if()
This currently works accidentally, just because there's an overload for
`dbgln<bool>(...)` - it just bypasses the compiletime checks.
2021-02-23 13:59:33 +01:00
AnotherTest
644d981b2b AK: Untangle TestSuite assertions a bit 2021-02-23 13:59:33 +01:00
AnotherTest
531d72fdfd Kernel: Fix a dmesgln() format error 2021-02-23 13:59:33 +01:00
AnotherTest
1c4e15117d UserspaceEmulator: Fix an outln() format bug 2021-02-23 13:59:33 +01:00
Brendan Coles
501834ba45 Inspector: Add help documentation 2021-02-23 13:52:16 +01:00
Andreas Kling
82278d632f LibWeb: Only scroll BlockBox on wheel event if overflow==scroll
We implement this by adding a BlockBox::is_scrollable() helper,
and then ignoring wheel events for non-scrollable boxes.

Thanks to FireFox317 for pointing this out! :^)
2021-02-22 23:44:51 +01:00
Ivan Hansgaard Hansen
c9cd96894b
HackStudio: Fix opened files appearing empty (#5480)
When files where placed in outside of the project root, they would
appear empty because the label in the tree would differ from the
actual file path relative to the root.

Fixes #5471.
2021-02-22 23:00:57 +01:00
Andreas Kling
cd79b807dd LibWeb: Allow scrolling overflowed content with the mouse wheel :^)
This is rather crude, but you can now use the mouse wheel to scroll up
and down in block-level boxes with clipped overflowing content.
There's no limit to how far you can scroll in either direction, since
we don't yet track how much overflow there is. But it's a start. :^)
2021-02-22 21:47:00 +01:00
Andreas Kling
ded8c728d2 LibWeb: Plumb wheel events from widget layer to EventHandler 2021-02-22 21:46:54 +01:00
Andreas Kling
53081226e9 LibWeb: Clip overflowing inline children when overflow != "visible"
We now apply a paint-time clip to the padding rect of a BlockBox before
painting its inline-level children. This covers some of the behavior
we want from "overflow: hidden" etc but is far from a complete solution.
2021-02-22 21:46:46 +01:00
Andreas Kling
be2b45b215 LibGfx: Make Painter::draw_physical_pixel() clip with scaling in mind 2021-02-22 21:46:39 +01:00
Andreas Kling
2c3376f9d4 LibWeb: Respect explicitly specified CSS "height" on block elements
Don't size blocks to fit their contents if they have an explicit
(non-auto) height specified.
2021-02-22 18:56:48 +01:00
Andreas Kling
543dd54a1d LibWeb: Add bordered_rect() and padded_rect() helpers in Layout::Box 2021-02-22 18:52:58 +01:00
Andreas Kling
21371bf6ee LibWeb: Add parsing and application of CSS "overflow" property
We don't actually do anything with the values yet, but now they are
available for layout nodes once we are ready to implement them.
2021-02-22 15:21:42 +01:00
Andreas Kling
42f582bf8b DisplaySettings: Tweak UI, call it "1x/2x scale" instead of "100%/200%" 2021-02-22 14:13:00 +01:00
Andreas Kling
b126ead34e LibWeb: Support assigning to document.body when it is null 2021-02-22 14:00:47 +01:00
Andreas Kling
9100a1fde9 LibGfx: Don't color outside the lines in Painter::draw_physical_pixel()
Fixes #5422.
2021-02-22 11:44:57 +01:00
Andreas Kling
e405a8f730 LibWeb: Defer the handling of WebContent process crashes
Handling crashes synchronously is finicky since we're modifying the
m_client_state struct while in a callback lambda owned by it.
Let's avoid all the footguns here by simply using deferred_invoke()
and handling the crash on next event loop iteration instead.
2021-02-22 11:28:34 +01:00
TheMorc
38781cb131 Base: Add Slovak keymap 2021-02-22 09:46:02 +01:00
thankyouverycool
bbbcddb252 LibGUI: Ignore glyph dimensions when painting a titleless GroupBox 2021-02-22 09:21:30 +01:00
thankyouverycool
3e987eba2b TextEditor+LibGUI: Add case matching and wrap around optionality
Adds simple ASCII case matching and wrap around toggles to
TextEditor's find/replace widget and reorganizes its layout
2021-02-22 09:21:30 +01:00
Tom
b4c0314f1d WindowServer: Don't close context menus when hovering over menu bar 2021-02-22 09:09:26 +01:00
Tom
35363a972a WindowServer: Reset menu position when opened by the menu bar
Also, only mark the menu bar item as opened if a menu was actually
opened through the menu bar.

These changes allow a menu to be used both in the menu bar as well
as a context menu.

Fixes #5469
2021-02-22 09:09:26 +01:00
AnotherTest
bd318dcdcd Toolchain: Always remove the previous artifacts when building 2021-02-21 23:50:34 +01:00
Jorropo
7b156a7add
Documentation: Combine two "cd" commands in build instructions (#5457) 2021-02-21 23:49:56 +01:00
Kevin Kuehler
c909f7001c keymaps: Add dvorak-programmer
I left the numpad the same as qwerty because I don't have a keyborad
with a numpad and don't know if those keys change or not.
2021-02-21 23:48:57 +01:00
Andreas Kling
9194a97cbe LibWeb: Add Document.createRange()
Also tidy up DOM::Range a little bit while we're here, and unify the
way we create them to use a delegating constructors.
2021-02-21 23:48:01 +01:00
Sviatoslav Peleshko
ff018607a1 SpaceAnalyzer: Added context menu for nodes
Currently supports 3 actions: Open, Copy Path, and Delete.
2021-02-21 23:47:49 +01:00
Mițca Dumitru
8d6525fc50 LibGUI: Show context menu when right-clicking a LinkLabel
Fixes #4794
2021-02-21 23:47:05 +01:00
Tom
8d2d080923 CatDog: Fix wake-sleep "loop" when cursor is over right-top of head
Because re-evaluation of the hovered window may trigger sending a
MouseMove event to a window we should only wake it if the mouse
position actually has changed.
2021-02-21 23:45:04 +01:00
Tom
2677e24a99 LibGUI: Copy alpha channel as-is when keeping backing bitmaps in sync 2021-02-21 23:45:04 +01:00
Ben Wiederhake
3084291625 LibGUI: Fix crash when previewing palette images
For example, navigating File Manager to a directory that contains a vaild BMP file that
uses a palette, this code would end up trying to create an indexed thumbnail.
However, Painter asserts that the thumbnail that we paint on is *not* indexed,
usually crashing File Manager.

Partially fixes #5299, as it now crashes somewhere else.
2021-02-21 22:34:09 +01:00
Ben Wiederhake
e3c00c93ae Utilities: Provide fuzzers as a utility in serenity 2021-02-21 22:34:09 +01:00
Ben Wiederhake
44649517e4 Documentation: QtCreator likes BOMs, our linter doesn't 2021-02-21 22:34:09 +01:00
Ben Wiederhake
b46da5c2cb Meta: Make CMakeLists accessible to QtCreator
We end up having to edit various CMakeLists.txt all the time, and having to open
them in a different editor becomes old quite fast.
2021-02-21 22:34:09 +01:00
Tom
2d29bfc89e WindowServer: Re-evaluate the mouse cursor when alpha hit-testing
A window repaint may change the alpha value, resulting in a different
hit test outcome. In those cases, re-evaluate the cursor hit testing
after a window was painted, and update the cursor if needed.
2021-02-21 22:34:00 +01:00
Andreas Kling
bd830c2dfe LibCpp: Fix yet another broken outln() invocation..
Fixes #5463
2021-02-21 22:13:32 +01:00