Instead of assuming that the first font in the cascade font list will
have a glyph for space, we need to find it in the list taking into
account unicode ranges.
When the WebContent process has painted to its shared bitmaps, it sends
a synchronous IPC to the browser process to let the chrome paint. It is
synchronous to ensure the WC process doesn't paint onto the backing
bitmap again while it is being displayed.
However, this can cause a crash at exit if the browser process quits
while the WC process is waiting for a response to this IPC.
This patch makes the painting logic asynchronous by letting the browser
process broadcast when it has finished handling the paint IPC. The WC
process will not paint anything again until it receives that message. If
it had tried to repaint while waiting for that message, that paint will
be deferred until it arrives.
Some tags have a default value, we should return this value in
Metadata's getters when no value has been read from the input file.
Note that we don't support default values for tags with a count bigger
than one.
ExifOrientedBitmap was implemented before the introduction of the TIFF
decoder. So we had to provide a definition of the Orientation enum. Now
that we have a TIFF implementation that comes with some enum
definitions, we should prefer this source.
Process separation is a great way to prevent malicious users from
getting the GUI down with image files that make one of our decoder
crash.
It also makes life easier when developing image decoders.
If no EventLoop is present in the stack (like when you forget to create
one), a message is nicer than letting the developer go through the
stacktrace to figure out what went wrong.
When using the BMP encoding, ICO images are expected to contain a 1-bit
mask for transparency. Regardless an alpha channel is already included
in the image, the mask is always required. As stated here[1], the
mask is used to provide shadow around the image.
Unfortunately, it seems that some encoder do not include that second
transparency mask. So let's read that mask only if some data is still
remaining after decoding the image.
The test case has been generated by truncating the 64 last bytes
(originally dedicated to the mask) from the `serenity.ico` file and
changing the declared size of the image in the ICO header. The size
value is stored at the offset 0x0E in the file and I changed the value
from 0x0468 to 0x0428.
[1]: https://devblogs.microsoft.com/oldnewthing/20101021-00/?p=12483
This is enough to make these work:
for f in VideoHD VideoNTSC VideoPAL; do
Build/lagom/bin/icc --debug-roundtrip \
~/Downloads/Adobe\ ICC\ Profiles\ \(end-user\)/RGB/$f.icc
done
It's also possible to convert images to those color spaces:
Build/lagom/bin/image -o image-pal.png \
--convert-to-color-profile path/to/RGB/VideoPAL.icc \
image-srgb.png
(If there's no png file with an embedded sRGB profile at hand, do first:
Build/lagom/bin/icc --reencode-to serenity-sRGB.icc -n sRGB
Build/lagom/bin/image -o image-srgb.png \
--assign-color-profile serenity-sRGB.icc image-no-color-space.png
)
In color-managed viewers, images-srgb.png and image-pal.png should
look identical.
But if you either explicitly assign the sRGB profile to the pal
image, or strip the embedded color space, they'll look different
(since image viewers then assume the image in the VideoPAL space
is in sRGB):
Build/lagom/bin/image -o image-pal-strip.png --strip-color-profile \
image-pal.png
Build/lagom/bin/image -o image-not-actually-srgb.png \
--assign-color-profile serenity-sRGB.icc image-pal.png
- We now propagate changes in font and line-height to anonymous wrappers
when doing a partial style update after invalidation.
- We no longer (incorrectly) propagate style from table wrapper boxes
to the table root, since inheritance works in the other direction.
Fixes#22395
Previously, the cookie date validation did not validate days in the
context of the month and year, resulting in dates that do not exist to
be successfully parsed (e.g. February 31st). We now validate that the
day does not exceed the number of days for the given month and year,
taking leap years into account.
In 4bc38300ad this function was modified
to accept only Angle instead of being templated, with the purpose of
preventing Length from being passed.
This change reverts the function to being templated but adds a
constraint specifically forbidding Length. This adjustment will allow
for the future use of Frequency, Number, Time, etc., if we would want.
This change fixes the function that calculates the number of auto-fill
tracks, ensuring it uses height when applied to rows, instead of
assuming that it always operates on columns.
Fixes the mistake that gaps are counted as if they exist after each
track, when actually gaps are present only between tracks.
Visual progression on https://kde.org/products/
Similar to calculate_inner_width(), let's make the caller responsible
for handling "auto" instead of returning the input height as is when
when it cannot be resolved.
Initially, this function was made to return CSS::Length because some of
its callers were expecting it to ignore "auto" width on input and
return it as is. Instead, let's just forbid using "auto" for input
width and always return CSSPixels.
CSSPixels should not be wrapped into CSS::Length before being passed
to resolved() to end up resolving percentages without losing
precision.
Fixes thrashing layout when 33.3333% width is used together with
"box-sizing: border-box".
We were trying to read exactly 5 pairs for some reason, instead of the
number specified by the format 0 header.
Fixing this makes "OpenSans Condensed" load on my machine.
Percentage vertical margin and padding values are relative to the
containing block *width*, not *height*. This has to be one of the most
commonly recurring mistakes we make :^)
Previously, we had two versions of MonthListModel for the AddEventDialog
and the DatePickerDialog. Now, a unified version is in the Calendar.h
file, which can be used easily by anyone. Since that model and the
MeridiemListModel weren't used anymore in the AddEventDialog, I have
also removed them from there.