Commit Graph

47652 Commits

Author SHA1 Message Date
Kenneth Myhra
03ceca4ca1 AK: Add FlyString::to_deprecated_fly_string()
This adds the conversion function to_deprecated_fly_string() to enable
conversion from new FlyString to DeprecatedFlyString.
2023-03-05 18:25:59 +00:00
Nico Weber
efabfd4c66 LibGfx: Fill in remaining values in built-in sRGB profile
The values aren't 100% self-consistent, but it probably doesn't make
a difference for u8 color data. Good enough for now. See all the links
on #17714 for some more background.
2023-03-05 18:21:43 +00:00
Liav A
be1d7c325a Kernel: Move process coredump metadata modification to the prctl syscall 2023-03-05 16:55:08 +01:00
Sam Atkins
822164a686 LibCMake: Add folding regions to syntax highlighter
This creates folding regions for blocks defined by the following:
- if/elseif/else/endif
- foreach/endforeach
- while/endwhile
- macro/endmacro
- function/endfunction

Since there is no guarantee that each keyword will have a matching
partner, we do our best by looking for the most recent possible start
token matching the current end token. If we find one, we link to it and
drop all the other start-tokens that happened in between. For example,
we would define a folding region for this invalid file like so:

[-] if(TRUE)
 │      while()
 └─ endif()
2023-03-05 16:54:10 +01:00
Sam Atkins
631927470a LibCMake: Treat block, endblock and return as control keywords
I missed these before because they weren't mentioned on the language
description page of the CMake manual.
2023-03-05 16:54:10 +01:00
Timothy Flynn
ca2b030336 LibUnicode: Use binary search for lookups into the generated emoji data
This sorts the array of generated emoji data by code point (first by
code point length, then by code point value). This lets us use a binary
search to find emoji data, rather than the current linear search.

In a profile of scrolling around /home/anon/Documents/emoji.txt, this
reduces the runtime of Gfx::Emoji::emoji_for_code_points from 69.03% to
28.42%. Within that, Unicode::find_emoji_for_code_points reduces from
28.42% to just 1.95%.
2023-03-05 16:44:20 +01:00
Linus Groh
2bc54ae56a LibWeb: Remove unused SourceGenerator mappings 2023-03-05 15:37:33 +00:00
Linus Groh
65b1229dae LibWeb: Don't use C++ name for error messages in generated bindings 2023-03-05 15:37:33 +00:00
Linus Groh
a430d78843 LibWeb: Use 'Base::initialize()' in generated bindings 2023-03-05 15:37:33 +00:00
Liav A
39de5b7f82 Kernel: Actually check Process unveil data when creating perfcore dump
Before of this patch, we looked at the unveil data of the FinalizerTask,
which naturally doesn't have any unveil restrictions, therefore allowing
an unveil bypass for a process that enabled performance coredumps.

