Commit Graph

28644 Commits

Author SHA1 Message Date
Andreas Kling
406d3199d0 LibJS: Add a way to save/restore the entire execution context stack
This will be used by LibWeb to squirrel away the stack while performing
a microtask checkpoint in some cases. VM will simply consider saved
execution context stacks as GC roots as well.
2021-10-03 16:42:34 +02:00
Luke Wilde
17e56661db LibWeb: Have CSSStyleRule inherit from CSSRule in IDL
This also allows removing the cssText attribute being on CSSStyleRule.
2021-10-03 16:39:17 +02:00
sw1tchbl4d3
fc2ed732df CrashReporter: Don't crash when "Generating..." Window gets closed 2021-10-03 16:16:57 +02:00
davidot
1bc945860d Everywhere: Use my awesome new serenityos email :^) 2021-10-03 13:53:47 +01:00
Andreas Kling
97ea277f8f LibWeb: Pass the correct timestamp to requestAnimationFrame callbacks
The timestamp needs to be consistent with the "current high resolution
time" as reflected by window.performance.now
2021-10-03 13:36:40 +02:00
Andreas Kling
5cf439cce0 LibWeb: Run setTimeout() and setInterval() callbacks as HTML tasks
We now invoke DOM timer callbacks via HTML tasks. This brings callback
sequencing closer to the spec, although there are still many
imperfections in this area.
2021-10-03 13:36:40 +02:00
Brian Gianforcaro
9d17070047 Kernel: Fix copy paste in VirtIO::RNG::class_name()
Ben noticed this copy paste error during code review.

Co-authored-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
2021-10-03 13:36:10 +02:00
Brian Gianforcaro
40a58f1fd4 Kernel: Remove unused partition name API
I was about to convert this to use KString, but then I realized it
wasn't actually used at all, so lets remove it until the day it is
needed.
2021-10-03 13:36:10 +02:00
Brian Gianforcaro
54a2aaaa6f Kernel: Remove now unused StorageDevice constructor 2021-10-03 13:36:10 +02:00
Brian Gianforcaro
70ad18fbcd Kernel: Remove most String usage from storage_name() API
This change is another minor step towards removing `AK::String` from
the Kernel. Instead of dynamically allocating the storage_name we can
instead allocate it via a KString in the factory for each device, and
then push the device name down into the StorageDevice base class.

We don't have a way of doing `AK::String::formatted(..)` with a KString
at the moment, so cleaning that up will be left for a later day.
2021-10-03 13:36:10 +02:00
Brian Gianforcaro
3a945051fc Kernel: Use operator ""sv in all purpose() implementations
Previously there was a mix of returning plain strings and returning
explicit string views using `operator ""sv`. This change switches them
all to standardized on `operator ""sv` as it avoids a call to strlen.
2021-10-03 13:36:10 +02:00
Brian Gianforcaro
5f1c98e576 Kernel: Use operator ""sv in all class_name() implementations
Previously there was a mix of returning plain strings and returning
explicit string views using `operator ""sv`. This change switches them
all to standardized on `operator ""sv` as it avoids a call to strlen.
2021-10-03 13:36:10 +02:00
Brian Gianforcaro
836c22ea13 Kernel: Remove AK::String usage from Storage/StorageManagement.cpp 2021-10-03 13:36:10 +02:00
Brian Gianforcaro
7f88d5058e Kernel: Remove AK::String usage from Storage/IDEChannel.cpp 2021-10-03 13:36:10 +02:00
Tim Schumacher
4302e7ac26 Tests: Add tests for mbrtowc 2021-10-03 11:13:50 +00:00
Tim Schumacher
67a579aab0 AK: Add a basic formatter for wchar_t 2021-10-03 11:13:50 +00:00
Tim Schumacher
4ef3ed4ba3 LibC: Implement mbrtowc closer to POSIX 2021-10-03 11:13:50 +00:00
Tim Schumacher
e7f99edefa Tests: Add a test for mbsinit 2021-10-03 11:13:50 +00:00
Tim Schumacher
212f9308d4 LibC: Specifically clear only stored bytes after successful mbrtowc 2021-10-03 11:13:50 +00:00
Tim Schumacher
06f30943ef LibC: Manually count stored bytes in mbstate_t
This is probably a bit faster than constantly having to look through all
stored bytes. It also helps when we are trying to store actual null
bytes.
2021-10-03 11:13:50 +00:00
Tim Schumacher
3c807402b3 LibC: Remove the mbstate_reset helper
A zero-initialized mbstate_t struct has to be a valid initial state, so
we can just zero-initialize it whenever we need to reset.

