Commit graph

48304 commits

Author SHA1 Message Date
Tim Ledbetter
5a6b995444 LibGfx: Use premultiplied alpha when scaling images
This commit replaces usages of `Color::interpolate()` with
`Color::mixed_with()` in image scaling functions. The latter
uses premultiplied alpha, which results in more visually
pleasing edges when images are scaled against a transparent
background.

These changes affect the SmoothPixels and BilinearBlend scaling modes
of `Painter::draw_scaled_bitmap()` as well as the `Bitmap::scaled()`
function.

Fixes #17153.
2023-03-21 00:29:33 +01:00
Michiel
2480b94ae7 LibWeb: Support more length types in SVG width/height attributes
Previously we were using the HTML parse_dimension_value method for the
height and width attributes of an SVG element. These attributes should
however be treated as css properties instead and thus also support
calc() and absolute units so we use the css parser for this instead.
2023-03-20 23:45:01 +01:00
Ali Mohammad Pur
e312d6530b LibLine: Unify the is-empty flag in Style::unify_with() as well
Not doing so can make the final unified state incorrectly marked as
empty, and will make LibLine ignore the style.
2023-03-20 23:25:21 +01:00
Andreas Kling
a6d1307aa4 LibWeb: Don't crash on HTML input element with display: inline
This would previously assert in InlineFormattingContext because we had
an outwardly inline box that wasn't inwardly flow.

Fix this by converting text-based input boxes to inline-blocks. This is
an ad-hoc solution, and there might be a much better way to solve it.
2023-03-20 17:57:58 +01:00
Andreas Kling
00999a245c LibWeb: Let FormattingContext decide the automatic width of its root
Instead of special-casing FlexFormattingContext in the intrinsic sizing
layout helpers, add FormattingContext::automatic_content_width() and let
each context subclass decide what that means.

No behavior change here, just moving this responsibility.
2023-03-20 17:57:58 +01:00
Timothy Flynn
e945994877 LibJS: Update spec numbers / text for the Change Array by Copy proposal
This proposal has been merged into the main ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/4a32716

Note this includes some editorial changes made when the proposal was
merged into the main spec, but are not in the proposal spec.
2023-03-20 16:33:16 +00:00
Ryan Liptak
f794b08548 Base: Add 7 new emojis
⚰ U+26B0 - Coffin
🏧 U+1F3E7 - ATM Sign
🛁 U+1F6C1 - Bathtub
🍠 U+1F360 - Roasted Sweet Potato
🍢 U+1F362 - Oden
🎙 U+1F399 - Studio Microphone
💅 U+1F485 - Nail Polish
2023-03-20 15:32:59 +00:00
Srikavin Ramkumar
3c49e24977 LibWeb: Scale checkbox image instead of repeating on large checkboxes 2023-03-20 10:15:58 +00:00
Srikavin Ramkumar
def08bcfcf LibWeb: Add indeterminate checkbox styling to useragent stylesheet 2023-03-20 10:15:58 +00:00
Srikavin Ramkumar
c3d6709a9e LibWeb: Implement selector matching for :indeterminate pseudo-class 2023-03-20 10:15:58 +00:00
Srikavin Ramkumar
d177d83b44 LibWeb: Implement indeterminate IDL attribute in HTMLInputElement 2023-03-20 10:15:58 +00:00
Srikavin Ramkumar
aad4051885 LibWeb: Match selected option elements with checked pseudo-class 2023-03-20 10:15:58 +00:00
Tim Schumacher
df30fd6232 tar: Add partial support for LZMA-compressed archives 2023-03-20 12:15:38 +02:00
Tim Schumacher
391485ccef Tests: Add LZMA test files from the LZMA specification 2023-03-20 12:15:38 +02:00
Tim Schumacher
123e9fa5d0 Lagom: Add a fuzzer for LZMA decompression 2023-03-20 12:15:38 +02:00
Tim Schumacher
858c44ae1b Utilities: Add an lzcat utility 2023-03-20 12:15:38 +02:00
Tim Schumacher
b3a9729e23 LibCompress: Add support for LZMA streams 2023-03-20 12:15:38 +02:00
Sam Atkins
5c4ffbcb46 GMLPlayground: Let WindowServer handle the title's modification symbol 2023-03-20 09:06:12 +00:00
Sam Atkins
1fba3640cb GMLPlayground: Add list of recent files to the File menu 2023-03-20 09:06:12 +00:00
Sam Atkins
d0730c1c75 TextEditor: Remove confirmation when opening from recent files list
If the user has clicked to open a recent file, we don't need to ask them
again if they want to open it.
2023-03-20 09:04:38 +00:00
Tim Schumacher
fb0fd85e97 Meta: Don't install CA certificates during a on-Serenity build
`SERENITYOS` is also set when compiling Lagom on SerenityOS, so we can't
just check it and expect `CMAKE_STAGING_PREFIX` to be set.

Instead, check `CMAKE_STAGING_PREFIX` directly and use that as an
indicator for whether we can install a file there.
2023-03-20 09:33:30 +01:00
Tim Schumacher
f7dc4396c8 grep: Remove a leftover debug line 2023-03-20 09:33:30 +01:00
Tim Schumacher
cda4034b46 LibCrypt: Start installing headers again
This was accidentally broken in
ac40197047, after which we started
installing headers into a `LibCrypt` subdirectory instead.

