Commit Graph

35817 Commits

Author SHA1 Message Date
Brian Gianforcaro
913374163c LibVT/Kernel: Make VT::Attribute::Flags enum class, use AK EnumBits
Noticed the TODO in `Attribute.h` and realized we have as solution
to this problem already. :^)
2022-03-18 11:29:43 +01:00
Sahan Fernando
8601f74d5f Kernel: Fix crash when opening GPU3DDevice without creating a context 2022-03-18 12:56:35 +03:30
Liav A
3bbb5734af Kernel: Don't initialize early framebuffer console if address is invalid
To do so, we now check that the framebuffer type is RGB so we know that
the Multiboot bootloader actually provided a valid framebuffer to work
with.

This fixes a problem I observed on my ICH7 test machine that apparently
the multiboot_framebuffer_addr was not null but there was no framebuffer
that was set up for RGB colors, and by initializing that console, there
was a memory curroption caused somewhere in the EBDA area to probably
cause a complete system lockup.
2022-03-18 09:22:10 +00:00
Liav A
eca8f292a5 Kernel: Allow to disable early boot console
This aid debugging on bare metal when we suspect that the boot console
does something wrong that interferes with other kernel components.
2022-03-18 09:22:10 +00:00
Liav A
0ef1137e88 Kernel/Graphics: Move all VGA related methods to GraphicsManagement
This helps solving an issue when we boot with text mode screen so the
Kernel initializes an early text mode console, but even after disabling
it, that console can still access VGA ports. This wouldn't be a problem
for emulated hardware but bare metal hardware might have a "conflict",
especially if the native driver explicitly request to disable the VGA
emulation.
2022-03-18 09:22:10 +00:00
Brian Gianforcaro
f9bed65130 SoundPlayer: Fix read of uninitialized member variables on startup
I found these by running SoundPlayer under UserspaceEmulator.
After boot we attempt to read from these values before they
are initialized.
2022-03-18 02:13:05 -07:00
Brian Gianforcaro
ddd75db007 Kernel: Zero initialize DoubleBuffer::InnerBuffer::size
Found by PVS-Studio.
2022-03-18 00:51:16 -07:00
Brian Gianforcaro
8a8c51c39a Kernel: Default initialize AC97::m_codec_revision
Found by PVS-Studio.
2022-03-18 00:51:16 -07:00
Brian Gianforcaro
160c9b7631 Kernel: Zero initialize USBDevice::m_device_descriptor
Found by PVS-Studio.
2022-03-18 00:51:16 -07:00
Brian Gianforcaro
02f684079c Kernel: Rename locker variables in BMIDEChannel so they aren't shadowed
This class already has variables named m_lock, and it's also strange
that locals are named with the `m_` prefix. So lets fix that to make
the code more readable.

Found by PVS-Studio.
2022-03-18 00:51:16 -07:00
Brian Gianforcaro
47cdcc9f67 Kernel: Zero initialize all members in NVMeController
Found by PVS-Studio.
2022-03-18 00:51:16 -07:00
Brian Gianforcaro
199ea9ccf9 Base: Add mp3 SoundPlayer association to the user LaunchServer config
This allows the user to double click on mp3 file names in the terminal
output and open them in SoundPlayer.
2022-03-18 00:07:54 -07:00
Lenny Maiorani
2844f7c333 Everywhere: Switch from EnableIf to requires
C++20 provides the `requires` clause which simplifies the ability to
limit overload resolution. Prefer it over `EnableIf`

With all uses of `EnableIf` being removed, also remove the
implementation so future devs are not tempted.
2022-03-17 22:15:42 -07:00
Michiel Visser
8f7219c6fa LibCrypto: Implement the SECP256r1 elliptic curve
This implementation of the secp256r1 elliptic curve uses two techniques
to improve the performance of the operations.

1. All coordinates are stored in Jacobian form, (X/Z^2, Y/Z^3, Z), which
   removes the need for division operations during point addition or
   doubling. The points are converted at the start of the computation,
   and converted back at the end.

