Before this, whenever encountering something other than dumb text
content in an inline flow, we assumed it had to be either a replaced
element, or an inline-block.
This removes the special-casing of inline-block so that IFC can size and
layout anything as long as it's inline on the outside.
Nix (nixpkgs) have updated a while back how the e2fsprogs derivation
works and now fuse2fs wasnt being installed with it. It is now needed to
add a new derivation (package) to the dependency list: "fuse2fs". This
fixes the Meta/serenity.sh script not finding the fuse2fs binary for
rootless image building :^)
There's no need to make the assumption that any inline-block box will
be represented by a BlockContainer. Nothing we do with the box here
requires that specific type anyway.
`mkstemps` generates a unique temporary file name from a pattern like
`prefixXXXXXXsuffix` where `prefix` and `suffix` can be any string with
only characters that are valid in a filename. The second parameter is
the length of the suffix.
`mkstemp` is `mkstemps` with suffix length 0, so to avoid code
duplication it calls `mkstemps`. It is unlikely this has any
significant performance impact on SerenityOS.
`generate_unique_filename` now takes the suffix length as a `size_t`.
The original behavior of this function is preserved when specifying a
suffix length of 0. All original uses of this function have been
adapted.
`mkstemps()` was added because it is required by version 4.6.3 of the
ccache port.
The implementation of `rev` found on Linux systems does not have this
behavior, however other utilities do offer this behavior and so there
really isn't too much of an argument to be made for *not* having this as
a feature.
This patch adds a non standard step pushing the realm execution context
of fetching client's settings object onto the execution context stack
before linking a module script. Without the realm execution context
there is no current settings object, leading to a crash in
HostResolveImportedModule.
This patch adds support for script elements with the type attribute set
to "module". As a first cut the changes are mainly focused around inline
scripts.
Co-authored-by: davidot <davidot@serenityos.org>
This patch adds support for the HostGetSupportedImportAssertions and
HostResolveImportedModule host hooks.
Co-authored-by: davidot <davidot@serenityos.org>
This patch adds various algorithms required to fetch and link module
scripts.
Some parts such as actually creating a request and error handling are
not implemented or use temporary non spec compliant code to get us
further.
Co-authored-by: davidot <davidot@serenityos.org>
This patchs adds the Web::HTML::Script subclass ModuleScript and
JavaScriptModuleScript as a type of ModuleScript as well as various
algorithms related to JavaScript module scripts.
Co-authored-by: davidot <davidot@serenityos.org>
This patch adds the ModuleMap class used to keep track of the type and
url of a module as well as the fetching state associated. Each
environment settings object now also has a module map.
Previously we would simply check the an input string against a list of
mime type essences, ignoring that the input might not be a valid mime
type or contain parameters.
This patch moves the helpers into the MimeSniff namespace and properly
parses an input string before comparing the essence.
This is a more correct check than !is_inline_block(), as it now enters
all elements that have inline behavior on the outside and flow behavior
on the inside.
These were totally ad-hoc before, is_inline() was based on a boolean
flag on Layout::Node that we set in various situations.
Meanwhile, is_inline_block() was a combination on is_inline() plus a
type check to see if the layout node inherited from BlockContainer.
This patch replaces the above mess with simple lookups of the CSS
display value. Note that layout nodes without their own style (i.e text
nodes) are automatically assumed to be inline and non-blocks. This has
to be special-cased since layout nodes without style will consult the
style of their parent, so without short-circuiting this would break.
This is one of many small steps towards being able to remove the ad-hoc
Layout::Node::is_inline() in favor of honoring the CSS display value
everywhere instead.
Until now, VERIFY() failures would just cause a __builtin_trap() in
release builds, which made them a bit too harsh. This commit adds an
out-of-line helper function that prints the error before trapping.
We always create a Layout::InitialContainingBlock for the ICB, but in a
future where we always honor the CSS::Display everywhere, we need to
make sure everyone has the right display values.