Commit graph

43585 commits

Author SHA1 Message Date
Tim Schumacher 71d1d9e2b5 LibArchive: Port TarFileStream to Core::Stream 2022-11-30 08:03:31 +01:00
Tim Schumacher 6e29619dcb LibCore: Add Stream::discard() 2022-11-30 08:03:31 +01:00
Tim Schumacher 7a065513cd LibCore: Add a basic wrapper for adapting AK::Stream to Core::Stream 2022-11-30 08:03:31 +01:00
MacDue 6daef6303a LibWeb: Use AntiAliasingPainter for canvas painting 2022-11-30 07:58:44 +01:00
MacDue b8492006da LibGfx: Disable line intersection stroking for 1px lines
1px lines are already connected, so this just makes things look worse
and is often painting in the wrong spot anyway.
2022-11-30 07:58:44 +01:00
MacDue 8dfe43273c LibGfx: Fix off-by-one for antialiased line length
Previously the line did not include the endpoint.
2022-11-30 07:58:44 +01:00
MacDue 754b8a643d LibGfx: Remove unnecessary path members from AntiAliasingPainter
m_rotated_rectangle_path was unused and m_intersection_edge_path was
cleared/free'd each time it was used. So sticking in the class just
bloats the size.
2022-11-30 07:58:44 +01:00
lanmonster 2b7aa4a971 LibGfx+LibGUI: Use constant for line spacing instead of magic number 2022-11-30 07:57:21 +01:00
implicitfield 67de1a8148 Flood: Apply the color scheme immediately after closing settings 2022-11-30 07:56:25 +01:00
implicitfield aa24caffc5 Flood: Store the board as a vector of integers 2022-11-30 07:56:25 +01:00
implicitfield 39caaae90a Flood: Return a Color from Board::cell
This allows us to get rid of many needless release_value() calls.
2022-11-30 07:56:25 +01:00
Zaggy1024 5f7099cff6 LibVideo/VP9: Apply higher optimization levels to Decoder and Parser
With this change, decode times on GCC as measured by TestVP9Decode are
reduced by about 15%. Not a bad improvement for a few added lines :^)
2022-11-30 07:55:29 +01:00
martinfalisse f351418a1e LibWeb: Include tests for grid track spans
Include tests for grid track spans when given for automatically-placed
grid tracks in the grid-*-end properties.
2022-11-29 19:27:31 +01:00
martinfalisse 964c18419f LibWeb: Use span value if given in the grid-*-end property
Previously were not using the span value if it was given in the
grid-column/row-end properties.
2022-11-29 19:27:31 +01:00
Timothy Flynn 99d8c115a0 LibWeb: Remove outdated FIXME regarding application cache selection
This algorithm, and window.applicationCache, was removed from the spec:
https://github.com/whatwg/html/commit/e4330d5

This also adds a spec link and comments to the affected parser method.
2022-11-29 19:04:31 +01:00
Sam Atkins 33041f3a71 Base: Update and expand profile(1) manpage 2022-11-29 18:54:27 +01:00
Sam Atkins 35126e81c4 profile: Pass the command to run using positional arguments
This changes this:

```sh
profile -c "python3 -m test test_dict"
```

to this:

```sh
profile -- python3 -m test test_dict
```

This should be less confusing, hopefully!
2022-11-29 18:54:27 +01:00
thankyouverycool ed196fc265 HackStudio: Remove FindWidget
HackStudio editors now have built-in incremental search
2022-11-29 15:39:13 +00:00
thankyouverycool a97768001b TextEditor: Change Find/Replace shortcut to Ctrl+Shift+F 2022-11-29 15:39:13 +00:00
thankyouverycool c476ca2bd6 LibGUI: Setup IncrementalSearchBanners for TextEditors
Multi-line TextEditors now share a common search widget which can
be opened with Ctrl+F
2022-11-29 15:39:13 +00:00
thankyouverycool 8231bd9bc3 LibGUI: Add IncrementalSearchBanner
Compared to traditional modal search, incremental search begins
matching as soon as the user starts typing, highlighting results
immediately. This refactors Itamar's work for HackStudio into a
common LibGUI widget to be used in all multi-line TextEditors.
2022-11-29 15:39:13 +00:00
thankyouverycool 3c4a563415 LibGUI: Add Banner concept to AbstractScrollableWidget
Banners are abstract widgets which can house additional controls
and information on a temporary basis, popping in from the top of
their parent when needed.
2022-11-29 15:39:13 +00:00
Brendan Kelly c2cc01c920 LibC: Treat argument "-" the same as arguments that don't start with "-"
This causes `echo -` to output "-" instead of crashing
2022-11-29 13:59:47 +00:00
Andreas Oppebøen ad25a415ae LibWeb: Return the position at end-of-line in TextCursor hit-test
When starting to drag the cursor below the text, we would start the
selection from the closest point in the line above in the last
fragment. This is not the behavior seen in other browsers, and it
causes weird behavior when the cursor is to the left of the last
fragment, for instances when trying to select with the text
`before <span>middle</span> after`.