2. All values are transformed to Montgomery form, to allow for faster
   modular multiplication using the Montgomery modular multiplication
   method. This means that all coordinates have to be converted into
   this form, and back out of this form before returning them.
2022-03-18 07:56:47 +03:30
Michiel Visser
3d561abe15 AK: Add constant time equality and zero check to UFixedBigInt 2022-03-18 07:56:47 +03:30
Michiel Visser
590dcb0581 AK: UFixedBigInt add efficient multiplication with full result 2022-03-18 07:56:47 +03:30
thankyouverycool
ab86294660 FontEditor: Reset unicode block view on undo/redo actions
If the previous active glyph is outside the currently selected
block range, reset GlyphMap to show all glyphs. This is less
disorienting when undoing changes outside the visible range.
2022-03-18 01:12:26 +01:00
thankyouverycool
a3956da6dc FontEditor: Make undo/redo compatible with multi-glyph selections
Previously the glyph undo stack saved an array of bytes representing
the restore state of an individual glyph when modified. Now the
selection undo stack saves a byte buffer of the entire selection,
letting us restore changes to multiple glyphs at once.
2022-03-18 01:12:26 +01:00
thankyouverycool
5c27ce2561 ClipboardHistory: Show ranges and max dimensions for copied glyphs
Makes copy history a bit more informative by showing the code point
range of the selection copied, or the individual character if the
selection contains only one glyph.
2022-03-18 01:12:26 +01:00
thankyouverycool
17b16f3997 FontEditor: Use memset/memcpy to copy/paste/delete glyphs
Iterating over each glyph to set bits was rather slow in large
selections. This lets us edit the entire character set almost
instantly.
2022-03-18 01:12:26 +01:00
thankyouverycool
3d1591a822 LibGfx: Add accessors for BitmapFont's rows and widths 2022-03-18 01:12:26 +01:00
Linus Groh
599b2bee4a LibJS: Tweak Interpreter::create() for more spec-likeness
Store a reference to the newly created execution context in an aptly
named variable, rename global_this_value to just this_value, and only
call set_global_object() in a single place.
2022-03-18 01:12:12 +01:00
Linus Groh
29964dc152 LibJS: Use TRY(push_execution_context()) in places where we can recover 2022-03-18 01:12:12 +01:00
Linus Groh
9422ae9bb2 LibJS: Add infallible variant of VM::push_execution_context()
It makes no sense to require passing a global object and doing a stack
space check in some cases where running out of stack is highly unlikely,
we can't recover from errors, and currently ignore the result anyway.

This is most commonly in constructors and when setting things up, rather
than regular function calls.
2022-03-18 01:12:12 +01:00
Linus Groh
50ad8d2a5a Hearts: Add icon to settings action 2022-03-18 01:10:16 +01:00
Linus Groh
c19486172d Applications+Games: Drop ellipsis from settings action
There is no second step to complete after activating this action.
2022-03-18 01:10:16 +01:00
Linus Groh
fd60c9fac7 Games: Add reload icon to 'New Game' actions 2022-03-18 01:10:16 +01:00
Linus Groh
c2d11d5aa0 Eyes: Add 'Contents' action to help menu 2022-03-18 01:10:16 +01:00
Lenny Maiorani
2548ee4149 Kernel: Make number of RTL8168 rx/tx descriptors constexpr 2022-03-17 13:36:17 -07:00
Ali Mohammad Pur
e235c2e21c Meta: Ignore the return value of test-wasm on CI 2022-03-17 23:20:06 +03:30
Ali Mohammad Pur
83883bf3cb Meta: Use sudo to unpack wabt package in CI
The self-hosted runner doesn't run the commands as root.
2022-03-17 23:10:18 +03:30
Ali Mohammad Pur
01d506a953 Meta: Install a recent build of wabt for INCLUDE_WASM_SPEC_TESTS in CI
Also skip prettifying the generated tests as we don't need to look at
them.
2022-03-17 22:42:00 +03:30
Tobias Christiansen
be58e5c35b PixelPaint: Expand FastBoxBlur settings to allow vector input
This expands the previously added settings for the asymmetric radii of
th FastBoxBlurFilter to allow the user to specify an angle and the
desired magnitude of blur.
The given values are then calculated forward to corresponding x and y
blur radii.
2022-03-17 20:03:05 +01:00
Tobias Christiansen
ffcc11c31b PixelPaint: Add asymmetric parameters to FastBoxBlur
This allows the user to blur the image not uniformly, but to specify
different radii for the x and y component.
2022-03-17 20:03:05 +01:00
Tobias Christiansen
64cc482f8a LibGfx: Allow for different {x,y}-radii in FastBoxBlurFilter
Use different specified radii for the two seperate passes.

