Commit graph

46485 commits

Author SHA1 Message Date
MacDue f74e2da875 LibWeb: Implement CanvasRenderingContext2D.createPattern()
This is a first pass at implementing CRC2D.createPattern() and the
associated CanvasPattern object. This implementation only works for a
few of the required image sources [like CRC2D.drawImage()], and does
not yet support transforms. Other than that it supports everything
else (which is mainly the various repeat modes).
2023-02-03 20:36:21 +01:00
MacDue 0c313c586b Meta: Register CanvasPattern as a platform object 2023-02-03 20:36:21 +01:00
MacDue b106fd640b LibWeb: Fix typo and use auto where possible 2023-02-03 20:36:21 +01:00
Timothy Flynn e96df1599c SQLStudio: Display real column names in the results tab 2023-02-03 20:34:45 +01:00
Timothy Flynn 4fe437b4d2 SQLStudio: Separate the script and results tabs with a vertical splitter 2023-02-03 20:34:45 +01:00
Timothy Flynn cb06031180 LibSQL+SQLServer: Send result column names over IPC to SQL clients 2023-02-03 20:34:45 +01:00
Timothy Flynn d6dee8c0e8 LibSQL+Userland: Pass SQL IPC results to clients in a structure
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier
interface for clients to deal with. Though right now, it mostly forwards
values as-is from IPC to the clients. This makes it a bit verbose to add
values to IPC responses, as we then have to add it to the callbacks used
by all clients. It's also a bit confusing seeing a sea of "auto" as the
parameter types for these callbacks.

This patch moves these response values to named structures instead. This
will allow adding values without needing to simultaneously update all
clients. We can then separately handle the new values in interested
clients only.
2023-02-03 20:34:45 +01:00
Timothy Flynn f0441ee16a LibSQL: Store selected column names in the results for SELECT statements 2023-02-03 20:34:45 +01:00
Steffen Rusitschka 198f2945bf Kernel/aarch64: Include Error.h to fix aarch64 missing ErrorOr 2023-02-03 20:26:26 +01:00
Lucas CHOLLET a053807be5 TextEditor: Propagate errors from read_file() 2023-02-03 19:58:41 +01:00
Lucas CHOLLET 3454185d08 TextEditor: Use request_file_read_only_approved for the drop event
This allows TextEditor to open the file without asking for user consent.
2023-02-03 19:58:41 +01:00
Lucas CHOLLET 40f9cf2de6 TextEditor: Port to Core::Stream 2023-02-03 19:58:41 +01:00
Lucas CHOLLET 36e66502c9 grep: Port to Core::Stream
It also adds support for `ErrorOr` in one lambda.
2023-02-03 19:43:41 +01:00
Liav A f354b52099 SystemServer: Propagate errors properly in the main code
To do this properly, we also create Strings with formatting of device
nodes' names, taking into consideration errors when doing that.
Also, we use LibCore System mknod method instead of raw LibC functions
to be able to propagate errors from these calls too.
2023-02-03 19:38:23 +01:00
Staubfinger da1023fcc5 AK: Add thresholds to quickselect_inline and Statistics::Median
I did a bit of Profiling and made the quickselect and median algorithms
use the best of option for the respective input size.
2023-02-03 19:04:15 +01:00
Staubfinger 6b9344e86c AK: Use AK:quickselect_inline to compute AK::Statistics::median
Quick select is an algorithm that is able to find the median
of a Vector without fully sorting it.
This replaces the old very naive implementation
for `AK::Statistics::median()` with `AK::quickselect_inline`
2023-02-03 19:04:15 +01:00
Staubfinger becd6d106f AK: Testing for AK::quickselect_inline
The testing code found here is mainly derived from the Tests for
`AK::quick_sort`.
2023-02-03 19:04:15 +01:00
Staubfinger 607441de56 AK: Implement the quick select algorithm as AK::quickselect_inplace
This adds the quick select algorithm that finds
the kth smallest element for any collection.
Whilst doing so it also partially sorts the collection.
I have also included the option to use different pivoting functions
including median of medians which makes the quick select have
a truely linear time complexity at the costs of enormous overhead,
so this that only really useful for really large datasets.
The same was chosen to reflect the fact that it modifies
the collection in place during the selection process.
2023-02-03 19:04:15 +01:00
Itamar 8fce807b10 Kernel: Fix usermode verification in ptrace with PT_SETREGS
When doing PT_SETREGS, we want to verify that the debugged thread is
executing in usermode.

