Commit Graph

3563 Commits

Author SHA1 Message Date
Linus Groh
649d2faeab Everywhere: Use "the SerenityOS developers." in copyright headers
We had some inconsistencies before:

- Sometimes "The", sometimes "the"
- Sometimes trailing ".", sometimes no trailing "."

I picked the most common one (lowecase "the", trailing ".") and applied
it to all copyright headers.

By using the exact same string everywhere we can ensure nothing gets
missed during a global search (and replace), and that these
inconsistencies are not spread any further (as copyright headers are
commonly copied to new files).
2021-04-29 00:59:26 +02:00
Linus Groh
5459c744f1 Everywhere: Add missing comma between copyright year and name 2021-04-29 00:59:26 +02:00
Gunnar Beutner
d0a7547537 LibDebug: Implement support for AttributeDataForm::{UData,LineStrP} 2021-04-28 23:10:48 +02:00
Gunnar Beutner
d2f0984fef LibDebug: Implement support for DWARF 5 line programs 2021-04-28 23:10:48 +02:00
Gunnar Beutner
6b4448b623 LibDebug: Implement support for DWARF 5 compilation unit headers 2021-04-28 23:10:48 +02:00
Gunnar Beutner
a3f2af49f9 LibDebug: Move UnitHeader32 out of the LineProgram class 2021-04-28 23:10:48 +02:00
Gunnar Beutner
ea6fdad88b LibDebug: Move get_attribute_value to the DwarfInfo class 2021-04-28 23:10:48 +02:00
Idan Horowitz
edfe81b1ee LibC: static_assert that all malloc size classes have an alignment of 8
This will help prevent issues like the one fixed by #6703 from
happening again.
2021-04-28 19:57:06 +02:00
Gunnar Beutner
ae5ee2220c LibC: Make sure malloc() returns addresses that have an alignment of 8 2021-04-28 14:26:56 +02:00
Gunnar Beutner
aa792062cb Kernel+LibC: Implement the socketpair() syscall 2021-04-28 14:19:45 +02:00
Federico Guerinoni
c841012f56 Userland: Implement tac command
Nobody care about tac :^).
2021-04-28 10:02:08 +02:00
FalseHonesty
b0145ea529 HackStudio: Add context option to set execution point while debugging
You can now right click in HackStudio's editor while debugging and
have the option to instantly move the current execution position to
the current line.
2021-04-28 09:43:26 +02:00
Tom
31c3382577 WindowServer: Use window menu actions when clicking frame buttons
This keeps the minimize/maximize/restore/close implementation
consistent with the window menu actions.
2021-04-28 09:40:34 +02:00
Tom
7345b502ab WindowServer: Don't restore active window if it is minimized
When closing a menu, don't restore the active input to a window that
is now minimized or invisible.

Fixes #6690
2021-04-28 09:40:34 +02:00
Jelle Raaijmakers
4387a4864c Screensaver: Implement mouse hysteresis
Allow the mouse to move a bit before actually closing the app.

Fixes #6692
2021-04-28 09:37:37 +02:00
Jean-Baptiste Boric
91def742a4 LibM: Fix INFITITY to float
POSIX mandates it.
2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
8d95bd8418 LibThread: Fix int to pointer conversion 2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
7d84f09e7e Userland: Move non-standard math constants from math.h 2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
9aa44fa36c LibIPC: Add missing errno.h include 2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
b3e070b2f3 Userland: Move HOST_NAME_MAX to limits.h
POSIX mandates its definition there.
2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
f9d82ecf18 Run: Remove useless serenity.h include 2021-04-27 23:06:16 +02:00
Andreas Kling
504d622864 LibWeb: Remove unnecessary temporary Vector in text layout
Now that we have Layout::TextNode::ChunkIterator, we don't need to
accumulate all the chunks in a vector before dividing them into lines.
2021-04-27 19:11:59 +02:00
Andreas Kling
37e29a630b LibWeb: Minor cleanup tweak in TextNode::split_into_lines_by_rules()
Merge an unnecessarily nested branch with its parent.
2021-04-27 19:11:59 +02:00
Andreas Kling
5074aaea69 LibWeb: Refactor Layout::TextNode splitting into a chunk iterator
Creating a ChunkIterator allows you to iterate over the text in a
Layout::TextNode at your leisure by calling next() when you want
another chunk.

