Age | Commit message (Collapse) | Author |
|
We previously did not notify the listener about entering the root node,
which caused the following snippet to produce the wrong output:
a = new DOMParser
a.parseFromString("<x/>", "text/xml").documentElement // != null
|
|
This makes Piano exactly as usable as when I started the large refactor
some years ago, which *sounds* like I'm a terrible person but now it (1)
looks nicer and (2) has a flexible backend that can already deal with
aribtrary kinds of processors on any track.
|
|
|
|
This implements the '-i' flag in the GNU version, without suffix
support.
|
|
- The veil was never closed.
- unveil() only works with absolute paths.
- Files from the regular input list weren't unveiled.
|
|
|
|
Previously these variables were all prefixed `size_`, but used for
the opacity value.
|
|
The `copy_from_seekback` method already handles this exactly as DEFLATE
expects, but it is slightly more optimized.
|
|
This fixes another GC crash seen on https://shopify.com/
Found it by collecting garbage after every 500th heap allocation.
|
|
This follows on from the SVG linear gradients. It supports the same
features (xlink:href, gradientUnits, gradientTransform).
With this commit I have now implemented all web gradients :^)
(Though we are still missing a few parameters for SVG gradients,
e.g. spreadMethod).
|
|
These functions will also be used by SVG radial gradients.
|
|
The previous behaviour was incorrect, the template's stops should only
be used if the current gradient does not have any stops.
|
|
|
|
This also slightly refactors things to share more implementation with
the SVG linear gradients, and improve accuracy (which fixes some banding
issues).
|
|
|
|
Since this FIXME was added the SVGFormattingContext has got a fair bit
more spec compliant. The other more specific FIXMEs in this file should
be more useful.
|
|
For example, when navigating to another page, this ensures any media
resource will not continue playing.
|
|
Some HTML elements, e.g. HTMLMediaElement, need to take action when the
document becomes inactive.
|
|
|
|
This is typically used as `class A extends EventTarget`. It's usage can
be found on websites such as https://loadout.tf/
This has the quirk that we don't do set the EventTarget prototype for
HTML::Window, as it would cause a null deref on startup. However, given
it wasn't doing this before, I don't think it should cause any issues.
|
|
We already support this in all other logic and in LibSoftGPU, I just
forgot to add this constant to this list.
|
|
LutAToBTagData::from_bytes() and LutBToATagData::from_bytes() already
reject curves for which this isn't true with an error.
Ensure potential future callers of the constructors get it right too.
|
|
No behavior change yet (except for more detailed "not yet implemented"
messages), but it prepares for eventually implementing some of this.
|
|
These are presentational hints and are handled by SVGGraphicsElement (a
superclass of SVGSVGElement) so we just need to call up to it. :^)
|
|
We'd only check is_invertible() after calling inverse(), which would
do a divide-by-0 for non-invertible matrices.
Less ambitious version of #18593.
|
|
This allows them to mark JS modules, and fixes a crash seen on
https://shopify.com/
|
|
https://www.w3.org/TR/CSS22/visuren.html#floats says that when a box
establishes BFC it should not overlap with floats. The way to avoid
overlaps is up to implementor. This change implements avoiding overlap
by narrowing width of a box because it seems like what other engines
do (in the scenarios I tested).
|
|
Calculating width of a box in BFC requires having resolved y to be able
to check if a box overlaps with any floating boxes.
This change makes compute_width() to be called after finding y
position. That also required to move resolving of vertical metrics
in the beginning of a box layout process to have vertical margins
resolved before finding y position.
|
|
Resolves #18618.
8134dcc changed `JsonArray::set()` to insert elements at an index
instead of changing existing elements in-place. Since no behavior
such as `Vector::try_at()` exists yet, it returns nothing.
|
|
Fixes #18037.
|
|
When there are floats present inside an IFC, we must coordinate with
the parent BFC to calculate the automatic width of the IFC's block box.
This is because the IFC is not directly aware of floats. Only the BFC
knows enough about them to account for them in automatic sizing.
|
|
In particular, we now blockify layout internal boxes (e.g table parts)
by turning them into `block flow`. This fixes a crash when viewing
our GitHub repo :^)
|
|
This allows converting to a color space that uses a non-parametric
curve, for example:
Build/lagom/image -o foo.png \
--convert-to-color-profile .../profiles/sRGB-v2-micro.icc \
input.jpg
...where profiles/sRGB-v2-micro.icc is from
https://github.com/saucecontrol/Compact-ICC-Profiles/
(Parametric curves are new in ICC v4, which means all v2 profiles
use point curves.)
|
|
For now, only for color spaces that are supported by Profile::to_pcs()
and Profile::from_pcs(), which currently means that all matrix profiles
(but not LUT profiles) in the source color space work, and that
matrix profiles with parametric curves in the destination color
space work.
This adds Profile::convert_image(Bitmap, source_profile), and
adds a `--convert-to-color-profile file.icc` flag to `image`.
It only takes a file path, so to use it with the built-in
sRGB profile, you have to write it to a file first:
% Build/lagom/icc -n sRGB --reencode-to serenity-sRGB.icc
`image` by default writes the source image's color profile
to the output image, and most image viewers display images
looking at the profile.
For example, take `Seven_Coloured_Pencils_(rg-switch_sRGB).jpg`
from https://commons.wikimedia.org/wiki/User:Colin/BrowserTest.
It looks normal in image viewers because they apply the unusual
profile embedded in the profile. But if you run
% Build/lagom/image -o huh.png --strip-color-profile \
'Seven_Coloured_Pencils_(rg-switch_sRGB).jpeg'
and then look at huh.png, you can see how the image's colors
look like when interpreted as sRGB (which is the color space
PNG data is in if the PNG doesn't store an embedded profile).
If you now run
% Build/lagom/image -o wow.png \
--convert-to-color-profile serenity-sRGB.icc --strip-color-profile \
'Seven_Coloured_Pencils_(rg-switch_sRGB).jpeg'
this will convert that image to sRGB, but then not write
the profile to the output image (verify with `Build/lagom/icc wow.png`).
It will look correct in image viewers, since they display PNGs without
an embedded color profile as sRGB.
(This works because 'Seven_Coloured_Pencils_(rg-switch_sRGB).jpeg'
contains a matrix profile, and Serenity's built-in sRGB profile
uses a matrix profile with a parametric curve.)
|
|
Table should not take up more width than is available inside wrapper
after margins are taken in account.
|
|
This solves the issue that previously width table-wrapper containing
block were used in the places were containing block of table-root
should be used.
|
|
Instead, log the calc() value we failed to resolve, so we can debug it.
|
|
This patch does three things:
- Factors out the code that determines whether a box will create a new
formatting context for its children (and which type of context)
- Uses that code to mark all formatting context roots in layout tree
dumps. This makes it much easier to follow along with layout since
you can now see exactly where control is transferred to a new
formatting context.
- Rebaselines all existing layout tests, since the output format has
changed slightly.
|
|
Previously we would exit the dequeuing loop after just one buffer
had been dequeued due to some bogus logic. This would manifest
when stopping and starting a track in SoundPlayer, where a few
miliseconds of 'old' audio would play when restarting the playback.
This commit makes sure we clear the entire queue.
|
|
Previously we would not clear the client buffer of the
ConnectionToServer when playback was stopped. This would
cause old samples to be buffered and played when playback
was restarted.
With this commit we now perform this clearing of the client
buffer correctly.
|
|
Instead of crashing we give a helpful warning message to the user.
This also removes a fixme! :^)
|
|
-a and -p both require only one of the flags.
We will inform the user of this for both -a and -p <PID>.
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-from-a-srcdoc-resource
This is supporting function for populating document in session history
entry.
This function populates navigation params response with HTML text
passed in document resource.
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-by-fetching
This is supporting function for population of document in a session
history entry.
This function populates response in navigation params by fetching url
in navigation params and handling redirects if required.
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#attempt-to-populate-the-history-entry's-document
This is going to be a replacement for `FrameLoader::load()` after
switching to navigables.
Brief description of `populate_session_history_entry_document`:
- If navigation params have url with fetch scheme then DOM document
will be populated by fetching url and parsing response. This
is going to be a replacement for `FrameLoader::load(AK::URL&)`.
- If url in navigation params is abort:srcdoc then DOM document
will be populated by parsing HTML text passed in document resource.
This is going to be a replacement for `FrameLoader::load_html()`
|
|
In upcoming navigables refactor new function that uses fetch
instead of ResourceLoader to load document content is going to be
introduced:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-by-fetching
`parse_document()` need to be separated from FrameLoader to reuse
code responsible for parsing HTTP response into DOM document.
|
|
|
|
|
|
|
|
|