Nicholas Hollett
0d98bba167
Profiler: Add a flamegraph view for the stack
...
The flamegraph makes it easier to quickly spot expensive functions,
based on the width of their bar.
2021-08-31 12:40:51 +02:00
Nicholas Hollett
4fe380f6da
LibGfx: Add color helper for getting shades and tints
...
Shades are colors darker than the color, tints are colors lighter.
This is helpful in places where we need a bunch of similar colors
with some small differences.
2021-08-31 12:40:51 +02:00
Andrew Kaster
60e27dea9c
Meta: Require unzip and tar explicitly in CMakeLists
...
This should help stem the tide of people hopping in the build problems
channel on discord because they don't have unzip installed.
2021-08-31 12:39:46 +02:00
Karol Kosek
6caedc71c1
Base: Fix outline in the 32x32 filetype-font icon
...
The outline was already black in general, besides one dark blue pixel
on the right side of the picture.
2021-08-31 12:38:40 +02:00
Karol Kosek
3238654ae8
Base: Remove half-transparent pixels in filetype-spreadsheet icons
...
Some pixels weren't fully transparent in the top-right corner, which
was pretty visible on file selection in File Manager on default theme.
The files has been also compressed using the Zopfli algorithm, since
they would have been rewritten here anyway.
2021-08-31 12:38:40 +02:00
Andreas Kling
a5992a4ef8
FileManager: Tweak layout spacing in file properties window
...
There wasn't enough vertical spacing between the TabWidget and the three
(Ok/Cancel/Apply) buttons at the bottom.
2021-08-31 02:43:50 +02:00
Andreas Kling
ea7e5be85a
Base: Redraw the basic 16x16 arrow icons
...
This time with a consistent light source (top left) and a color scheme
closer to the SerenityOS default colors. :^)
2021-08-31 02:31:27 +02:00
Andreas Kling
7c9e01e4f5
Base: Tweak 16x16 open-parent-directory icon
...
Make the bottom left corner of this icon rounded, to match all the other
directory icons in the system.
2021-08-31 02:29:32 +02:00
Andreas Kling
af9d4281eb
LibC: Run clang-format on setjmp.h
2021-08-31 01:37:30 +02:00
Andreas Kling
6cb536daa8
FileManager: Hide the Inode and Symlink Target columns in TableView
...
These are not generally interesting, so let's hide them by default.
The user can re-enable them if they want.
2021-08-31 01:35:09 +02:00
Andreas Kling
887ab3cc9a
LibGUI: Rename FileSystemModel's "Owner" column to "User"
...
A file is owned by a User+Group, not an Owner+Group.
2021-08-31 01:35:08 +02:00
Andreas Kling
34f186e1e6
LibGUI: Tweak scrollbar arrows
...
Remove the base, leaving only the pointy triangle part. :^)
2021-08-31 01:35:08 +02:00
Andreas Kling
b8416df173
LibGUI+LibGfx: Make scrollbar buttons a little bit thicker
...
The common thin-cap button look (1px highlight, 2px shadow) looks nice
on regular buttons, but the scrollbar didn't feel quite right.
This patch adds 1px of offset to the highlight, giving it a thick-cap
look (which I have named Gfx::ButtonStyle::ThickCap) :^)
2021-08-31 01:35:08 +02:00
Andreas Kling
087bd7f767
Userland: Use Rect::centered_within() where useful
2021-08-31 01:35:08 +02:00
Andreas Kling
43220568b0
LibGfx: Add Rect::centered_within(Rect)
...
I've wanted this API a number of times but never added it.
2021-08-31 01:35:08 +02:00
Dimenus
de0861581e
Userland: Guard set_jmp.h static_assert check to cpp impls only
2021-08-31 00:47:18 +02:00
Karol Kosek
1700b6d113
FileManager: Remove tree_view_directory_context_menu
...
It isn't used anywhere and the tree view shows only directories
(and that is covered by the tree_view_directory_context_menu).
2021-08-31 00:46:43 +02:00
Karol Kosek
7d6308523a
FileManager: Add 'Open in Terminal' action for selected dirs on desktop
...
This is to be more similar to the context menu from the windowed
instance of File Manager.
2021-08-31 00:46:43 +02:00
Karol Kosek
dd75ed0c5e
FileManager: Add default 'Open' action in context menu for directories
...
This makes the directory context menu more similar to the file context
menu.
2021-08-31 00:46:43 +02:00
Karol Kosek
7cf5904124
FileManager: Place mkdir and touch actions below openings in tree view
...
This way, the Properties action will always be everywhere on bottom.
2021-08-31 00:46:43 +02:00
Karol Kosek
d184e5327a
FileManager: Put file launch actions first
...
The default action (shown in bold) indicates what would you get
by double-clicking on file. Since it's a default option, I think it
deserves to be on top (together with alternative launch options). :^)
Also they're not task actions like "Extract .zip here" or "Add to
bookmarks".
2021-08-31 00:46:43 +02:00
Linus Groh
e3254bf4c5
LibJS: Implement Temporal.Calendar.prototype.dateAdd()
2021-08-30 22:33:10 +01:00
Ali Mohammad Pur
f492e98f19
LibWasm: Make the Truncate operator trap on undefined results
2021-08-30 22:47:02 +02:00
Ali Mohammad Pur
1465b11b58
Meta: Implement support for the "unlinkable" Wasm spectest assertion
2021-08-30 22:47:02 +02:00
Ali Mohammad Pur
30a1a25daa
Tests/LibWasm: Handle all stream errors in parse_webassembly_module
2021-08-30 22:47:02 +02:00
Ali Mohammad Pur
2c7e2e351a
LibWasm: Implement fx.nearest using nearbyint() instead of round()
...
This instruction wants RoundingMode::ToEven, so let's use the correct
function.
2021-08-30 22:47:02 +02:00
Ali Mohammad Pur
e93c740df5
Meta: Generate bigints for i64 values in LibWasm test suite files
2021-08-30 22:47:02 +02:00
Ali Mohammad Pur
99199b9bfd
Tests/LibWasm: Add support for javascript bigint values
...
Some i64 values will not fit in normal doubles, and these values _are_
tested by the test suite, this makes the test runtime capable of
handling them correctly.
2021-08-30 22:47:02 +02:00
LepkoQQ
25f76ed771
Kernel: Fix shift sometimes staying pressed after releasing the key
...
Previous implementation sometimes didn't release the key after pressing
and holding shift due to repeating key updates when holding keys. This
meant repeating updates would set/unset `m_both_shift_keys_pressed`
repeatedly, sometimes resulting in shift still being considered pressed
even after you released it.
Simplify left and right shift key pressed logic by tracking both key
states separately and always updating modifiers based on them.
2021-08-30 22:35:51 +02:00
Andreas Kling
57ac8ff1fd
Meta: Update lint-ports.py for the SerenityPorts move
2021-08-30 20:49:37 +02:00
Timothy Flynn
a2f0eeff7a
LibJS: Canonicalize Unicode locale extension attributes and keywords
2021-08-30 19:42:40 +01:00
Timothy Flynn
94e66f500c
LibJS: Reject structurally invalid Unicode locale extensions
2021-08-30 19:42:40 +01:00
Timothy Flynn
f897c2edb3
LibUnicode: Canonicalize locale private use extensions
2021-08-30 19:42:40 +01:00
Timothy Flynn
6f0cb52dc4
LibUnicode: Canonicalize locale extensions
2021-08-30 19:42:40 +01:00
Timothy Flynn
671eaa0c59
LibUnicode: Add helper lambda for appending canonicalized strings
...
Once canonical extensions are implemented, the number of:
if (optional_string.has_value() {
builder.append('-');
builder.append(optional_string->to_lowercase_string());
}
Will be quite large. This commit just adds a helper lambda to handle
this pattern to prevent this function from becoming even more enormous.
2021-08-30 19:42:40 +01:00
Timothy Flynn
30855e6663
LibUnicode: Parse locale private use extensions
2021-08-30 19:42:40 +01:00
Timothy Flynn
29f76ef7c8
LibUnicode: Parse locale extensions of the other extension form
2021-08-30 19:42:40 +01:00
Timothy Flynn
d2d304fcf8
LibUnicode: Parse locale extensions of the transformed extension form
2021-08-30 19:42:40 +01:00
Timothy Flynn
eda92d15e4
LibUnicode: Parse locale extensions of the Unicode locale extension form
2021-08-30 19:42:40 +01:00
Timothy Flynn
dd89901b07
LibUnicode: Use GenericLexer to parse Unicode language IDs
...
This is preparatory work to read locale extensions. The parser currently
enforces that the entire string is consumed. But to parse extensions,
parse_unicode_locale_id() will need parse_unicode_language_id() to just
stop parsing on the first segment that does not match the language ID
grammar. It will also need to know where the parsing stopped. Both of
these needs are fulfilled by GenericLexer.
The caveat is that we can no longer simply split the parsed string on
separator characters. So parse_unicode_language_id() now operates as a
small state machine.
2021-08-30 19:42:40 +01:00
Timothy Flynn
587d4663a3
AK: Return early from swap() when swapping the same object
...
When swapping the same object, we could end up with a double-free error.
This was found while quick-sorting a Vector of Variants holding complex
types, reproduced by the new swap_same_complex_object test case.
2021-08-30 19:42:40 +01:00
Andreas Kling
aa2e19e58f
Ports: Update relocated ports
...
Port repos have been moved to the new SerenityPorts organization on
GitHub, to declutter the main SerenityOS organization.
2021-08-30 20:18:07 +02:00
Brian Gianforcaro
51ea4d38d5
Meta: Fix yaml syntax of Sonar Cube Workflow
...
I fat fingered this last minute when converting from the trigger
I was using for development/testing to the cron schedule for use
in the main repo.
2021-08-30 20:13:53 +02:00
Ali Mohammad Pur
206bc01f81
LibRegex: Allow null bytes in pattern
...
That check was rather pointless as the input is a StringView which knows
its own bounds.
Fixes #9686 .
2021-08-30 18:43:09 +02:00
Andreas Kling
0de35db0f1
Minesweeper: Use AK::get_random_uniform() instead of rand()
2021-08-30 18:35:36 +02:00
Andreas Kling
d3d170851d
Snake: Use AK::get_random_uniform() instead of rand()
2021-08-30 18:35:36 +02:00
Andreas Kling
4c8fe01bff
SQLServer: Don't stat()-then-mkdir() when mkdir() alone is enough
...
Closes a TOCTOU race that SonarCloud complained about.
SonarCloud: https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVO_uKk92xXUF3qSVc&open=AXuVO_uKk92xXUF3qSVc
2021-08-30 18:35:36 +02:00
Andreas Kling
9fd58fd6d8
AK: Use get_random() in IDAllocator
...
Also generate a new random ID on collision, instead of using
the old ID + 1. :^)
SonarCloud: https://sonarcloud.io/project/security_hotspots?id=SerenityOS_serenity&hotspots=AXuVPBMNk92xXUF3qWZd
2021-08-30 18:35:36 +02:00
Andreas Kling
eaf904000f
LibJS: Always use AK::get_random() in Math.random()
...
Let AK deal with the underlying platform instead of having __serenity__
specific code in LibJS.
2021-08-30 18:35:36 +02:00
Andreas Kling
47420e72b8
Shell: Fix a TOCTOU in popd
by simplifying it
...
This builtin was doing a lot of redundant work, including doing a stat()
followed by a chdir(), when just a chdir() would suffice.
SonarCloud: https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVPAHNk92xXUF3qTNb&open=AXuVPAHNk92xXUF3qTNb
2021-08-30 18:35:36 +02:00