Commit graph

33350 commits

Author SHA1 Message Date
Idan Horowitz
d49d2c7ec4 AK: Add a consume_until(StringView) overload to GenericLexer
This allows us to skip a strlen call.
2022-01-25 13:41:09 +03:30
James Puleo
10b25d2a57 AK: Implement HashTable::try_ensure_capacity, as used in HashMap
This was used in `HashMap::try_ensure_capacity`, but was missing from
`HashTable`s implementation. No one had used
`HashMap::try_ensure_capacity` before so it went unnoticed!
2022-01-25 09:17:22 +01:00
Andreas Kling
58b5aede65 CrashReporter: Dispatch backtrace progress callbacks on the main thread
We can't fiddle with GUI widgets off the main thread, so let's use
Core::EventLoop::deferred_invoke() to dispatch the work.

The progress bar doesn't visibly update yet, but at least we're not
crashing anymore.
2022-01-25 09:13:40 +01:00
Andreas Kling
d1cea57246 LibThreading: Invoke BackgroundAction completions on origin event loop
We now capture the origin thread's current event loop when setting up
a BackgroundAction and then invoke the on_complete callback on that same
event loop.
2022-01-25 09:13:40 +01:00
Andreas Kling
3bab93c5e7 LibCore: Make Core::s_main_event_loop actually global
This was accidentally per-TU, as it was declared "static" in the header.
2022-01-25 09:13:40 +01:00
Idan Horowitz
8dfd124718 Kernel: Replace String with NonnullOwnPtr<KString> in sys$getkeymap 2022-01-25 08:06:02 +01:00
Lady Gegga
e4878175df Base: Add Arabic characters to font Katica Regular 10
0606, 0607, 0609, 060A, 060B, 060C, 060D, 061B, 0621, 0622,
0623, 0624, 0625, 0626, 0627, 0628, 0629, 062A, 062B, 062C,
062D, 062E, 062F, 0630, 0631, 0632, 0633, 0634, 0635, 0636,
0637, 0638, 0639, 063A, 063B, 063C, 0640, 0641, 0642, 0643,
0644, 0645, 0646, 0647, 0648, 0649, 064A, 064B, 064D, 064E,
0650, 0651, 0652, 0653, 0654, 0655, 0656, 0657, 0658, 0659,
065A, 065B, 0660, 0661, 0662, 0663, 0664, 0665, 0666, 0667,
0668, 0669, 066D, 066E, 067A, 067B, 067C, 067D, 067E, 067F,
0680, 068A, 068C, 068D, 068E, 068F, 0690, 0692, 0694, 0696,
0697, 0698, 0699, 069A, 069B, 069C, 069D, 069E, 069F, 06A1,
06A2, 06A3, 06A4, 06A5, 06A6, 06B1, 06B2, 06B5, 06B6, 06B7,
06B8, 06D2, 06D3, 06F0, 06F1, 06F2, 06F3, 06F4, 06F5, 06F6,
06F7, 06F8, 06F9
https://www.unicode.org/charts/PDF/U0600.pdf
2022-01-25 04:27:32 +00:00
Names4Noobs
a4495bdcba tree: Port to LibMain 2022-01-25 04:26:56 +00:00
Ariel Abreu
790274d4a5 rmdir: Port to LibMain 2022-01-25 02:50:10 +00:00
Ariel Abreu
0fea2203dc rm: Port to LibMain 2022-01-25 02:50:10 +00:00
Fabian INGREMEAU
5f602e39e9 md: Port to LibMain 2022-01-25 00:11:14 +00:00
Fabian INGREMEAU
dff6460373 mv: Port to LibMain 2022-01-25 00:11:14 +00:00
Fabian INGREMEAU
daf7f72ff3 tail: Port to LibMain 2022-01-25 00:11:14 +00:00
Linus Groh
96db8a061b LibJS: Correct FormatTimeZoneOffsetString arg in CreateTemporalTimeZone
This is an editorial change in the Temporal spec (accidentally marked
normative).

