Additionally, split it into two versions (for IsIntegral<T> -- asking
to place value into register and for !IsIntegral<T> -- asking to place
value into memory with memory clobber), so that Clang is no more
completely confused about `taint_for_optimizer(AK::StringView&)`.
This ensures that all visit_edges implementations include a call to
Base::visit_edges. In particular, this gives three nice benefits:
- The call can't be forgotten (the main benefit, of course).
- All of the calls look the same. In other words, always use "Base"
instead of the actual concrete class.
- Ensure the object has a call to JS_CELL or JS_OBJECT in the
definition. Otherwise, Base will not be defined and the call will
not compile.
Rename the initialize method to initialize_virtio_resources so it's
clear what this method is intended for.
To ensure healthier device initialization, we could also return the type
of ErrorOr<void> from this method, so in all overriden instances and in
the original method code, we could leverage TRY() pattern which also
does simplify the code a bit.
Some occasional cases could cause the accumulator to overflow and have
an incorrect result. It would be nice to use a smaller accumulator, but
it seems not to be correct. :^(
We now cast to i16 to allow 128-bit vectorization to make use of one
whole register instead of having to split the loop into multiple.
This results in about a 5% reduction in performance in my testing.
If --measure is passed, icc prints the color pairs with the smallest
and largest perceptual difference between them.
Converting 254 * 254 * 254 * 4 = 65 Million colors from sRGB to LAB
and then computing 254 * 254 * 254 * 3 = 49 Million DeltaEs between
them takes a while. On my laptop, it takes 17s to run. So there's
a small progress display.
Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.
Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.
Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
These icons are a relic of GLabel and were never implemented to
accomodate both image and text. This convenience can always be added
in the future, but no current instance assumes or needs it, so let's
replace them all with ImageWidget to show clearer intent.
This can be used to convert a profile-dependent color to the L*a*b*
color space.
(I'd like to use this to implement the DeltaE (CIE 2000) algorithm,
which is a metric for how similar two colors are perceived.
(And I'd like to use that to evaluate color conversion roundtrip
quality, once I've implemented full conversions.)
To be able to port c-ares the IN6_IS_ADDR_V4COMPAT and
various macros of the form IN6_IS_ADDR_MC_XX_LOCAL were added
as well as the IN_CLASS{A,B} macros
Since multiboot_modules_count is set to 0, we can safely set the
multiboot_modules pointer to 0 (null pointer), as we don't use multiboot
on aarch64 anyway.
Length units are either relative to the font, or to the viewport, but
never both. So we can save some work by not gathering font metrics for
a viewport unit, and not retrieving the viewport for a font unit.
Currently this is only helpful when the `to_px(Layout::Node)` method is
called, but since that is 208 places according to CLion, (plus 33
indirect uses via `Length::resolved()`) it still seems worthwhile. :^)
`*vi` and `*vb` vary on which direction they check depending on whether
the writing mode is horizontal or vertical, so they will need some
modification once we support that.
Using the rough heuristic instead of the actual spec measurement. It's
allowed by the spec, but not ideal:
> In the cases where it is impossible or impractical to determine the
ideographic advance measure, it must be assumed to be 1em.
As noted, the ascent of the font is not the best heuristic for this, but
it is one that's listed as OK to use by the spec:
> In the cases where it is impossible or impractical to determine the
cap-height, the font’s ascent must be used.
Rather than passing an increasingly-unwieldy number of font parameters
individually to every function that resolves lengths, let's wrap them
up.
This is frustratingly close to being `Gfx::FontPixelMetrics`, but bitmap
fonts cause issues: We choose the closest font to what the CSS
requests, but that might have a wildly different size than what the
page expects, so we have to fudge the numbers.
No behaviour changes.
They previously weren't sorted at all. Alphabetical would be nice, but
then things like `em` and `rem` would be separated. So, let's copy the
spec's order. That way it's easier to keep track of which units we have
or haven't implemented. (Since there are so many...)
If you launch the Spreadsheet app by clicking on a CSV
(or other supported formats) the import dialog is immediately
launched. If you cancel out of the import the application ends
up in an empty state where there are no sheets added. When you
launch the app normally it defaults to having a blank sheet, so
we should have the same behaviour in this scenario to prevent users
from having to manually add the new/blank sheet before being able to
use the app