To ensure we always check the dumped process unveil data, an option to
pass a Process& has been added to a couple of methods in the class of
VirtualFileSystem.
2023-03-05 15:15:55 +00:00
Dan Klishch
882dcfaddb AK+LibAudio: Remove UFixedBigInt::my_size 2023-03-05 13:49:43 +01:00
Liav A
11a7e21c2a Kernel+Userland: Add support for using the PCSpeaker with various tones 2023-03-05 08:38:29 +00:00
Dan Klishch
2d27c98659 AK: Implement Knuth's algorithm D for dividing UFixedBigInt's 2023-03-04 22:10:03 -07:00
Dan Klishch
2470fab05e AK: Delete unused and untested sqrt, pow and pow_mod from UFixedBigInt 2023-03-04 22:10:03 -07:00
Dan Klishch
8f8e31e780 AK+LibCrypto: Delete 64x64 wide multiplication workarounds
Now UFixedBigInt exposes API to do wide multiplications of this kind
efficiently.
2023-03-04 22:10:03 -07:00
Dan Klishch
67ec347bfa AK: Rewrite UFixedBigInt using the framework from BigIntBase.h 2023-03-04 22:10:03 -07:00
Dan Klishch
e132570284 AK: Introduce "BigIntBase.h" for common simple operations on big ints 2023-03-04 22:10:03 -07:00
Dan Klishch
2a6f5ff441 AK: Move compiletime_fail to StdLibExtras.h
This function will be used in the next commit in "BigIntBase.h".
2023-03-04 22:10:03 -07:00
nipos
1fec1741b9 Documentation: Add Ladybird build instructions for OpenIndiana 2023-03-04 21:34:54 -07:00
nipos
e35a858bde AK: Remove signbit definition to prevent conflict in FixedPoint 2023-03-04 21:34:54 -07:00
nipos
aa9f1ee889 AK: Add support for Solaris to StackInfo 2023-03-04 21:34:54 -07:00
nipos
f8ed51e5dc LibCore: Add support for Solaris in anon_create 2023-03-04 21:34:54 -07:00
nipos
1dbc9bcc0b LibWeb: Add Solaris/SunOS platform string to ResourceLoader 2023-03-04 21:34:54 -07:00
nipos
d6fd97e8fb Meta: Link to libnsl and libsocket on Solaris in Lagom CMakeLists 2023-03-04 21:34:54 -07:00
nipos
72accd3a24 LibCore: Don't use execvpe on Solaris 2023-03-04 21:34:54 -07:00
nipos
dcb95dba17 LibCore: Refer to type utsname as struct on Solaris 2023-03-04 21:34:54 -07:00
nipos
8687dae0ca LibCore: Use non-const char * for sethostname on Solaris 2023-03-04 21:34:54 -07:00
nipos
cdd1c8d0d9 LibCore: Implement socket credentials for Solaris 2023-03-04 21:34:54 -07:00
nipos
9139515aed LibCore: Include sys/filio.h for file-related ioctls on Solaris 2023-03-04 21:34:54 -07:00
nipos
50e663f561 LibCore: Use SIG_TYP instead of sig_t for signals on Solaris 2023-03-04 21:34:54 -07:00
nipos
d65c912c09 AK: Add Solaris to platform detection 2023-03-04 21:34:54 -07:00
Lucas CHOLLET
7ddf9e9177 Tests: Replace test image with my own creation 2023-03-04 23:39:41 +00:00
Lucas CHOLLET
68cd6f5614 Tests: Add a test for SOF2 images with only spectral selection
You can generate one by using `cjpeg` with the -scan argument.

This image has been generated with the following scan file:
0 1 2: 0 0 0 0;
0: 1 9 0 0;
2: 1 63 0 0 ;
1: 1 63 0 0 ;
0: 10 63 0 0;
2023-03-04 23:39:41 +00:00
Lucas CHOLLET
89e8f4692d LibGfx: Don't reject SOF2 JPEGs that don't use spectral approximation
Precisely, we now accept every SOF2 image but error on scans that has a
spectral approximation parameter different of 0.
2023-03-04 23:39:41 +00:00
Lucas CHOLLET
342c94c4d7 LibGfx/JPEG: Check for element presence in HashMaps before dereferencing
This patch replaces vague checks with more precise ones and uses `get`
instead of `find` to retrieve an element of a hashmap.
2023-03-04 23:39:41 +00:00
Lucas CHOLLET
18064fdb92 LibGfx/JPEG: Don't call add_ac if not necessary
Calling it was harmless as add_ac iterates over the spectral selection,
hence it won't do anything if not needed. However, this patch remains
useful as it prevents dereferencing the iterator returned by find, in
case the AC table isn't defined yet. This case happens with SOF2 images
and is (pretty harmless as read only but still) undefined behavior.
2023-03-04 23:39:41 +00:00
Lucas CHOLLET
1926a86336 LibGfx/JPEG: Support End-Of-Bands run
This patch brings support for SOF2 JPEGs that only use spectral
selection :^)