See: https://github.com/tc39/proposal-temporal/commit/3039c98
2022-01-25 00:06:49 +00:00
Rummskartoffel
f3341f48e3 less: Fix memory leak when scrolling to EOF 2022-01-24 21:57:58 +00:00
Sam Atkins
fa3c61cf5a LibPDF: Make Filter::decode() return ErrorOr 2022-01-24 22:36:09 +01:00
Sam Atkins
c388a879d7 AK+Userland: Make AK::decode_base64 return ErrorOr 2022-01-24 22:36:09 +01:00
Sam Atkins
f590cd1850 AK+Userland: Make AK::decode_hex() return ErrorOr
This lets us propagate the reason why it failed up to the caller. :^)
2022-01-24 22:36:09 +01:00
Sam Atkins
45cf40653a Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOr
Apologies for the enormous commit, but I don't see a way to split this
up nicely. In the vast majority of cases it's a simple change. A few
extra places can use TRY instead of manual error checking though. :^)
2022-01-24 22:36:09 +01:00
Linus Groh
140f1d9e55 LibJS/Tests: Enable Number.isInteger() test that now passes 2022-01-24 20:39:01 +00:00
Linus Groh
73a43e7cba LibJS: Update ShadowRealm AO parameter declaration notations
This is an editorial change in the ShadowRealm spec.

See: https://github.com/tc39/proposal-shadowrealm/commit/f5013fe
2022-01-24 20:17:07 +00:00
Linus Groh
e20efaa083 LibJS: Let WrappedFunction inherit target name and length
This is a normative change in the ShadowRealm spec.

See: https://github.com/tc39/proposal-shadowrealm/commit/b73a1dc
2022-01-24 20:17:07 +00:00
Linus Groh
886d6c62f9 LibJS: Implement the SetFunctionLength AO 2022-01-24 20:17:07 +00:00
Linus Groh
5b04c49762 LibJS: Implement the SetFunctionName AO 2022-01-24 20:17:07 +00:00
davidot
6fa600fce3 LibJS: Fix the execution context for the bytecode interpreter
Because we now push an execution context when creating the "normal"
interpreter without valid environments we have to check for that case
as well when running the bytecode interpreter.
2022-01-24 19:55:50 +00:00
Tom
a821aa5f50 LibEDID: Fix handling extension maps
We weren't properly iterating the extension blocks and thought we
encountered an unexpected extension map block, when we really should
have just skipped over it.
2022-01-24 19:29:06 +00:00
Tom
18fc54fc34 LibEDID: Fix calculating height and refresh rate for interlaced modes
The vertical values need to be multiplied with 2 for interlaced modes.
2022-01-24 19:29:06 +00:00
Andreas Kling
e04e52186d Kernel: Don't send crash signal to process itself when it has no handler
If there's nobody listening for the crash signal, fall back to the
normal crash path where we get some debug output about what happened.

Thanks to Idan for suggesting the fix.
2022-01-24 17:19:41 +01:00
Sam Atkins
2b3790100a Browser: Convert file-downloading code to Core::Stream :^) 2022-01-24 17:10:01 +01:00
Sam Atkins
de3225a28b LibProtocol: Overload Request::stream_into() to accept a Core::Stream
The code is actually identical to the other stream_into() function.
2022-01-24 17:10:01 +01:00
Sam Atkins
20b4bfc892 Browser: Convert ad-filter loading to Core::Stream :^) 2022-01-24 17:10:01 +01:00
Sam Atkins
ad1f24ecb9 Browser: Convert search-engines file loading to Core::Stream :^)
Wrapped it in a method so we can take advantage of TRY(). I chose not to
make failure here stop the Browser process, but just to cancel loading
any more search engines.
2022-01-24 17:10:01 +01:00
Andreas Kling
0b997b9d35 LibWeb: Resolve a FIXME when determining target of an event handler
For body and frameset events that aren't part of the special handling
sets, just let them through to the element.
2022-01-24 17:09:22 +01:00
Jesse Buhagiar
43ddefec9c Ports: Add Half-Life: Opposing Force port :^) 2022-01-24 17:04:55 +01:00
Lady Gegga
63c5cb120b Base: Add symbols to font Csilla Bold 10
2191, 2196-2199
2022-01-24 17:04:34 +01:00
Lady Gegga
2f3a37b8ad Base: Add symbols to font Csilla Regular 10
2191, 2196-2199, 2015, 2019
2022-01-24 17:04:34 +01:00
Sam Atkins
ae99cbe534 LibWeb: Treat SVG fill/stroke/stroke-width attributes as CSS properties
Rather than having separate systems for the attributes and their CSS
equivalents, we can treat the attributes as presentational hints and
convert them to CSS properties. This means they can be inherited, as
they should. :^)

