Commit graph

23583 commits

Author SHA1 Message Date
Linus Groh
66ff772254 LibJS: Implement Temporal.Instant.fromEpochMilliseconds() 2021-07-09 13:20:51 +01:00
Linus Groh
2401e45720 LibJS: Implement Temporal.Instant.fromEpochSeconds() 2021-07-09 13:20:51 +01:00
Linus Groh
9c9813c312 LibJS: Replace useless use of SignedBigInteger::create_from() with ctor
create_from() casts the value to a 64 bit integer and then creates two
words from it, which is not necessary if we only pass values to it that
fit into a single word (32 bit integer).
Also make them use UnsignedBigInteger as the previously missing SBI
divided_by() overload is now implemented.
2021-07-09 13:20:51 +01:00
Linus Groh
a216ea4c8d LibCrypto: Add missing implementation of SBI::divided_by(USBI) 2021-07-09 13:20:51 +01:00
Linus Groh
3014e529be LibJS: Tweak error message in the NumberToBigInt abstract operation
This is no longer specific to the BigInt() constructor, so it shouldn't
be mentioning an 'argument' that we might not have.
2021-07-09 13:20:51 +01:00
Linus Groh
9f2dd89446 LibJS/Tests: Add tests for Date.prototype.toTemporalInstant() 2021-07-09 13:20:51 +01:00
Andreas Kling
e5a1e535cc LibC: Re-run clang-format on malloc.cpp 2021-07-09 14:14:22 +02:00
Andreas Kling
19cb5ed97a LibC: Simplify locking in malloc
- Use a simple pthread_mutex_t instead of bringing in headers from
  LibThreading just to get a mutex.

- Use a normal mutex instead of a recursive one.

