Commit graph

28721 commits

Author SHA1 Message Date
xSlendiX 6782cf5193 Ports: Add SDL_sound 2021-10-10 15:26:05 -07:00
xSlendiX f573b7b47a Ports: Add libmodplug 2021-10-10 15:26:05 -07:00
Ben Wiederhake e900f94a03 Meta: Run check-markdown as part of 'Azure Linux NoFuzz' 2021-10-10 15:18:55 -07:00
Ben Wiederhake a296f6bb8d Meta: Invoke markdown-checker if available while linting 2021-10-10 15:18:55 -07:00
Ben Wiederhake c06a0bae04 Meta: Fix broken external links
Meta/Lagom/ReadMe.md never had any other name; not sure how that typo
happened.

The link to the non-existent directory is especially vexing because the
text goes on to explain that we don't want such a directory to exist.

Found by running markdown-checker, and 'wget'ing all external links.
2021-10-10 15:18:55 -07:00
Ben Wiederhake 8ff942b5a4 Manpages+markdown-checker: Permit only specific missing files
I can't write these manpages ad-hoc, and in most cases I don't want to
remove the link because it is justified. The hope is that with this
FIXME in place, there is more motivation to write these manpages for
someone who knows enough about them. Or at least we will introduce fewer
dead links in the future, making Help more useful.
2021-10-10 15:18:55 -07:00
Ben Wiederhake 3a9f289dc6 Manpages: Fix broken link to ioctl page
Found by markdown-checker.
2021-10-10 15:18:55 -07:00
Ben Wiederhake 81e1aa0aa3 Manpages: Don't reference non-existing chroot
Chroot exists neither in code nor in documentation. If we add-in the
feature again, it will be simple enough to add it back in to the
documentation. For now, let's clean it up, instead of refering to things
that don't exist.

Found by markdown-checker.
2021-10-10 15:18:55 -07:00
Ben Wiederhake 9df8c31cdc Documentation: Fix broken empty links
The intention seems to be to enable links like:
https://github.com/SerenityOS/serenity/blob/master/Documentation/CodingStyle.md#east-const
However, this has never worked, and is also not how the syntax works.
Because there seems to be no demand for the intended feature (nobody
since 2019 fixed it), this patch removes it.

Found by markdown-checker.
2021-10-10 15:18:55 -07:00
Ben Wiederhake 3f88d65b78 markdown-checker: New tool that checks document links 2021-10-10 15:18:55 -07:00
Ben Wiederhake 50ad294527 AK: Implement a way to resolve relative paths lexically 2021-10-10 15:18:55 -07:00
Ben Wiederhake 24e7196158 LibMarkdown: Implement introspection of the document tree 2021-10-10 15:18:55 -07:00
Ben Wiederhake aca01932bd LibMarkdown: Make href always a String
This already was the case in some sense, but made it very inconvenient
to access it.
2021-10-10 15:18:55 -07:00
Timothy Flynn 597379e864 LibUnicode: Generate and use unique locale-related alias strings
Almost all of these are already in the unique string list.
2021-10-10 22:21:48 +02:00
Timothy Flynn acb7bd917f LibUnicode: Generate and use unique subtag and complex alias strings 2021-10-10 22:21:48 +02:00
Timothy Flynn 3d67f6bd29 LibUnicode: Generate and use unique list-format strings
The list-format strings used for Intl.ListFormat are small, but quite
heavily duplicated. For example, the string "{0}, {1}" appears 6,519
times. Generate unique strings for this data to avoid duplication.
2021-10-10 22:21:48 +02:00
Timothy Flynn f9e605397c LibUnicode: Generate and use a set of unique locale-related strings
In the generated UnicodeLocale.cpp file, there are 296,408 strings for
localizations of languages, territories, scripts, currencies & keywords.
Of these, only 43,848 (14.8%) are actually unique, so there are quite a
large number of duplicated strings.

This generates a single compile-time array to store these strings. The
arrays for the localizations now store an index into this single array
rather than duplicating any strings.
2021-10-10 22:21:48 +02:00
Timothy Flynn 3f0095b57a LibUnicode: Skip unknown languages and territories
Some CLDR languages.json / territories.json files contain localizations
for some lanuages/territories that are otherwise not present in the CLDR
database. We already don't generate anything in UnicodeLocale.cpp for
these anomalies, but this will stop us from even storing that data in
the generator's memory.

This doesn't affect the output of the generator, but will have an effect
after an upcoming commit to unique-ify all of the strings in the CLDR.
2021-10-10 22:21:48 +02:00
Ben Wiederhake 6d99b7b72e Meta: Re-enable warnings for deprecated copies also for Lagom 2021-10-10 21:21:35 +01:00
Ben Wiederhake 0321034c87 Meta: Re-enable warnings for deprecated copies
This used to supress two true-positives, and zero false-positives.

That's good enough in my book to warrant re-activation.
2021-10-10 21:03:27 +01:00
Ben Wiederhake ee18912373 LibGfx: Implement copy-assign for Matrix
This used to generate a warning about using a deprecated copy-assign,
default-generated by the compiler, and deprecated because we hand-
implement the copy-constructor. This warning is correct, since the
default-generated copy-assign may or may not be as efficient as memcpy.