Having a helper function for resetting the struct might imply that you
can add additional setup operations afterwards, which is not the case.
2021-10-03 11:13:50 +00:00
Ali Mohammad Pur
ab46864674 LibTLS: Split large application data packets into chunks
Each TLS record has a limited max size, we should respect that and split
the packets.
Fixes RecordOverflow errors when a packet larger than 18432 bytes is
sent over.
2021-10-03 14:42:00 +03:30
Tim Schumacher
c3b14588ec LibC: Stub out swprintf 2021-10-03 05:28:51 +00:00
Tim Schumacher
e82dc7c77a LibC: Stub out wcstold 2021-10-03 05:28:51 +00:00
Tim Schumacher
893d9e8741 LibC: Stub out wcstod 2021-10-03 05:28:51 +00:00
Tim Schumacher
e0548692ac LibC: Stub out wcstof 2021-10-03 05:28:51 +00:00
Tim Schumacher
783ddd261d LibC: Stub out wcstoull 2021-10-03 05:28:51 +00:00
Tim Schumacher
a65f52d8de LibC: Stub out wcstoul 2021-10-03 05:28:51 +00:00
Tim Schumacher
05b283f552 LibC: Implement wmemmove 2021-10-03 05:28:51 +00:00
Tim Schumacher
fa1208edfd LibC: Implement wmemset 2021-10-03 05:28:51 +00:00
Tim Schumacher
485c0ef691 LibC: Implement wmemcpy 2021-10-03 05:28:51 +00:00
Tim Schumacher
0ca1df4dc6 LibC: Implement wmemchr 2021-10-03 05:28:51 +00:00
Tim Schumacher
5ac2e84264 LibC: Implement wcsstr 2021-10-03 05:28:51 +00:00
Tim Schumacher
1b078f87b7 LibC: Implement wcspbrk 2021-10-03 05:28:51 +00:00
Ali Mohammad Pur
c80b65b827 LibRegex: Avoid creating a new temporary RegexStringView in Char compare
Instead of making a new string to compare against, simply grab the first
code unit of the input and compare against that.
2021-10-03 01:15:17 +02:00
Luke Wilde
6a7739c645 LibWeb: Convert Node.childNodes to NodeList
This changes the old child_nodes implementation to children_as_vector
so that can still be used in insert_before.
2021-10-03 00:18:52 +02:00
Luke Wilde
2f7fb1fe63 LibWeb: Convert ParentNode.querySelectorAll to NodeList 2021-10-03 00:18:52 +02:00
Luke Wilde
8d6db36cbb LibWeb: Add support for NodeList
This introduces 3 classes: NodeList, StaticNodeList and LiveNodeList.
NodeList is the base of the static and live versions. Static is a
snapshot whereas live acts on the underlying data and thus inhibits
the same issues we have currently with HTMLCollection.

They were split into separate classes to not have them weirdly
mis-mashed together.

The create functions for static and live both return a NNRP to the base
class. This is to prevent having to do awkward casting at creation
and/or return, as the bindings expect to see the base NodeList only.
2021-10-03 00:18:52 +02:00
Luke Wilde
bfd089fbd1 LibWeb: Add support for IDL value iterators
This also renames Interface::iterator_types to pair_iterator_types to
reduce confusion between value and pair iterators.
2021-10-03 00:18:52 +02:00
Nico Weber
2c0d329bf6 Kernel: Make aarch64 UART::print_num() print u64s 2021-10-02 21:23:28 +01:00
Nico Weber
bc213ad7a2 Kernel: Add a Timer class for aarch64
For now, this can only query microseconds since boot.

Use this to print a timestamp every second. This busy-loops
until a second has passed. This might be a good first use of
interrupts soon.

qemu used to not implement this timer at some point, but
it seems to work fine even in qemu now (qemu v 5.2.0).
2021-10-02 21:23:28 +01:00
Linus Groh
496d2e3c29 LibGL: Remove duplicate GLboolean typedef
Fixes #10268.
2021-10-02 21:10:13 +01:00
Jelle Raaijmakers
06f84d927e Ports: Add Ncdu 2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
718b205a9e Base: Correct value for default white terminal color 2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
49ccda5d97 LibVT: Implement G0..G3 and VT100 translation table 2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
aaa1382bd6 LibVT: Implement support for Cursor Keys Mode (DECCKM) 2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
e33e0e6a27 LibVT: Add stubs for DECPNM, DECPAM
Still not implemented, but provides easier to grasp FIXMEs.
2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
91ad7754fe Ports: Compile ncurses with --enable-term-driver
In commit ba97548686 `--with-termlib` was added to produce a
`libtinfo.a` file that nano then required. However, this causes ncurses
to build with _only_ screen-pointer ext funcs: e.g.
`reset_prog_mode_sp` exists, but `reset_prog_mode` does not.

By switching to `--enable-term-driver`, all functions are properly
exported again and the nano port compiles and runs just fine. :^)
2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
8487ff551c Ports: Switch ncurses to SHA256 auth type 2021-10-02 21:07:47 +01:00
Gal Horowitz
cfc5df27f0 FontEditor: Close preview window when the main window is closed 2021-10-02 20:55:14 +02:00