We still don't have achieved full support for SOF2 images, but as an
example, we decode progressive JPEG from Cloudinary.
2023-03-04 23:39:41 +00:00
Lucas CHOLLET
e5385cdf24 LibGfx/JPEG: Link the actual chapter instead of the summary section 2023-03-04 23:39:41 +00:00
Lucas CHOLLET
6b8b45c8a3 LibGfx/JPEG: Replace magic numbers with their specified name 2023-03-04 23:39:41 +00:00
Linus Groh
bfe0df5677 LibWeb/HTML: Add missing SecurityError checks to Location 2023-03-04 23:27:08 +00:00
Linus Groh
0b8ebfb618 LibWeb/HTML: Replace ThrowCompletionOr with ExceptionOr in Location
The former should not be used in LibWeb unless required due to
overriding a JS::Object virtual method, for example.
2023-03-04 23:27:08 +00:00
Linus Groh
7d50be0b09 LibWeb/HTML: Port Location to new String 2023-03-04 23:27:08 +00:00
Linus Groh
7800276c0f LibWeb/Infra: Port serialize_javascript_value_to_json_string() to String 2023-03-04 23:27:08 +00:00
Linus Groh
93ed1b59c8 LibWeb/Infra: Port strip_and_collapse_whitespace() to new String 2023-03-04 23:27:08 +00:00
Linus Groh
f65cbeef5c LibWeb/Infra: Rename to_ascii_{{lower,upper}_case => {lower,upper}case} 2023-03-04 22:42:42 +00:00
Nico Weber
85507b34d7 icc: Introduce --name flag to load a built-in profile by name
...instead of from a file.

For now, `--name=sRGB` is the only valid value, but more will
probably follow in the future.

Just `icc --name=sRGB` prints the built-in sRGB profile.

`icc --name=sRGB --reencode-to=file.icc` writes it to file.icc.
2023-03-04 21:38:47 +00:00
Nico Weber
0ba532e14e LibGfx: Add a function to create an in-memory sRGB profile
This might be useful for converting data from arbitrary profiles to
sRGB.

For now, this only encodes the transfer function and puts in zero values
for chromaticities, whitepoint, and chromatic adaptation matrix.
This makes the profile unusable for now. But I've spent a very long time
reading things and need to check in some code, and it's some progress.

The encoded transfer function exactly matches the one in GIMP's built-in
sRGB ICC profile (but not the Compact-ICC-Profiles v4 one or the
RawTherapee v4 one -- I'll add a comment about why later.)
2023-03-04 21:38:47 +00:00
Nico Weber
8f415e7b21 LibGfx: Introduce ICC::Profile::create
This can be used to programmatically create ICC::Profile objects.
2023-03-04 21:38:47 +00:00
Ryan Liptak
130a84d830 Base: Add 14 new emojis
🏈 U+1F3C8 - American Football
🏉 U+1F3C9 - Rugby Football
🗿 U+1F5FF - Moai
🦵 U+1F9B5 - Leg
🧺 U+1F9FA - Basket
🤞 U+1F91E - Crossed Fingers
🤟 U+1F91F - Love-You Gesture
🖖 U+1F596 - Vulcan Salute
🫦 U+1FAE6 - Biting Lip
🫰 U+1FAF0 - Hand with Index Finger and Thumb Crossed
🫵 U+1FAF5 - Index Pointing at the Viewer
 U+26BD - Soccer Ball
☝ U+261D - Index Pointing Up
2023-03-04 15:53:06 +00:00
Andrew Kaster
9fb781d7db Base+Meta: Remove invalid symlinks from Base for more and env
These symlinks' only purpose was to be copied into the rootfs along with
the rest of Base. Instead of storing symlinks to files that either
don't exist in the Base directory, or point to an absolute path outside
of the serenity folder, move these symlinks into the
build-root-filesystem.sh script.
2023-03-04 15:18:57 +01:00