Commit Graph

17104 Commits

Author SHA1 Message Date
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
Linus Groh
4166765292 Ports: Update Python to 3.9.2
Released on 2021-02-19, no patch changes required.
https://www.python.org/downloads/release/python-392/
2021-02-21 21:44:52 +01:00
Andreas Kling
15cfde7233 LibWeb: Expose the Window object as Document.defaultView
This should really be a WindowProxy? but since we don't have anything
representing that concept yet, let's just expose the Window object
directly so document.defaultView.foo works. :^)
2021-02-21 21:32:16 +01:00
Andreas Kling
7f66a4e3ba LibJS: Print console.{debug,error,info,log,warn} to system debug log 2021-02-21 21:32:16 +01:00
Andreas Kling
0bb2729423 LibCpp: Fix busted outln() invocations 2021-02-21 21:32:16 +01:00
TheMorc
67d5c9e154 Run: Prefill text field with last command on launch
Fixes #5446
2021-02-21 20:21:56 +01:00
Linus Groh
a4f80ee658 LibWeb: Replace WrapperGenerator's snake_name() with String::to_snakecase()
This now turns "createHTMLDocument" into "create_html_document", that's
another FIXME gone. :^)
2021-02-21 19:47:47 +01:00
Linus Groh
4fafe14691 AK: Add String{,Utils}::to_snakecase()
This is an improved version of WrapperGenerator's snake_name(), which
seems like the kind of thing that could be useful elsewhere but would
end up getting duplicated - so let's add this to AK::String instead,
like to_{lowercase,uppercase}().
2021-02-21 19:47:47 +01:00
AnotherTest
43948aee51 LibC: Don't #define away __{BEGIN,END}_DECLS in stdarg.h
That would force anything that includes this to have language-specific
linkage, and absolutely break `sys/cdefs.h`.

Fixes #5452.
2021-02-21 18:27:50 +01:00