This is one of many steps towards improving inline layout.
2021-04-27 19:11:59 +02:00
Paul Berg
03d8ee1082 VimEditingEngine: allow selection of the endline character
This patch fixes the visual selection of endline characters in the
VimEditingEngine. When the visual mode is disabled and the cursor
is located on the endline character, it is shifted back to the last
character of the line.
2021-04-27 19:05:16 +02:00
Brian Gianforcaro
48632461c1 Tests: Convert file system suid-sgid stripping test to be LibTest based. 2021-04-27 17:58:11 +02:00
Brian Gianforcaro
41387df5f8 Tests: Convert pledge-test-failures.cpp to be LibTest based. 2021-04-27 17:58:11 +02:00
Brian Gianforcaro
122869f086 Tests: Convert unveil-test-failures.cpp to be LibTest based. 2021-04-27 17:58:11 +02:00
Brian Gianforcaro
a9df58d7b2 LibTest: Add FAIL() macro allow tests to force failure with message. 2021-04-27 17:58:11 +02:00
sin-ack
ace2c337dc VimEditingEngine: Handle arrow, Home/End and Page keys
This patch adds handling of the arrow, Home/End, and PageUp/PageDown
keys to the Vim emulation mode.  Home acts as 0, End acts as $, arrow
keys act as their HJKL variants, and PageUp/Down behaves as you would
expect.

This patch also moves the default handling of the aforementioned keys
to insert mode, since regular EditingEngine semantics are more
appropriate there.
2021-04-27 13:10:10 +02:00
Jelle Raaijmakers
d1f33ec795 LibPthread: Use realtime clock for futex_wait()
If we get an absolute time passed to one of the pthread_*wait methods,
this is not an absolute monotonic time but rather an absolute wall
time. This means that we also need to pass FUTEX_CLOCK_REALTIME to the
futex syscall to ensure we're not using the monotonic clock.
2021-04-27 09:19:55 +02:00
sin-ack
d6dc81874d EditingEngine: Split selection from movement functions
This patch moves selection updates outside movement functions in
EditingEngine.  Previously, movement functions would automatically
update the selection based on whether the Shift key was pressed down
during movement.  However, not all EditingEngine subclasses want that;
VimEditingEngine being a good example (because all selection is handled
in visual mode).

Therefore, this patch moves all selection updating to
EditingEngine::on_key().  Subclasses wishing to provide custom movement
and selection semantics should override it (and VimEditingEngine already
does).
2021-04-27 09:03:38 +02:00
Jelle Raaijmakers
2e1320f264 WindowServer: Reevaluate hovered window on window rect change
When a new Window instance is added to the WindowManager, it does not
yet have an updated value for `m_frame->rect()` and we're not checking
if there is a new candidate for the hovered window, which we need to do
since the mouse cursor might hover above the newly opened window.

This fixes both issues: as soon as a Window frame's rect is changed,
ask the WindowManager to reevaluate its hovered window. This takes care
of newly opened windows _and_ windows that are programmatically changed
in size.

This works because when a Window becomes hovered, the WindowManager
sends out an enter event. This event in turn triggers the Window to
evaluate the cursor type under the mouse position and to update it when
necessary.

Fixes #4809.
2021-04-27 08:58:13 +02:00
Jelle Raaijmakers
83dfc4aa46 LibGUI/Window: Do not reset mouse cursor on show()
Window::m_cursor already has ::None as its default value, so let's not
overwrite its value if it was set to something else.
2021-04-27 08:58:13 +02:00
Jagger De Leo
cec8488d9d Demos: Add Starfield screensaver demo 2021-04-26 23:13:27 +02:00
kleines Filmröllchen
563cc17a50 LibAudio: Support 32 and 64-bit float WAV files
LibAudio's WavLoader plugin for loading WAV files now supports loading
audio files with 32-bit float or 64-bit float samples.

