Commit graph

16360 commits

Author SHA1 Message Date
MacDue
857a767ab4 WindowServer: Fix crash when hovering over title buttons
This fixes a crash where if you switched to a theme that has hover
icons for title buttons, then back to a theme that does not. Then
when you next hover over the title buttons the window server would
crash.

This was due to the hover_bitmap multi-scale bitmap pointer being
non-null, but not containing any bitmaps, so hitting an assertion
when painting.
2022-05-18 19:05:18 +02:00
Linus Groh
74695ce76e LibJS: Mark two Get operations in ToTemporalZonedDateTime infallible
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/fed9f16
2022-05-17 21:24:50 +01:00
Linus Groh
a5c41aa905 LibJS: Use required fields argument in ISOYearMonthFromFields
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/ff02f87
2022-05-17 21:16:56 +01:00
Linus Groh
0946f82c8c LibJS: Combine TemporalTimeZoneIdentifier and TimeZoneBracketedName
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/6db76f4
2022-05-17 21:14:01 +01:00
MacDue
9b4aabbcf9 PixelPaint: Allow configuring 'new image' defaults
This allows you to configure the default name, width, and height of
the 'new image' dialog. This is done by editing the config in
~/.config/PixelPaint.ini (no GUI at the moment).

Fixes #13967
2022-05-17 01:01:44 +02:00
Luke Wilde
2b764b3594 LibJS: Remove faulty assertion in BalanceDurationRelative
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/66f7464
2022-05-16 20:48:41 +01:00
Linus Groh
d2c1dd5454 LibJS: Introduce ISO Date Records
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/d264341
2022-05-16 20:46:46 +01:00
Linus Groh
0558eb6d2f LibJS: Swap until/since arguments to DifferenceTemporalZonedDateTime
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/b911bc9
2022-05-16 20:35:13 +01:00
Linus Groh
6d7970a23c LibJS: Remove unnecessary CalendarDate production
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/48744ea
2022-05-16 20:33:22 +01:00
Linus Groh
03017be5bd LibJS: Remove redundant TemporalRelativeToString production
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/f85f953
2022-05-16 20:29:32 +01:00
Linus Groh
51e01b5a80 LibJS: Remove redundant TemporalDateString production
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/41a8a5c
2022-05-16 20:28:26 +01:00
Linus Groh
33f53041e7 LibJS: Replace "enclosed by" with "contained within" in spec comments
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/cb10d3f
2022-05-16 20:17:23 +01:00
DexesTTP
c00ae53b66 LibWeb: Abstract the LibProtocol ResourceLoader connection
This is the final component that required LibProtocol as a dependency
of LibWeb. With this, we can now remove the dependency, and LibWeb no
longer requires IPC to work :^)
2022-05-15 12:17:36 +02:00
DexesTTP
2a359695c6 LibWeb: Abstract the LibProtocol WebSockets connection
Much like the ImageDecoder change, this moves the underlying connection
of the Web::WebSockets class from LibWeb to LibWebView, removing the
need for LibProtocol in LibWeb for this specific use-case.
2022-05-15 12:17:36 +02:00
DexesTTP
2198091bbc LibWeb: Abstract the image decoding via Web::ImageDecoding::Decoder
After this change, LibWeb now expects Web::ImageDecoding::Decoder to be
pre-initialized with a concrete implementation before using the webpage.
The previous implementation, based on the ImageDecoder service, has been
provided directly through an adapter in LibWebClient, and is now used as
the default value by WebContent.
2022-05-15 12:17:36 +02:00
DexesTTP
962040b49c LibWebView: Move StylePropertiesModel to LibWebView
This patch has no functional changes.
2022-05-15 12:17:36 +02:00
DexesTTP
b797e1e2b9 LibWebView: Move DOMTreeModel to LibWebView
This patch has no functional changes.
2022-05-15 12:17:36 +02:00
DexesTTP
97a67f5501 LibWebView: Move the DumpLayoutTree utility to LibWebView
This patch has no functional changes.
2022-05-15 12:17:36 +02:00
DexesTTP
dcbbbf5b4a LibWebView: Move OutOfProcessWebView to a new LibWebView library
Also moves WebContentClient and the references to the generated IPC
descriptions, since they are all components of OutOfProcessWebView.

