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
The spec states that creating new windows "must be done without invoking
the focusing steps for the created browsing context". It also states we
should do so by "running the window open steps", but nowhere in those
steps is there an option to invoke or skip any focusing steps. So we do
so with a custom WebContent IPC parameter.
When resizing, it can be hard to get the content to appear nicely
without a black border where the window's aspect ratio doesn't match the
content's aspect ratio.
With this new action, it is possible to automatically adjust the
window's size to match the content's aspect ratio. When it is resizing,
it will maintain the width of the window, but adjust the height to match
the aspect ratio of the content.
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.
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.
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.