`serenity_install_headers("")` is really the only thing that we need
from `serenity_libc`, so just replicate that manually.
2023-03-20 09:33:30 +01:00
Sam Atkins
5708a47157 Snake: Implement image-based skins
Co-authored-by: HawDevelopment <hawdevelopment@gmail.com>
2023-03-20 09:29:30 +01:00
Sam Atkins
da7c883dfa Snake: Move geometry types into Geometry.h and add Direction enum 2023-03-20 09:29:30 +01:00
Sam Atkins
3ce87ea5f9 Snake: Remember if game was paused when picking color
If we were paused before, don't start the game after closing the dialog.
2023-03-20 09:29:30 +01:00
Aliaksandr Kalenik
4f496e97fe LibWeb: Add keep-alive in response headers if it present in request
This fix addresses issue where, if request headers contain
"Connection: keep-alive", we keep socket open without letting client
know that we support keep-alive connections. This can result in a
large number of open and unused sockets.
2023-03-19 22:31:59 -04:00
Andrew Kaster
5b5a76eadd CI: Add "set -e" to Azure DevOps scripts
Without setting this explicitly in every script, failing script lines in
multiline scripts will not fail the job themselves.
2023-03-19 14:31:10 -06:00
Andrew Kaster
958f9e960d Fuzzers: Use correct type name in FuzzilliJs fuzzer 2023-03-19 14:31:10 -06:00
Elisée Maurer
38a3e28799 LibWeb: Stub out a few form validation and selection methods 2023-03-19 18:58:50 +00:00
Caoimhe
23d31ac11d SoundPlayer: Keep track of the selected visualization in the config 2023-03-19 18:57:30 +00:00
Caoimhe
4c49e0f4a3 SoundPlayer: Move get_image_from_music_file to the advanced view 2023-03-19 18:57:30 +00:00
Aliaksandr Kalenik
dcc4868a3c LibWeb: Rename PaintableBox::clip_rect() 2023-03-19 19:04:51 +01:00
Aliaksandr Kalenik
7ddacef3b5 LibWeb: Apply border-radius clip only if overflow hidden for both axis
Before this change `apply_clip_overflow_rect` might crash trying to
access `clip_rect` that does not have value because we currently
support calculation of visible rectangle when `overflow: hidden`
is applied for both axis.
2023-03-19 19:04:51 +01:00
Srikavin Ramkumar
633983d354 LibWeb: Update stylesheet loading to use fetch infrastructure 2023-03-19 14:16:15 +00:00
Srikavin Ramkumar
f7176463b5 LibWeb: Implement 'create a potential-CORS request' algorithm 2023-03-19 14:16:15 +00:00
kleines Filmröllchen
3e2e94bd01 Meta: Specify a working directory for the FLAC spec test on Lagom
The serenity_test function cannot set this up as it has no purpose on
Serenity itself.
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
c7e963edde Tests: Correct FLAC spec test paths
This makes the path consistent with Lagom in the next commit, so that
the test binary doesn't need special cases for the two platforms.
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
73a367a00a Tests: Refactor FLAC spec test to not use a TestCase subclass
The deallocation of the test cases at the very end happens through a
NonnullRefPtr<TestCase>, meaning the deallocation will assume the wrong
object size and trip up ASAN. Therefore, we cannot use a TestCase
subclass.

I also took this opportunity and made use of the new LoaderError
formatter.
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
904a4dd314 Meta: Use extract_tar_path for WASM spec test generation 2023-03-19 14:15:35 +00:00
kleines Filmröllchen
d3d93ef1df Meta: Refactor FLAC spec test extraction with extract_tar_path 2023-03-19 14:15:35 +00:00
kleines Filmröllchen
a6dd992ad3 Meta: Add a tar extraction CMake wrapper
This is a copy of the zip wrapper adopted for tar archives.
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
1ee2091b2d LibAudio: Support FLAC files with unknown amount of samples
This is a special case of the sample count field in the header which we
treated as a format error before. Now we just take care to check stream
EOF before reading chunks.

This makes the final FLAC spec test pass, making us one of the most
compliant loaders! :^)
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
b2a018ee59 LibAudio: Use specified bit depth directly
We report a rounded up PCM sample format to the outside, but use the
exact bit depth as specified in header and frames.

This makes the three FLAC spec tests with a a bit depth of 20 pass.
2023-03-19 14:15:35 +00:00
Aliaksandr Kalenik
a2d13c47bd Ladybird: Fix build failure caused by missing WebDriver header
Fix the problem that `cmake --build Build/ladybird` started
failing with:

fatal error: 'WebContent/WebDriverConnection.h' file not found

after 11fe34ce0f
2023-03-19 09:53:57 -04:00
Aliaksandr Kalenik
16a4949e33 WebDriver: Fix handling of disconnected WebContent process
If WebContent process got disconnected it is only necessary to remove
associated window instead of terminating the entire session.
2023-03-19 14:51:40 +01:00
Aliaksandr Kalenik
7146c33522 WebDriver: Close all WebContent connections while destroying a session
While closing a session, it is necessary to close all windows that may
have been opened during that session.
2023-03-19 14:51:40 +01:00
Aliaksandr Kalenik
63c16ff41a WebDriver: Inline Sesssion::stop() in session destructor
Previously it was possible to have following sequence of calls
while destroying a session:
1. `WebContentConnection::die()` calls `Client::close_session()`
2. `Client::close_session()` removes a session from active sessions
map which causes session destructor call.
3. Session destructor calls `Client::close_session()` to remove a
session from active sessions.

With `stop()` method inlined into destructor `close_session()` need
to be called just once while destroying a session.
2023-03-19 14:51:40 +01:00
Lucas CHOLLET
b79cd5cf6e LibGUI: Update progress of thumbnail generations on failure
Not doing it result in FileManager's progress bar being left as
incomplete even if all jobs were finish.
2023-03-19 01:26:37 +00:00
Lucas CHOLLET
ebb9c3a430 LibThreading: Execute on_error on the original EventLoop
As the user might want to have interactions with LibGUI while handling
errors, this code should be executed in the original `EventLoop`.
Similarly to what is done with the error-free path.
2023-03-19 01:26:37 +00:00