Age | Commit message (Collapse) | Author |
|
This reworks checkboxes to use a tiny 16x16 SDF for the tick icon along
with an antialiased background/border.
The checkbox now works well at any scale, shows the various checkbox
state (enabled, disabled, being pressed), and supports using the colors
from the active system theme and/or the accent-color property.
|
|
This is mostly a simple grayscale bilinear scale, with an extra step
of computing the distance and alpha with a little smoothing. This
can be used to paint more scalable UI elements/icons from rather
small distance fields. A tiny 16x16 SDF seems to do a decent job
for simple icons.
|
|
This is very similar to the existing CharacterBitmap class but instead
intended for small static grayscale bitmaps (such as signed distance
fields).
|
|
|
|
This builds on the existing ad-hoc ResourceLoader code for HTTP fetches
which works for files as well.
This also includes a test that checks that stylesheets loaded with the
"file" URL scheme actually work.
|
|
We make a guess using the MIME type guessing API in LibCore. This frees
clients of this code from having to do the guessing.
|
|
This is the same functionality as in FilePicker. It allows the
specification of what file types are allowed.
|
|
Allows the use of GUI::FileTypeFilter in IPC.
|
|
CORS cross-origin responses in the No CORS request mode provide an
opaque filtered response, which is the original response with certain
attributes removed/changed.
The relevant effect it has is setting the body to `null`, which means
`body_bytes` has `Empty` in the process_response_consume_body callback.
This effectively disables cross-origin linked resources
(e.g. stylesheets).
However, the web actually depends on this, especially for stylesheets
retrieved from a cross-origin CDN. For example, Shopify websites
request stylesheets from `cdn.shopify.com` and Substack websites
request stylesheets from `substackcdn.com`.
This makes this a specification bug, as this code was written from it.
The workaround is to read the actual body from the unfiltered response
and then call `process_linked_resource` from there.
This _should_ be safe to do, as linked resource fetches do not include
credentials (i.e. cookies and the Authorization header), so it cannot
provide personalized responses.
|
|
|
|
We used to do the opposite, meaning that a huge images make the window
bigger than the screen. We now define a range for the window size and
scale the image if it doesn't fit un the current scope.
|
|
|
|
|
|
|
|
This fixes a bug where we would construct a ModelIndex with a pointer to
NonnullRefPtr<OutlineItem>, instead of a pointer to the underlying
OutlineItem, which caused a crash later on when we would try to
dereference that pointer.
|
|
nasty_hacks--; // :^)
|
|
This is required for the `<urange>` type, and custom properties, to work
correctly, as both need to know exactly what the original text was.
|
|
Before, we were classifying the number as a "number" type if it had an
"E", even if that was not followed by an exponent.
|
|
|
|
Fixes #14158
|
|
Fixes #13628
|
|
|
|
|
|
This also adds a 'math' immediate function that can be used in Shell
proper to do arithmetic stuff.
|
|
We did this for lists, but not for strings.
|
|
|
|
`handle_prompt_end` is calling `is_device` and `is_directory` on the
path chosen by the user. However, this path is not necessarily unveiled.
Meaning that it the both functions results in an illegal operation.
This is a regression introduced with the usage of LibFileSystem in
1d24f394. This patch, revert the behavior at its previous state, i.e.
calling both functions with the fd provided by the FSAS.
|
|
|
|
The way this was factored before, we would miss the %%EOF marker if it
didn't have a valid end-of-line sequence after it.
|
|
This was previously a slightly confusing API. Even when there was no EOL
marker at the current location, we would still consume one byte.
It will now consume either EOL or nothing at all.
|
|
We would previously assume that, following the header, there must be a
valid PDF object that could be a linearization dict.
However, if the file is not linearized, this is not necessarily true.
We now try to detect if there even is an object, and don't treat
parsing errors as fatal.
|
|
As the current goal is to make our best effort loading documents, we
might as well ignore a broken header and power through, giving the user
a warning.
|
|
Calling the `ycbcr_to_rgb` function still looks unsuitable for this
usage, but it does the job correctly.
|
|
Objects taken by reference are no longer valid when used in
`deferred_invoke`. Explicitly copying them solve the issue.
|
|
|
|
|
|
|
|
|
|
As suggested in commit de18485
|
|
|
|
|
|
Copy over updated `DeprecatedFile` functions
|
|
|
|
The kerning value for a particular glyph may not be in
the first table. Continue until we either run out of tables or
we find an applicable value.
|
|
The stored ValueRecord in the font file only contains the fields
specified in the valueFormat field of the PairPosFormat1 table.
This means we need to construct the ValueRecord dynamically at runtime
and cannot bit_cast it to a struct.
|
|
read_value_record(u16 value_format, FixedMemoryStream& stream) takes
a bitmask value_format that describes the available fields of
the ValueRecord and a FixedMemoryStream at the location of the
next ValueRecord. It then advances the stream and returns a complete
ValueRecord.
|
|
When we create a Date object from a timestamp, or set its value by way
of Date.prototype.setTime, the timestamp is interpreted as UTC. Change
test expecatations against such instances to use UTC as well.
|
|
If it is default-initialized to 0, mktime will assume that DST is not in
effect for the specified time. Setting it to a negative value instructs
mktime to determine for itself whether DST is in effect.
|
|
|
|
At the moment, we only understand lookup type 2 (pair adjustment)
so let's ignore lookup tables with other types.
This fixes an issue where we'd choke on Noto Sans versions that come
with a chained context positioning lookup table (type 8).
Fixes #17924
|