The gaussian approximation is not changed to accept two parameters since
the math is not exactly straight forward and therefore something for a
later patch. For now, let's progress!
2022-03-17 20:03:05 +01:00
Tobias Christiansen
5f063e832e LibGfx: Make FastBoxBlurFilter::apply_single_pass's argument unsigned
It isn't sensible to have a negative radius for blurring, so an unsigned
value is the right thing to do here.
Now we have to cast the radius to int a few times when actually doing
the calculations but I'm sure that can be done more intelligently, but
that optimization is a thing for the future.

It looked very goofy for the two different ways of invoking the Filter
to have differently signed arguments.
2022-03-17 20:03:05 +01:00
Lenny Maiorani
9c56a83b76 Libraries: Use default constructors/destructors in LibGfx
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 17:23:49 +00:00
Lenny Maiorani
c37820b898 Libraries: Use default constructors/destructors in LibWeb
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 17:23:49 +00:00
Timothy Flynn
c0dd188c4d LibTimeZone: Update to TZDB version 2022a
https://mm.icann.org/pipermail/tz-announce/2022-March/000070.html
2022-03-17 16:38:33 +00:00
Maciej
a95794a356 LibGUI: Clamp selection when drag-selecting over out of range area 2022-03-17 17:05:56 +01:00
Maciej
bee9cd2113 LibGUI: Update active glyph when drag-selecting in GlyphMapWidget
This matches behavior of text selecting
2022-03-17 17:05:56 +01:00
Maciej
d3836f982a LibGUI: Use different color for GlyphMapWidget background
This patch makes background a bit darkened so that it is possible to
distinguish out of range area from glyphs that are just not drawn.

The default background color is also changed to Window so that it looks
good in more themes.
2022-03-17 17:05:56 +01:00
Timothy Flynn
157d16f049 LibJS: Update specification steps for RegExp Match Indices
This proposal was implemented in Stage 3 in commit:
6c67de8186

It is now Stage 4 and has been merged into the main ECMA-262 spec:
https://github.com/tc39/ecma262/commit/0209d85
2022-03-17 11:29:51 -04:00
djwisdom
3016ccba18 Base+Fonts: Applied recommended fixes to fonts 2022-03-17 11:07:08 +01:00
djwisdom
d7ba802c81 Base+Fonts: Add Satori Mono and update Satori fonts 2022-03-17 11:07:08 +01:00
Itamar
09bdd844b4 Utilities: Remove redundant program name element in Core::command() call
This removes a redundant program name element from the arguments Vector
in calls to Core::command().

The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.
2022-03-17 12:32:59 +03:30
Itamar
45788d030a HackStudio: Remove program name element in Core::command() calls
Core::command() takes care of inserting the program name as the first
element in argv, and so we shouldn't include the program name in the
argument vector we give it.

The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.

This fixes building serenity components in Hack Studio.
2022-03-17 12:32:59 +03:30
Ali Mohammad Pur
f27c48d707 Meta: Copy wasm results to the right file
Hopefully for the last time, copy the results to the right file.
2022-03-17 11:25:52 +03:30
Lenny Maiorani
190cf1507b Kernel: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 00:51:36 -07:00
Andreas Kling
68f75ab98e LibWeb: :checked should only match inputs in checkbox/radio type state
We were erroneously allowing :checked to match any input element.
2022-03-16 23:29:17 +01:00