This patch has no functional changes.
2022-05-15 12:17:36 +02:00
diogenes
31c0022429 LibGUI: Phrase help action more specifically
Previously the option created by `make_help_action()` was unclear in its
meaning, by renaming the option to 'Manual' this should more
meaningfully represent the effect of the action.
2022-05-15 12:15:51 +02:00
Jelle Raaijmakers
421a80bf43 LibSoftGPU: Update coverage bits after alpha testing
Also skip the test for the `::Always` alpha test function in the hot
loop. This test function is very unlikely to be set, so leave that up
to `::test_alpha()`.
2022-05-15 12:15:12 +02:00
Jelle Raaijmakers
1a338844fa LibSoftGPU: Make Device statistics i64 again
They were erroneously converted into `u64` by me in a previous commit,
causing the overdraw statistic to go haywire.
2022-05-15 12:15:12 +02:00
Paweł Łukasik
26be6176ad TextEditor: Allow typing AltGr+letter into editor
Previous check did not allow AltGr+letter to be used due to
AltGr being emulated as Ctrl+Alt. That caused .ctrl() to be true.

In the new code we check that ctrl() is not set or if it is set,
it is with altgr() and if so, we pass the character into the editor.
2022-05-13 21:16:49 +02:00
ReimarPB
235e977e3a LibWeb: Add window.clientInformation property 2022-05-13 20:50:47 +02:00
Sam Atkins
f8950ea846 LibWeb: Don't treat any empty resources as errors
HTML, CSS, JS and text files (among other things) can all legitimately
be empty. Other types may be invalid, but that will be caught when
trying to parse it as a document, so this check can safely be removed.
2022-05-13 17:12:39 +02:00
Linus Groh
ffc5fed79f PixelPaint: Rebuild FilterGallery tree using TreeViewModel 2022-05-13 16:31:03 +02:00
Linus Groh
5bb38296b1 LibGUI: Add TreeViewModel as a simpler interface for building TreeViews
Having to subclass GUI::Model for even the simplest type of hand-built
TreeView makes them a bit unpleasant to work with at the moment. :^)

This adds such a GUI::Model subclass that is specifically designed for
adding nodes to a TreeView manually, supporting text and an optional
icon by default, and allowing for further data when subclassing the Node
class.
2022-05-13 16:31:03 +02:00
Sam Atkins
80174439a9 Revert "FileManager: Reduce scope of some variables related to context…
menu"

This reverts commit 61dc489778.

This commit was causing FileManager to crash whenever you selected to
open a file using the context menu.
2022-05-13 16:28:36 +02:00
Sam Atkins
cd5210a87a LibGUI: Make Dialog::ScreenPosition an enum class 2022-05-13 16:27:43 +02:00
Sam Atkins
cdffe556c8 LibGUI+Userland: Make Dialog::ExecResult an enum class 2022-05-13 16:27:43 +02:00
Sam Atkins
1f82beded3 LibWeb: Make about:blank load correctly
- Don't treat an empty `about:blank` resource as an error.
- Give `about:` urls a content-type so `FrameLoader::parse_document()`
  won't reject them.
2022-05-13 16:25:33 +02:00
offtkp
61a9ad45ed FileManager: Check for write permission before enabling certain actions
Upon DirectoryView selection change, check for write permission before
enabling delete and cut. This disallows attempting to delete/cut and
paste a file that you don't have write permission to by using keybinds.

Fixes #13983.
2022-05-13 10:02:01 +02:00
DexesTTP
b37379d489 Meta: Move LibWeb's CMake generation script to its own file
This patch has no functional changes, but prepares the CMake script to
be able to handle LibWeb on Lagom.
2022-05-13 09:59:02 +02:00
kleines Filmröllchen
9035d9e845 LibDSP+Piano: Convert DSP APIs to accept entire sample ranges
This has mainly performance benefits, so that we only need to call into
all processors once for every audio buffer segment. It requires
adjusting quite some logic in most processors and in Track, as we have
to consider a larger collection of notes and samples at each step.

