The name "initial containing block" was wrong for this, as it doesn't
correspond to the HTML element, and that's specifically what it's
supposed to do! :^)
Before, the shading of the Presenter icons was the wrong way round and
the external contrast was not as good as it could be. This has been
rectified and the icons are now light on the left- and dark on the
right-side. Also, they now use the same gray colors as other system
icons, making them sit much more nicely together, and have been
generally improved.
Using char causes bytes equal to or over 0x80 to be treated as a
negative value and produce incorrect results when implicitly casting to
u32.
For example, `atob` in LibWeb uses this decoder to convert non-ASCII
values to UTF-8, but non-ASCII values are >= 0x80 and thus produces
incorrect results in such cases:
```js
Uint8Array.from(atob("u660"), c => c.charCodeAt(0));
```
This used to produce [253, 253, 253] instead of [187, 174, 180].
Required by Cloudflare's IUAM challenges.
Defining it as a direct property causes it to have no getter/setter
function, which causes an empty Optional crash when attempting to
access such getter on a cross-origin iframe.
Fixes amazon.com crashing on this particular crash.
Turns out that, if we don't use functions that ensure reading until the
very end of the buffer, we only end up getting the very beginning of
samples and fill the rest with uninitialized data.
While at it, make sure that we read the data that is little endian as a
LittleEndian.
We are currently setting the physical mouse position to the visual
cursor content location. In a line containing only a multi-code point
emoji, this would set the cursor to column 1 rather than however many
code points there are.
This type of image isn't common, and you can probably only find one by
generating it yourself. It can be done using `cjpeg` with the -scan
argument.
This image has been generated with the following scan file:
0: 0 63 0 0;
1: 0 63 0 0;
2: 0 63 0 0;
Scan with only one component are by definition not interleaved, meaning
that each value is linearly ordered in the stream. Grayscale images
were supported thanks to a hack, by forcing the subsampling to 1.
Now we properly support grayscale image with other subsampling (even if
it doesn't make sense) and more generally scans with only one component
and any sampling factors.
While this solution is more general than the last one it also feels a
bit hackish. We should probably refactor the way we iterate over
components and macroblocks. But that's work for latter, especially when
we will add support for other subsampling than 4-2-2.
Huffman streams are encountered in the scan segment. They have nothing
to do outside this segment, hence they shouldn't outlive the scan.
Please note that this patch changes behavior. The stream is now reset
after each scan.
A scan can contain fewer components that the full image. However, if
there is multiple components, they have to follow the ordering of the
frame header. It means that we can loop over components of the image
and skip those that doesn't correspond.
For now, we exit after the first scan without needing to parse `EOI`.
However, to read scans in a loop we will need to properly detect and
parse `EOI`.
This patch brings us closer to the spec point of view. And while it
makes no functional changes, it reduces the number of places where you
can misuse scan-specific data and improve support for multiple scans.
10ms (the default) is ridiculous and causes all kinds of glitches if we
actually want to have a low-latency queue.
<https://gitlab.com/qemu-project/qemu/-/issues/1076#note_996636777>
suggests 2ms (and no lower than 1ms). This improves audio glitch
resistance at our current 512 sample buffer size, but going lower is
still not possible.
Nobody made use of the ErrorOr return value and it just added more
chance of confusion, since it was not clear if failing to sniff an
image should return an error or false. The answer was false, if you
returned Error you'd crash the ImageDecoder.