By starting the selection from the _end_ of the last fragment,
including the line end character, selection behavior is similar to
that of other browsers.
2022-11-29 13:52:01 +00:00
Baitinq 44ef0ac41c shuf: Support the output of a limited number of lines
This patch adds the "-n"/"--head-count" optional argument to specifiy
the maximum number of shuffled lines to output.

Idea from Andreas' FIXME roulette :^)
2022-11-29 11:44:05 +01:00
Andreas Kling e2771db50d Tests/Kernel: Add a very simple test for posix_fallocate() 2022-11-29 11:09:19 +01:00
Andreas Kling 4277e2d58f Kernel: Add some spec links and comments to sys$posix_fallocate() 2022-11-29 11:09:19 +01:00
Andreas Kling 961e1e590b Kernel: Make sys$posix_fallocate() fail with ENODEV on non-regular files
Previously we tried to determine if `fd` refers to a non-regular file by
doing a stat() operation on the file.

This didn't work out very well since many File subclasses don't
actually implement stat() but instead fall back to failing with EBADF.

This patch fixes the issue by checking for regular files with
File::is_regular_file() instead.
2022-11-29 11:09:19 +01:00
Andreas Kling 4dd148f07c Kernel: Add File::is_regular_file()
This makes it easy and expressive to check if a File is a regular file.
2022-11-29 11:09:19 +01:00
Andreas Kling c8ff2184bd LibCore: Add Core::System::posix_fallocate() 2022-11-29 11:09:19 +01:00
Andreas Kling 9249bcb5aa Kernel: Remove unnecessary FIXME in sys$posix_fallocate()
This syscall doesn't need to do anything for ENOSPC, as that is already
handled by its callees.
2022-11-29 11:09:19 +01:00
Andreas Kling 361897192c LibC: Negate kernel errors before returning them in posix_fallocate()
Since posix_fallocate() doesn't set errno, it has to make sure to
manually "unwrap" any error from the kernel.
2022-11-29 11:09:19 +01:00
MacDue f274f04e35 LibGfx: Handle alpha in color distance
This gives a slightly more reasonable result when comparing different
colors with low alpha values.

For example comparing white with alpha 100 to transparent:

	Before
		distance: 0.78
	After
		distance: 0.07

   (Where distance is between 0 and 1)

The result is unchanged for comparing colors without alpha values.
2022-11-29 11:08:50 +01:00
MacDue 613963cbce LibGfx: Don't bother painting transparent lines 2022-11-29 11:08:50 +01:00
MacDue 0e65de2e11 LibGfx: Don't write blended pixel if the alpha is zero 2022-11-29 11:08:50 +01:00
Keegan Saunders e575339564 LibELF: Add stack guard hardening
Employ the same hardening that glibc and the Linux kernel use for
generating stack guards: zero the first byte of the guard such that
if C-style string functions read out of bounds on the stack, we do
not overwrite or potentially leak the stack guard.
2022-11-29 11:04:21 +01:00
Keegan Saunders 89b23c473a LibC: Use uintptr_t for __stack_chk_guard
We used size_t, which is a type that is guarenteed to be large
enough to hold an array index, but uintptr_t is designed to be used
to hold pointer values, which is the case of stack guards.
2022-11-29 11:04:21 +01:00
Timothy Flynn 675e5bfdce LibJS: Allow specifying only roundingIncrement in NumberFormat options
This is a normative change in the Intl.NumberFormat v3 spec. See:
https://github.com/tc39/proposal-intl-numberformat-v3/commit/a260aa3
2022-11-29 10:24:44 +01:00
Andreas Kling e3b8a8f7c8 LibWeb: Treat unresolvable percentage width on inline-block as auto 2022-11-28 19:14:05 +01:00
Ali Mohammad Pur c590c5c444 js: Make console.log() print to stdout again
This was broken in 84502f53b5.
2022-11-28 14:32:27 +01:00
thankyouverycool 63d0aa9d8a LibCore: Add %l conversion specification to DateTime
Replaced by the hour as a decimal 1-12 in which single digits
are preceded by a blank
2022-11-28 13:12:08 +01:00
cflip 5c68ca8f48 Ports/SDL2: Update window focus event listeners
Fixes an issue where ClassiCube would get stuck on the pause menu.
2022-11-28 13:11:16 +01:00
davidot ab19d7c99d LibJS: Enable commented out tests in Math.asin 2022-11-28 13:10:21 +01:00
davidot bf1b2d63c6 LibJS: Add spec comments and check for edge cases in Math.tanh 2022-11-28 13:10:21 +01:00
davidot 8de8742b7c LibJS: Add spec comments and check for edge cases in Math.sinh 2022-11-28 13:10:21 +01:00
davidot 4306462a95 LibJS: Add spec comments and check for edge cases in Math.log10 2022-11-28 13:10:21 +01:00
davidot eda90b54d4 LibJS: Add spec comments and check for edge cases in Math.log2 2022-11-28 13:10:21 +01:00
davidot 4813385c9a LibJS: Add spec comments and check for edge cases in Math.log 2022-11-28 13:10:21 +01:00
davidot d4e5644df8 LibJS: Add spec comments and check for edge cases in Math.atanh 2022-11-28 13:10:21 +01:00
davidot c565cbd30c LibJS: Add spec comments and check for edge cases in Math.atanh 2022-11-28 13:10:21 +01:00