There's some cautionary TODOs in the currently unused LibDSP tracks
because they don't do things properly yet.
2022-05-13 00:47:26 +02:00
kleines Filmröllchen
4d65607649 LibDSP: Remove Transport's time counter reference API
This is what the old Transport in Piano had, but as everyone just
references Transport directly, there's no need for it anymore.
2022-05-13 00:47:26 +02:00
kleines Filmröllchen
f23aea0c4b LibDSP: Make the note frequencies an AK::Array instead of a C array
This was a leftover from the early days of Piano, and there's no reason
to leave it that way especially if we want to use more complex
collection APIs in the future.
2022-05-13 00:47:26 +02:00
kleines Filmröllchen
bcb331b862 LibDSP: Improve const correctness 2022-05-13 00:47:26 +02:00
kleines Filmröllchen
4a6ebb8beb LibDSP: Refactor OOP non-functionally
* Don't inherit from Core::Object everywhere, that's overkill. Use
  RefCounted instead.
* Change some constructor visibilites to facilitate the above.
* default-implement all virtual destructors if possible.
* Drive-by include hygiene.
2022-05-13 00:47:26 +02:00
MacDue
3cfa9b63b5 LibWeb: Stop inactive requestAnimationFrame() callbacks from running
Previously requestAnimationFrame() callbacks were registered with a
static global RequestAnimationFrameDriver shared between all windows.
This led to callbacks still running after navigating away from a page
(This could be seen with the WASM GoL demo).

This commit moves the RequestAnimationFrameDriver (now
AnimationFrameCallbackDriver) to be a member of the HTML::Window
object, then uses the 'active document' parameter of
run_animation_frame_callbacks() to run only the active callbacks.
2022-05-13 00:47:16 +02:00
Tim Schumacher
acc9be9f7d LibArchive: Use named members for ZIP general purpose flags
This fixes the faulty bit check that misclassified ZIPs as having
data descriptors.
2022-05-12 22:58:14 +02:00
stelar7
7d6b26e613 LibCrypto: Add Ed25519 2022-05-12 23:47:13 +04:30
stelar7
9aaeaf8a22 LibCrypto: Move Curve25519 related code into separate file 2022-05-12 23:47:13 +04:30
Michał Lach
6a7d3006d7 LibC: Add herror() and hstrerror() 2022-05-12 15:01:32 +02:00
Michał Lach
bc18fa75ec LibC: Make h_errno thread-local 2022-05-12 15:01:32 +02:00
Daniel Bertalan
fd3e3d5e28 LibC+Kernel: Prevent string functions from calling themselves
Most of the string.h and wchar.h functions are implemented quite naively
at the moment, and GCC's pattern recognition pass might realize what we
are trying to do, and transform them into libcalls. This is usually a
useful optimization, but not when we're implementing the functions
themselves :^)

Relevant discussion from the GCC Bugzilla:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102725

This prevents the infamous recursive `strlen`.

A more proper fix would be writing these functions in assembly. That
would likely give a small performance boost as well ;)
2022-05-12 13:12:37 +02:00
Daniel Bertalan
014b9fd709 AK+DHCPClient: Fix false positive gcc 12 warnings
The compiler would complain about `__builtin_memcpy` in ByteBuffer::copy
writing out of bounds, as it isn't able to deduce the invariant that the
inline buffer is only used when the requested size is smaller than the
inline capacity.

The other change is more bizarre. If the destructor's declaration
exists, gcc complains about a `delete` operation causing an
out-of-bounds array access.

error: array subscript 'DHCPv4Client::__as_base [0]' is partly outside
array bounds of 'unsigned char [8]' [-Werror=array-bounds]
   14 |   ~DHCPv4Client() = default;
      |   ^

This looks like a compiler bug, and I'll report it if I find a suitable
reduced reproducer.
2022-05-12 13:12:37 +02:00
Daniel Bertalan
f40b6fbd07 PixelPaint: Fix incorrect use of RefCounted CRTP
I'm not even sure why this worked. How would the compiler know which
type to destruct the FilterInfo object as?

Fixes this janky error from gcc 12:

AK/RefCounted.h:70:13: error: array subscript 0 is outside array bounds
of 'void [56]' [-Werror=array-bounds]
   70 |             delete static_cast<const T*>(this);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-12 13:12:37 +02:00
Sam Atkins
d7190be3a3 DisplaySettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
af01c6be0c TerminalSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
17b41f0d61 MouseSettings: Set window modified state 2022-05-12 13:10:49 +02:00