b2f7ccf refactored things and flipped the relevant check around, which
broke things that use PT_SETREGS (for example, stepping over
breakpoints with sdb).
2023-02-03 17:39:13 +01:00
Cubic Love 85ca19ffd5 Base: Add British English Apple Macintosh keymap
Full support for EN-GB Mac Laptop and Magic Keyboards
2023-02-03 12:50:42 +00:00
Aliaksandr Kalenik ab99e95549 LibWeb: Parse font-stretch CSS property 2023-02-03 12:49:13 +00:00
Sam Atkins 968481c7cd Settings: Change initial window size to fit the current content
Previously, it would open with a scrollbar visible which felt a little
silly. :^)
2023-02-03 12:44:04 +00:00
Sam Atkins 7d0529b89c AK: Remove JsonObject::get_deprecated() and ::get_ptr() :^) 2023-02-03 07:19:52 -05:00
Sam Atkins d48e632696 Utilities/w: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins 8c4abf0ed8 Utilities/route: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins f1f02b33e6 Utilities/pmap: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins 39f3a15022 Utilities/netstat: Replace uses of JsonObject::get_deprecated()/get_ptr 2023-02-03 07:19:52 -05:00
Sam Atkins f14a1da633 Utilities/mount: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins c1d3f39cc4 Utilities/lsusb: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins e8ebbcdbc5 Utilities/lsof: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins 5d8a87bf1f Utilities/lsjails: Replace uses of JsonObject::get_deprecated()/get_ptr 2023-02-03 07:19:52 -05:00
Sam Atkins a04ca015bf Utilities/lsirq: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins 7ce32cb82a Utilities/lscpu: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins 8647743504 Utilities/json: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins f63eaee20c Utilities/ifconfig: Replace uses of JsonObject::get_deprecated()/get_ptr 2023-02-03 07:19:52 -05:00
Sam Atkins 08c26e988a Utilities/fortune: Replace uses of JsonObject::get_deprecated()/get_ptr 2023-02-03 07:19:52 -05:00
Sam Atkins 609a123c43 Utilities/df: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins d4f0cfec7f Utilities/arp: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Federico Guerinoni 9f4bf1b04e Ladybird: Set fixed height for Settings 2023-02-03 05:10:51 -07:00
Federico Guerinoni 17e9db4fa1 Ladybird: Add setting for page to open on new tab 2023-02-03 05:10:51 -07:00
Federico Guerinoni 80da16e54a Ladybird: Design settings layout in horizontal 2023-02-03 05:10:51 -07:00
Zaggy1024 0f45153bbb LibVideo/VP9: Use proper indices for updating inter_mode probabilities
I previously changed it to use the absolute inter-prediction mode
values instead of the ones relative to NearestMv. That caused the
probability adaption to take invalid indices from the counts and broke
certain videos.

Now it will just convert to the PredictionMode enum when returning from
parse_inter_mode, which allows us to still use it the same as before.
2023-02-03 09:10:14 +01:00
Zaggy1024 7b92eff4a6 LibVideo/VP9: Use u32 to store the parsed value counts
There were rare cases in which u8 was not large enough for the total
count of values read, and increasing this to u32 should have no real
effect on performance (hopefully).
2023-02-03 09:10:14 +01:00
Zaggy1024 69e9f9ff63 LibVideo/VP9: Prevent negation overflow in BitStream::read_s 2023-02-03 09:10:14 +01:00
Zaggy1024 f58c5ff569 LibVideo/VP9: Correct the mode/partition probability adaption counts 2023-02-03 09:10:14 +01:00
Zaggy1024 4224f253af LibVideo/VP9: Increase the size of summed boolean counts in merge_probs
This fixes an issue where probabilities that sum to greater than 255
would wrap and cause the maximum probability adaption to take effect.
2023-02-03 09:10:14 +01:00
Timothy Flynn 7c1fe32af3 WebContent: Remove pending file requests before invoking their callbacks
It's currently possible for the callback of a file request to request
more file objects. This could cause the hash map storing these requests
to be rehashed while one of its callbacks is being invoked. AK::Function
explicitly forbids this with an assertion.

Instead, remove the callback from the hash map before invoking the
callback function.
2023-02-02 19:14:00 +00:00
Timothy Flynn 2af7447dfd AK: Define HashMap::take to find and remove a value from the map 2023-02-02 19:14:00 +00:00
Timothy Flynn f31bd190b0 AK: Ensure string types are actually considered hash-compatible
The AnyString concept is currently broken because it checks whether a
StringView is constructible from a type T. The StringView constructors,
however, only accept constant rvalue references - i.e. `T const&`.

This also adds a test to ensure this continues to work.
2023-02-02 19:14:00 +00:00
Timothy Flynn 2f67f2ba3d AK: Return a constant reference from HashMap's constant get() override
We cannot return a mutable reference from a constant function.
2023-02-02 19:14:00 +00:00