Commit graph

45369 commits

Author SHA1 Message Date
Jelle Raaijmakers
62092a329d LibGL: Make GLsizeiptr signed
The Khronos description of a "non-negative binary integer" does not mean
an unsigned type, just that it should not be negative.
2023-01-03 18:11:37 +01:00
Linus Groh
e7627af555 Meta: Add CODEOWNERS file
These are the areas of the system where I'd like GitHub to inform me
about changes, other maintainers are of course free to add themselves.

Subscribing to all notifications and using email filters is no longer
practical :^)

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2023-01-03 12:10:56 -05:00
Srikavin Ramkumar
56efd60755 LibWeb: Add stub reset algorithm for HTMLOutputElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
119e58a8c1 LibWeb: Add stub reset algorithm for HTMLTextAreaElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
b55c9f36dc LibWeb: Implement reset algorithm for HTMLSelectElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
de44e0faf5 LibWeb: Implement reset algorithm for HTMLInputElement 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
6032d122c2 LibWeb: Implement reset button behavior 2023-01-03 18:09:40 +01:00
Srikavin Ramkumar
7cc6ffe5b7 LibWeb: Implement HTMLFormElement::reset
This patch sets up the necessary infrastructure for implementing reset
algorithms for form-associated controls.
2023-01-03 18:09:40 +01:00
MacDue
2376385f0c LibGfx: Improve AA stroke_path() line intersections a little
- Simplify both straight lines case
- Simplify rotation by constant 90 degrees
- Remove some unnecessary rounding and hacks
2023-01-03 18:08:22 +01:00
MacDue
d140d0f880 LibGfx: Add Rect::translated(dboth)
This corresponds to the current in place Rect::translate_by(dboth).
2023-01-03 18:08:22 +01:00
Vetrox
5080126095 LibWeb: CSS don't set resolve-failures (var/attr)
Previously when resolving an attr or var-defined property
with a 'not-set' value like this `property: var(--ValueNotSet)`,
we left the property unchanged (as an unresolved) and
added it to the computed-style of the element.
We still don't change the property but rather we now also don't set
unresolved properties in the computed-style.
This is an intended behavior.

The specification suggests that, on resolving an attr or var property
(custom properties) we have an invalid property when neither the
variable inside the var, nor the backup value could be resolved.

An invalid property must be inherited or defaulted depending on it's
type. We already do this with every 'untouched'
(as in m_property_values contains no entry for it) value.
So not setting the property results in an inherited (or initial)
value by a later-called function.

This also fixes another problem, where
`text-decoration: var(--NotSet)`
wouldn't be inherited because the computed-style of the
parent element hasn't set `text-decoration` but rather
all it's long-versions like `text-decoration-line` and so on.
2023-01-03 18:07:28 +01:00
kleines Filmröllchen
b36d09bab0 Documentation: Document fix for missing /etc/mtab
/etc/mtab is identical to /proc/self/mounts, but it does not exist under
many circumstances, e.g. chroot'ed or in WSL. The fact that many
userspace programs rely on this file existing and the user needing to
create symlinks manually has been a long-standing issue (there's pretty
old forum posts on Debian and Arch Linux forums about it), but it's not
fixed upstream. This short mention should save people some time.
2023-01-03 18:02:16 +01:00
Vetrox
2afe9f574e Documentation: Add Neovim configuration documentation 2023-01-03 17:59:08 +01:00
Lucas CHOLLET
2eeaba3f1d LibGfx: Use the Midpoint Ellipse Algorithm for filled ellipses 2023-01-03 17:58:11 +01:00
Lucas CHOLLET
d2372464a2 LibGfx: Put the Midpoint Ellipse Algorithm in its own function 2023-01-03 17:58:11 +01:00
Timothy Flynn
9c5915b5b4 Screensaver: Add a screensaver launcher application
Similar to the Settings application, this adds a single Screensaver
application to launch all screensaver demos. This is to declutter the
taskbar menu a bit.
2023-01-03 17:56:55 +01:00
Timothy Flynn
3d6b0e60ca LibDesktop+Taskbar: Add an option to exclude apps from the system menu
We currently hard-code excluding Settings apps from the system menu.
This adds an "ExcludeFromSystemMenu" option to the AppFile configuration
to selectively exclude these apps, which all Settings app now set.