- Remove redundant locking in realloc().
2021-07-09 13:47:32 +02:00
Andreas Kling
b8a204c5b9 LibThreading: Rename Lock => Mutex 2021-07-09 11:15:50 +02:00
Andreas Kling
ce5d2b4f16 LibThreading: Remove unused "Lockable" class 2021-07-09 11:15:50 +02:00
Luke
1da06f9dfd LibJS: Add %TypedArray%.prototype.map 2021-07-09 10:15:45 +01:00
Luke
bc6f619344 LibJS: Add TypedArraySpeciesCreate and %TypedArray%.prototype.filter
I'm not too happy with how I get the default constructor in
typed_array_species_create, but it works for now.
2021-07-09 10:15:45 +01:00
Luke
53bc3f8e3b LibJS: Move typed_array_create to TypedArray.{h,cpp}
This is to make it accessible from TypedArrayPrototype, for use with
typed_array_species_create.
2021-07-09 10:15:45 +01:00
Aziz Berkay Yesilyurt
9b4729dd40 Userland: Add ability to capture rectangular region in shot
A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:33:46 +04:30
Aziz Berkay Yesilyurt
dc833e49b0 WindowServer: Paint background when a fullscreen window is transparent
The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.
2021-07-09 13:33:17 +04:30
Aziz Berkay Yesilyurt
6f594b36f5 LibGUI: Verify m_window_id is not-zero in set_maximized
Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.
2021-07-09 13:32:30 +04:30
Ali Mohammad Pur
0459a111b2 Revert "Userland: Add ability to screenshot rectangular region in shot (#8515)"
This reverts commit 1c06d77262.
This was squashed by mistake, the rebased version will follow.
2021-07-09 13:27:56 +04:30
x-yl
1fe08759e3 Kernel: Support multiport for VirtIOConsole
This involves refactoring VirtIOConsole into VirtIOConsole and
VirtIOConsolePort. VirtIOConsole is the VirtIODevice, it owns multiple
VirtIOConsolePorts as well as two control queues. Each
VirtIOConsolePort is a CharacterDevice.
2021-07-09 13:19:21 +04:30
x-yl
1492bb2fd6 Kernel: Add support for reading from VirtIOConsole
This allows two-way communication with the host through a VirtIOConsole.
This is necessary for features like clipboard sharing.
2021-07-09 13:19:21 +04:30
Aziz Berkay Yesilyurt
1c06d77262
Userland: Add ability to screenshot rectangular region in shot (#8515)
* LibGUI: Verify m_window_id is not-zero in set_maximized

Window::set_maximized requires non-zero window id to be a valid call,
i.e. calling Window::show beforehand. A verify statement before the
server call can help developers by hinting correct usage.

* LibGUI: Paint background when the fullscreen window is transparent

The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.

* Userland: Add ability to capture rectangular region in shot

A click and drag selectable, transparent, fullscreen window is
displayed with the command line argument -r for screenshots.
2021-07-09 13:11:24 +04:30
Aziz Berkay Yesilyurt
ec389adaa6 ImageViewer: Use real path for the image path
By using the real path for the image, ImageViewer can iterate over the
images in the same directory. Before, this was not possible when
ImageViewer opened from Terminal with a path argument.
2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
f62f53f723 ImageViewer: Use LexicalPath to grab current_dir 2021-07-09 10:22:26 +02:00
Aziz Berkay Yesilyurt
dd476c35cb ImageViewer: Don't resize the window after the first image is displayed 2021-07-09 10:22:26 +02:00
Andreas Kling
36c8b1c58c Meta: Update CONTRIBUTING.md
- Rename "reviewers" to "maintainers" to disambiguate, since everyone
  is encouraged to participate in code review.

- Clarify that maintainership is by invitation only and unrelated to
  participation metrics.
2021-07-09 10:18:24 +02:00
Luke
c94b0e80e7 Kernel: Stop booting and print if PAE is not supported by the processor
We currently require PAE and not having it causes us to crash.
This turns that crash into an error message.
2021-07-09 01:29:52 +02:00
Linus Groh
6531485251 LibJS/Tests: Add tests for Temporal.Instant() constructor 2021-07-08 23:08:27 +01:00
Linus Groh
117323f2d9 LibJS: Implement Temporal.Instant.prototype.epochNanoseconds 2021-07-08 23:08:27 +01:00
Linus Groh
b5d0cdc97e LibJS: Implement Temporal.Instant.prototype.epochMicroseconds 2021-07-08 23:08:27 +01:00
Linus Groh
b157ab3f12 LibJS: Implement Temporal.Instant.prototype.epochMilliseconds 2021-07-08 23:08:27 +01:00
Linus Groh
5010e01223 LibJS: Implement Temporal.Instant.prototype.epochSeconds 2021-07-08 23:08:27 +01:00
Linus Groh
dad336c944 LibJS: Implement Temporal.Instant.prototype[@@toStringTag] 2021-07-08 23:08:27 +01:00
Linus Groh
439b35dc7d LibJS/Tests: Add tests for Temporal.TimeZone() constructor 2021-07-08 23:08:27 +01:00
Linus Groh
51c581f604 LibJS: Implement Temporal.TimeZone.prototype.id 2021-07-08 23:08:27 +01:00
Linus Groh
7f0fe352e2 LibJS: Implement Temporal.TimeZone.prototype.toJSON() 2021-07-08 23:08:27 +01:00
Linus Groh
8d00504ff2 LibJS: Implement Temporal.TimeZone.prototype.toString() 2021-07-08 23:08:27 +01:00
Linus Groh
2e968700aa LibJS: Implement Temporal.TimeZone.prototype[@@toStringTag] 2021-07-08 23:08:27 +01:00
Andrea Martinelli
ab1caad1e9 Taskbar: Make clicks at the edges and corners work as expected
This makes it easy for the user to just throw the mouse at the corner
of the screen and obtain the desired outcome (eg. opening the start
menu), without having to precisely position the cursor over one of the
buttons.
2021-07-08 22:45:40 +02:00
networkException
dac7b25b8a WindowServer: Add missing minimize check to highlighted window callback
This patch adds a missing minimize check for highligted windows in
WindowStack::for_each_visible_window_of_type_from_front_to_back().
Minimized windows should not be treated as visible in this context.

Previously, iterating through each visible Window when recomputing
occlusions in the Compositor would cause a crash if a highlighted
Window is also minimized at the same time. As the WindowSwitcher
currently highligts Windows even when they are minimized, opening
it while any Window is minimized would cause WindowServer to crash.
2021-07-08 22:31:21 +02:00
Marcus Nilsson
791a018c99 PixelPaint: Add method to merge visible layers
This adds a function that merges all visible layers to one, ignoring the
invisible.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
0900e31fe0 PixelPaint: Scroll into view when reordering layers
Make LayerListWidget scroll into view when reordering layers.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
618bb2d33e PixelPaint: Make brush draw on mousedown
This makes the brush tool start drawing a point before the user moves
the mouse, like in Photoshop and Gimp. The number of iterations of
draw_point makes for roughly 4 clicks to full opacity.
2021-07-08 20:16:26 +02:00
Marcus Nilsson
9be08e33ea PixelPaint: Add method to flatten image layers
This adds Image::flatten_all_layers() that allows the user to flatten
all the visible layers into one.
2021-07-08 20:16:26 +02:00
networkException
76a18e1172 WindowServer: Remove rect behind window icon in WindowSwitcher
This patch removes the background behind window icons
in the WindowSwitcher which looked like it was being
rendered incorrectly (without alpha) previously.
2021-07-08 20:15:23 +02:00
pancake
390d3e9fbe
LibVT: Ignore DECSTBM with invalid values (#8559)
Co-authored-by: pancake <pancake@nopcode.org>
2021-07-08 22:41:55 +04:30
Idan Horowitz
241f9f21d4 LibJS: Add %TypedArray%.prototype.reduceRight 2021-07-08 16:30:09 +01:00
Idan Horowitz
2356382938 LibJS: Add %TypedArray%.prototype.reduce 2021-07-08 16:30:09 +01:00
Idan Horowitz
f0abcde00c LibJS: Add %TypedArray%.prototype.lastIndexOf 2021-07-08 16:30:09 +01:00
Idan Horowitz
6343bfa9d7 LibJS: Add %TypedArray%.prototype.indexOf 2021-07-08 16:30:09 +01:00
Idan Horowitz
da49a7a9f8 LibJS: Add %TypedArray%.prototype.includes 2021-07-08 16:30:09 +01:00
Idan Horowitz
3b9886949f LibJS: Add %TypedArray%.prototype.fill 2021-07-08 16:30:09 +01:00