This patch gets rid of the warning, and has either no performance impact
or a slightly positive one. If this turns out to be wrong, we should
probably also fix the copy-constructor.
2021-10-10 21:03:27 +01:00
Ben Wiederhake fd8300e52d Kernel: Declare copy-ability of IOAddressGroup 2021-10-10 21:03:27 +01:00
Timothy Flynn 79707d83d3 LibUnicode: Stop generating large UnicodeData hash map
The data in this hash map is now available by way of much smaller arrays
and is now unused.
2021-10-10 13:49:37 +02:00
Timothy Flynn d83b262e64 LibUnicode: Generate standalone compile-time array for combining class 2021-10-10 13:49:37 +02:00
Timothy Flynn 9f83774913 LibUnicode: Generate standalone compile-time array for special casing
There are only 112 code points with special casing rules, so this array
is quite small (compared to the size 34,626 UnicodeData hash map that is
also storing this data). Removing all casing rules from UnicodeData will
happen in a subsequent commit.
2021-10-10 13:49:37 +02:00
Timothy Flynn da4b8897a7 LibUnicode: Generate standalone compile-time arrays for simple casing
Currently, all casing information (simple and special) are stored in a
compile-time array of size 34,626, then statically copied to a hash map
at runtime. In an effort to reduce the resulting memory usage, store the
simple casing rules in standalone compile-time arrays. The uppercase map
is size 1,450 and the lowercase map is size 1,433. Any code point not in
a map will implicitly have an identity mapping.
2021-10-10 13:49:37 +02:00
Brian Gianforcaro 7defb893a9 LibWeb: Remove dead "outer loop" code in adoption agency algorithm 2021-10-10 13:48:04 +02:00
Brian Gianforcaro 6781d60e3a LibWeb: Use "= default" to declare empty constructors and descructors
A types which have special functions declared with "= default can be
trivially copied. Besides being good practice, the compiler might be
able generate copy and initialize code in a more optimized way.

Found By PVS-Studio: https://pvs-studio.com/en/docs/warnings/v832/
2021-10-10 13:48:04 +02:00
Brian Gianforcaro 027cbe6b89 LibWeb: Optimize CSS::StyleDeclaration for size
We can reduce the amount of padding the compiler adds in order to
ensure data alignment of member variables by ordering the types in
a struct by size in decending order.

Found By PVS-Studio: https://pvs-studio.com/en/docs/warnings/v802/
2021-10-10 13:48:04 +02:00
Brian Gianforcaro 1b00ddf07e LibJS: Optimize PropertyName and StringPrototype for size
We can reduce the amount of padding the compiler adds in order to
ensure data alignment of member variables by ordering the types in
a struct by size in decending order.

Found By PVS-Studio: https://pvs-studio.com/en/docs/warnings/v802/
2021-10-10 13:48:04 +02:00
Brian Gianforcaro d347432a9e LibELF: Use member initialization for AuxiliaryVector::optional_string
When the member is initialized in the constructor body, but also has a
default constructor, you pay for default construction to just throw it
away. In this case a StringView is light weight to initialize, but we
might as well fix all cases we find.

Found by PVS-Studio: https://pvs-studio.com/en/docs/warnings/v818/
2021-10-10 13:48:04 +02:00
Brian Gianforcaro 7b2506c054 Utilities: Fix null deref in groupdel when given a nonexistent group
Found By PVS-Studio
2021-10-10 03:10:05 -07:00
Mustafa Quraish fdfc0d1bac FileManager: Listen for changes to Desktop wallpaper in config
Since there's no global API for being able to just assign a callback
function to config changes, I've made an inline struct in desktop
mode with the sole purpose of checking to see if the Wallpaper
entry has changed, and then updates GUI::Desktop.

It's pretty neat seeing the wallpaper change as soon as you edit the
config file :^)
2021-10-10 01:15:34 -07:00
Andreas Kling 4bf88436cb LibWeb: Handle JS exceptions slightly sooner in CSS.escape() 2021-10-10 02:55:19 +02:00
Ali Mohammad Pur 82da36f129 LibHTTP: Quit the read loop when an incomplete chunk size line is seen
If we don't quit, the underlying socket won't get a chance to do much
other than nothing while we spin in read_while_data_available().
Fixes some possible RS spin (especially seen in Google's cookie consent
page).
2021-10-10 00:27:44 +02:00
Ali Mohammad Pur e8891e6d56 LibTLS: Remove useless ByteBuffer allocation in TLSv12::read_line() 2021-10-10 00:27:44 +02:00
Karol Kosek c8d825e1b3 SpaceAnalyzer: Make files removable depending on directory permissions
Prior this patch, you couldn't remove any files from the context menu
if you didn't have write access to them.

It was incorrect, as the write permission for files means that you can
modify the contents of the file, where for directories it means that
you can create, rename, and remove the files there.
2021-10-09 23:31:01 +02:00
Karol Kosek 2a461704c4 LibCore: Display the correct allocation size in the debug line
Someone named Karol forgot to update this line in #10205..
2021-10-09 23:30:12 +02:00
Linus Groh 01370136ee LibJS: Convert delete_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh f35e268024 LibJS: Convert get_binding_value() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 7652138ce0 LibJS: Convert set_mutable_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh ae397541fb LibJS: Convert initialize_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 2691c65639 LibJS: Convert create_immutable_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 4baf3a91e8 LibJS: Convert create_mutable_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh fbb176c926 LibJS: Convert has_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 617d3cd3d3 LibJS: Convert bind_this_value() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 0aa24f4ce5 LibJS: Convert get_this_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh 4f03138971 LibJS: Convert get_super_base() to ThrowCompletionOr
Also add spec step comments to it while we're here.
2021-10-09 21:53:47 +01:00
Linus Groh a456eae4b1 LibJS: Remove unused FunctionEnvironment::replace_this_binding() 2021-10-09 21:53:47 +01:00
Andreas Kling 3b0da8b28c LibWeb: Add a missing null check in StyleComputer::compute_font() 2021-10-09 16:35:25 +02:00