By supporting these new non-int sample formats, Audio::Buffer now stores
the sample format (out of a list of supported formats) instead of the
raw bit depth. (The bit depth is easily calculated with
pcm_bits_per_sample)
2021-04-26 19:08:40 +02:00
DexesTTP
91c210c39a LibGUI: Make common locations configurable 2021-04-26 18:57:57 +02:00
Gunnar Beutner
fddcaafe5f Utilities: Make ls respect options when specifying more than one path
When specifying more than one path (e.g. with ls -l /usr /bin) ls
would ignore other display options and fall back to showing the files
in short mode.
2021-04-26 18:44:30 +02:00
thankyouverycool
ed634a4582 FontEditor: Don't put invalid clicks on the undo stack 2021-04-26 18:43:35 +02:00
thankyouverycool
8febfb169d FontEditor: Warn on unsaved changes
Standardizes saving conventions: Editor now warns on close, new,
and open if there are unsaved changes, and new files prompt to
Save As.
2021-04-26 18:43:35 +02:00
thankyouverycool
67f81adc55 Calendar: Swap Liza for Marieta 2021-04-26 18:41:54 +02:00
Gunnar Beutner
ba9a285d56 Profiler: Use NonnullOwnPtr for libraries 2021-04-26 17:13:55 +02:00
Gunnar Beutner
eb798d5538 Kernel+Profiler: Improve profiling subsystem
This turns the perfcore format into more a log than it was before,
which lets us properly log process, thread and region
creation/destruction. This also makes it unnecessary to dump the
process' regions every time it is scheduled like we did before.

Incidentally this also fixes 'profile -c' because we previously ended
up incorrectly dumping the parent's region map into the profile data.

Log-based mmap support enables profiling shared libraries which
are loaded at runtime, e.g. via dlopen().

This enables profiling both the parent and child process for
programs which use execve(). Previously we'd discard the profiling
data for the old process.

The Profiler tool has been updated to not treat thread IDs as
process IDs anymore. This enables support for processes with more
than one thread. Also, there's a new widget to filter which
process should be displayed.
2021-04-26 17:13:55 +02:00
sppmacd
d164da7d19
Browser: Add basic support for search engines
If you start a URL with a '?' character, the Browser will use the
user-selected search engine (none by default).

For now, there are several engines hardcoded and there is no support
for custom search engines.
2021-04-26 11:52:19 +02:00
dhirsbrunner
cd9e352460 LibC: Fix typo in signal.h: ol_dset -> old_set 2021-04-26 11:27:13 +02:00
Sahan Fernando
b4e125cf86 Userland: Make rmdir take multiple paths 2021-04-26 09:32:42 +02:00
Panagiotis Vasilopoulos
43956c9611 LibC: Add additional data types
- Reorganized some variables (alphabetically and based on their function) so that the new ones don't stick out.
- See: https://github.com/SerenityOS/serenity/issues/6068

Co-authored-by: Linus Groh <mail@linusgroh.de>
2021-04-26 09:24:21 +02:00
Linus Groh
7b1ba4bd5c LibJS: Fallback to undefined if last value in eval() is empty
For something like eval(""), the VM's 'last value' is an empty value,
which we must not leak.

Fixes #6643.
2021-04-25 22:52:19 +02:00
Idan Horowitz
2b4c2301a9 LibJS: Stop rolling back parser state that is immediately replaced
This showed up on a profile (barely), so should help a tiny bit with
perf in parsing arrow functions.
2021-04-25 22:46:34 +02:00
Linus Groh
aef502e8e0 LibJS: Change PropertyName::as_number() return type to u32
This is how it's stored internally - even though we still only construct
from i32. I had the compiler yell at me while trying something with this
and didn't want to add yet another cast, so let's quickly fix this.
2021-04-25 22:42:48 +02:00