This is to allow selectively excluding a few Demo apps in a future
commit.
2023-01-03 17:56:55 +01:00
Timothy Flynn
10bf86de2c Demos: Rename Screensaver to GradientScreensaver
This is to avoid naming conflicts with an upcoming Screensaver launcher
application.
2023-01-03 17:56:55 +01:00
BodilessSleeper
1f1b2f4d26 LibJS: Rename ToPositiveInteger -> ToPositiveIntegerWithTruncation
This commit ticks away one of the boxes in #15525
Temporal commit: tc39/proposal-temporal@768b916
2023-01-03 17:53:51 +01:00
BodilessSleeper
4e6beaabcb LibJS: Update comments in Temporal/Calendar.cpp
This commit ticks away one of the boxes in #15525
Temporal commit: tc39/proposal-temporal@08cc0fb
2023-01-03 17:53:51 +01:00
Timothy Flynn
ee95cb37cd LibGUI: Don't highlight extension text when saving files with FilePicker
By default, only highlight the base name of the file to-be-saved. When
the file includes an extension, it's useful to be able to just start
typing a file name without having to manually de-select the extension
(or having to rewrite the extension).
2023-01-03 11:50:18 -05:00
Andreas Kling
0fe4f4fe53 Demos: Remove "Cube" application
This wasn't doing anything interesting enough to justify being its own
demo application. If we need a spinning cube, we can just load a cube
model into 3DFileViewer. :^)
2023-01-03 15:43:10 +01:00
Davide Cavalca
1fc7740152 Ladybird: Install SQLServer binary
Install the SQLServer binary added in 2cb3ae1 so that it's actually
available on the target system when doing a standalone build of
Ladybird.
2023-01-03 09:32:07 -05:00
Andreas Kling
555d7a6fce LibGfx: Make Font::glyph_width*() APIs return float 2023-01-03 15:25:02 +01:00
Andreas Kling
3407ab0fd1 LibGfx: Make Font::width() return a float 2023-01-03 15:25:02 +01:00
Andreas Kling
b9d2b8f7b2 LibGfx: Adjust ClassicWindowTheme titlebar height calculation
Use the Font::pixel_size() as reference, and put a little less vertical
padding around the text at sizes above the palette limit.
2023-01-03 15:25:02 +01:00
Andreas Kling
268d661138 LibGfx: Make ClassicWindowTheme menubar heights respect the font size 2023-01-03 15:25:02 +01:00
Andreas Kling
bfa7381852 LibGfx: Make Font::pixel_size() return a float
Here's yet another place where we were chopping of decimals.
2023-01-03 15:25:02 +01:00
Andreas Kling
09a125bcab LibGfx/Font: Make Glyph metrics floating point 2023-01-03 15:25:02 +01:00
Andreas Kling
8cea9fe56d LibGfx/Font: Make ScaledGlyphMetrics floating point
By rounding the scaled glyph metrics, we were losing valuable precision,
especially at smaller sizes.
2023-01-03 15:25:02 +01:00
Andreas Kling
15b920c730 WindowServer: Write new config to disk when system fonts are changed
This makes system font changes actually persist across reboots.
2023-01-03 15:25:02 +01:00
Andreas Kling
f4168be700 WindowServer: Only load /etc/WindowServer.ini once and keep it loaded
Instead of opening and reparsing WindowServer.ini at random occasions,
just keep the file open after loading it in serenity_main().

This avoids a bunch of unnecessary work, and also fixes an issue where
WindowManager::m_config might re-write stale values to disk.
2023-01-03 15:25:02 +01:00
martinfalisse
481c0419ba LibGUI: Fix highlighting of elements in TreeView
Previously, incorrect items were highlighted when hovering over
elements in TreeView when there was a column header.
2023-01-03 12:46:51 +00:00
networkException
4c7a99fe06 Ladybird: Remove separate LICENSE file
Since ladybird is part of the serenity monorepo now there's no need to
keep a separate LICENSE file around :^)
2023-01-03 12:37:18 +01:00
Tim Schumacher
9818766742 LibCompress: Port ZlibCompressor to Core::Stream 2023-01-03 10:01:09 +00:00
Tim Schumacher
f0b035b66c LibCompress: Switch ZlibCompressor to a constructor pattern
We don't have anything fallible in the constructor yet, but what's there
should be fallible and once we switch to Core::Stream it will be
fallible.
2023-01-03 10:01:09 +00:00
Tim Schumacher
23a9d62f39 LibCompress: Rename Compress::Zlib to Compress::ZlibDecompressor
Because that's what it is, even if it mainly relies on
`DeflateDecompressor` to do the heavy lifting.
2023-01-03 10:01:09 +00:00
Tim Schumacher
edd004fe90 Tests: Add a simple compression test for Zlib 2023-01-03 10:01:09 +00:00
Tim Schumacher
dd948b046c LibCore: Add Stream::WrapInAKOutputStream 2023-01-03 10:01:09 +00:00
Baitinq
bd65ecf05c PixelPaint: Cleanup the Image class
This patch just introduces some general cleanup regarding unused
imports and adding the const qualifier to eligible functions and
variables.
2023-01-03 09:58:02 +00:00
Baitinq
e89c649be1 PixelPaint: Propagate errors in {flip,crop,rotate,resize} functions
We now propagate errors when using the {Layer,Image}::flip(),
{Layer,Image}::crop(), {Layer,Image}::rotate() and
{Layer,Image}::resize() functions.

We handle these errors by show an error DialogBox with the error's
message.

This removes 8 FIXMEs:))
2023-01-03 09:58:02 +00:00
Ben Wiederhake
65b420f996 Everywhere: Remove unused includes of AK/Memory.h
These instances were detected by searching for files that include
AK/Memory.h, but don't match the regex:

\\b(fast_u32_copy|fast_u32_fill|secure_zero|timing_safe_compare)\\b

This regex is pessimistic, so there might be more files that don't
actually use any memory function.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
6b7ce19161 Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:

\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
f07847e099 Everywhere: Remove unused includes of AK/Concepts.h
These instances were detected by searching for files that include
AK/Concepts.h, but don't match the regex:

\\b(AnyString|Arithmetic|ArrayLike|DerivedFrom|Enum|FallibleFunction|Flo
atingPoint|Fundamental|HashCompatible|Indexable|Integral|IterableContain
er|IteratorFunction|IteratorPairWith|OneOf|OneOfIgnoringCV|SameAs|Signed
|SpecializationOf|Unsigned|VoidFunction)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any concepts.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
c2a900b853 Everywhere: Remove unused includes of AK/StdLibExtras.h
These instances were detected by searching for files that include
AK/StdLibExtras.h, but don't match the regex:

\\b(abs|AK_REPLACED_STD_NAMESPACE|array_size|ceil_div|clamp|exchange|for
ward|is_constant_evaluated|is_power_of_two|max|min|mix|move|_RawPtr|RawP
tr|round_up_to_power_of_two|swap|to_underlying)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any "extra stdlib" functions.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
0bde4e66fa Piano: Remove unused include of AK/StdLibExtraDetails.h
This instance was detected by searching for files that include
AK/StdLibExtraDetails.h, but don't match the regex:

\\b(AddConst|__AddConstToReferencedType|AddConstToReferencedType|AddLval
ueReference|__AddReference|AddRvalueReference|__AssertSize|AssertSize|__
CommonType|CommonType|__Conditional|Conditional|CopyConst|__Decay|Decay|
declval|DependentFalse|FalseType|__IdentityType|IdentityType|IndexSequen
ce|IntegerSequence|IntegralConstant|IsArithmetic|IsAssignable|IsBaseOf|I
sCallableWithArguments|IsClass|IsConst|IsConstructible|IsConvertible|IsC
opyAssignable|IsCopyConstructible|IsDestructible|IsEnum|__IsFloatingPoin
t|IsFloatingPoint|IsFunction|IsFundamental|IsHashCompatible|__IsIntegral
|IsIntegral|IsLvalueReference|IsMoveAssignable|IsMoveConstructible|IsNul
lPointer|IsOneOf|IsOneOfIgnoringCV|IsPOD|IsPointer|__IsPointerHelper|IsP
ointerOfType|IsRvalueReference|IsSame|IsSameIgnoringCV|IsSigned|IsSpecia
lizationOf|IsTrivial|IsTriviallyAssignable|IsTriviallyConstructible|IsTr
iviallyCopyable|IsTriviallyCopyAssignable|IsTriviallyCopyConstructible|I
sTriviallyDestructible|IsTriviallyMoveAssignable|IsTriviallyMoveConstruc
tible|IsUnion|IsUnsigned|IsVoid|MakeIndexSequence|MakeIntegerSequence|ma
ke_integer_sequence_impl|__MakeSigned|MakeSigned|__MakeUnsigned|MakeUnsi
gned|__RemoveConst|RemoveConst|RemoveCV|RemoveCVReference|__RemovePointe
r|RemovePointer|__RemoveReference|RemoveReference|__RemoveVolatile|Remov
eVolatile|TrueType|UnderlyingType|Void|VoidType)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any "detailed extra stdlib" functions.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
6fd478b6ce Everywhere: Remove unused includes of AK/Format.h
These instances were detected by searching for files that include
AK/Format.h, but don't match the regex:

\\b(CheckedFormatString|critical_dmesgln|dbgln|dbgln_if|dmesgln|FormatBu
ilder|__FormatIfSupported|FormatIfSupported|FormatParser|FormatString|Fo
rmattable|Formatter|__format_value|HasFormatter|max_format_arguments|out
|outln|set_debug_enabled|StandardFormatter|TypeErasedFormatParams|TypeEr
asedParameter|VariadicFormatParams|v_critical_dmesgln|vdbgln|vdmesgln|vf
ormat|vout|warn|warnln|warnln_if)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any formatting functions.

Observe that this revealed that Userland/Libraries/LibC/signal.cpp is
missing an include.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
345662d617 Userland: Remove unused includes of AK/Math.h
These instances were detected by searching for files that include
Kernel/Debug.h, but don't match the regex:

\\b(acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|cos|cosh|E|exp|exp2
|fabs|fmod|hypot|log|log10|log2|NaN|Pi|pow|product_even|product_odd|rema
inder|round_to|rsqrt|sin|sincos|sinh|sqrt|Sqrt1_2|Sqrt2|tan|tanh)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use any math functions.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake
8a331d4fa0 Everywhere: Move AK/Debug.h include to using files or remove 2023-01-02 20:27:20 -05:00
Ben Wiederhake
a55360781b LibGL: Move AK/Debug.h include to where it is used 2023-01-02 20:27:20 -05:00