As noted, the `fill` and `stroke` attributes do not fully match the
`fill` and `stroke` properties. The CSS spec is still an early draft and
not entirely helpful, so we can just pretend they are the same for now.
2022-01-24 17:04:00 +01:00
Sam Atkins
f4ceea2a0e Base: Modify SVG test page to include inherited attributes
Some SVG attributes can be inherited, similarly to CSS properties. This
change moves some attributes from a `<path>` to a parent `<g>` to test
this works.
2022-01-24 17:04:00 +01:00
Sam Atkins
2664b8ae7f LibWeb: Add none as a valid identifier for fill and stroke 2022-01-24 17:04:00 +01:00
electrikmilk
2cea55189d Base: Add more emojis
Adds: U+1F4A9, U+1F6A8, U+1F47F, U+1F49C, U+1F62B, U+1F62F, U+1F63A,
U+1F64C, U+1F64F, U+1F92, U+1F92E, U+1F92F, U+1F470, U+1F494, U+1F499,
U+1F619, U+1F629, U+1F632, U+1F633, U+1F634, U+1F635, U+1F637, U+1F910,
U+1F911, U+1F912, U+1F913, U+1F915, U+1F920, U+1F922, U+1F925, U+1F928,
U+1F929, U+1F970, U+1F975, U+1F976, U+2611
Modifies: U+1F914
2022-01-24 14:54:40 +01:00
Andreas Kling
12932d187e LibWeb: Teach StyleComputer about "Automatic Box Type Transformation"
CSS has rules about automatic blockification or inlinification of boxes
in certain circumstances.

This patch implements automatic blockification of absolutely positioned
and floating elements. This makes the smile appear on ACID2. :^)
2022-01-24 14:44:46 +01:00
Idan Horowitz
16d69376d8 Kernel: Include slabheaps in kmalloc statistics 2022-01-24 14:09:55 +02:00
Idan Horowitz
f39e9b19c6 Kernel: Make DiskCache::ensure OOM-fallible using ErrorOr 2022-01-24 14:09:55 +02:00
Daniel Bertalan
b509d8a2f7 Utilities/readelf: Add support for printing the content of sections 2022-01-24 10:41:47 +00:00
Daniel Bertalan
4055c393fc Toolchain: Add support for building the userland with the mold linker
This commit adds support for building the SerenityOS userland with the
new [mold linker].

This is not enabled by default yet; to link using mold, run the
`Toolchain/BuildMold.sh` script to build the latest release of mold, and
set the `ENABLE_MOLD_LINKER` CMake variable to ON. This option relies on
toolchain support that has been added just recently, so you might need
to rebuild your toolchain for mold to work.

[mold linker]: https://github.com/rui314/mold
2022-01-24 10:41:47 +00:00
Daniel Bertalan
ad649c48da Toolchain: Backport support for the mold linker
The `-fuse-ld=mold` flag was only added in the not-yet-released GCC 12.

Cherry-picked from the following upstream commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ad964f7eaef9c03ce68a01cfdd7fde9d56524868
2022-01-24 10:41:47 +00:00
Daniel Bertalan
bd3ed700f2 Toolchain+Ports: Use the GNU hash format by default
This hash format offers faster symbol lookup than the System V hash.

We've been using it in all our shared libraries for a long time, but did
not have it enabled by default in our toolchain, so ports couldn't make
use of it.
2022-01-24 10:41:47 +00:00
Daniel Bertalan
5576e9c4c5 Kernel+Toolchain: Use .init_array section for global constructors
Before this change, our dynamic linker's global constructor handler
relied on the GNU linker implicitly including the content of `.ctors`
section inside `.init_array`. The mold linker does not do this, so
global constructors would fail to be called in the mold-built userland.

There is no point in sticking to `.ctors`, as most other systems already
use the superior `.init_array` scheme. This commit changes the kernel
linker script to not discard this new section, and enables it by default
in our toolchain.
2022-01-24 10:41:47 +00:00
Kenneth Myhra
eeb74e2578 mktemp: Port to LibMain 2022-01-24 14:01:58 +03:30
Kenneth Myhra
b4d55f2a55 mkfifo: Port to LibMain 2022-01-24 14:01:58 +03:30