Age | Commit message (Collapse) | Author |
|
We did already have range checking for the `<integer>` and `<number>`
types, but this patch adds this functionality to all numeric types
(dimensions and percentages).
The syntax in Properties.json is taken from the spec:
https://www.w3.org/TR/css-values-3/#numeric-ranges
eg, `length [0,∞]` defines that a Length is allowed as long as it has a
positive value.
The implementation here allows for any number to be the positive or
negative limit, even though only 0 and positive/negative infinity are
meaningful values without a unit.
|
|
We were mistakenly treating all CSS properties as if changing them
requires a rebuild of the stacking context tree.
|
|
This appears to be a remnant from the earlier HeaderCheck revisions,
where CMakeLists.txt was automatically generated.
Now that a (static) copy of CMakeLists.txt is checked in, this file
doesn't have any effect anymore.
|
|
This lets GDB resolve the kernel symbols correctly.
|
|
Since this macro was created we gained a couple more parsers in the
system :^)
|
|
|
|
This is a bit strange in the IDL syntax, but e.g., in HTMLSelectElement,
we have (simplified):
undefined add(optional (HTMLElement or long)? before = null)
This could instead become:
undefined add(optional (HTMLElement or long) before)
This change generates code for the former as if it were the latter.
|
|
|
|
The float type is used quite a bit in the SVG spec.
|
|
I came across some websites that change an elements CSS "opacity" in
their :hover selectors. That caused us to relayout on hover, which we'd
like to avoid.
With this patch, we now check if a property only affects the stacking
context tree, and if nothing layout-affecting has changed, we only
invalidate the stacking context tree, causing it to be rebuilt on next
paint or hit test.
This makes :hover { opacity: ... } rules much faster. :^)
|
|
run.sh builds i686 by default, and the aarch64 port of serenity
isn't very far along yet.
Without this change, `run.sh` without arguments unceremoniously
fails with:
[0/1] cd .../serenity/Build/i686 && /usr...
ENITY_ARCH=i686 /home/thakis/src/serenity/Meta/run.sh
qemu-system-i386: invalid accelerator kvm
That's because /dev/kvm exists, but that's no good on a non-intel host.
|
|
When building on an arm host system, char defaults to unsigned,
leading to errors such as:
serenity/AK/StringBuilder.cpp:198:20:
error: comparison is always true due to limited range of data type
[-Werror=type-limits]
198 | if (ch >= 0 && ch <= 0x1f)
|
Building with -fsigned-char makes things work like on Intel, and
it's what we already do in Kernel/CMakeLists.txt for the same reasons.
|
|
|
|
|
|
|
|
|
|
Also add support for a few more assertion types to go along with it.
|
|
We have seen some cases where the build fails for folks, and they are
missing unzip/tar/gzip etc. We can catch some of these in CMake itself,
so lets make sure to handle that uniformly across the build system.
The REQUIRED flag to `find_program` was only added on in CMake 3.18 and
above, so we can't rely on that to actually halt the program execution.
|
|
With regular builds, the generated IPC headers exist inside the Build
directory. The path Userland/Services under the build directory is
added to the include path.
For in-system builds the IPC headers are installed at /usr/include/.
To support this, we add /usr/include/Userland/Services to the build path
when building from Hack Studio.
Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
|
|
Generated IPC headers are now installed under /usr/include in the
system's filesystem image.
|
|
|
|
Day and month name constants are defined in numerous places. This
pulls them together into a single place and eliminates the
duplication. It also ensures they are `constexpr`.
|
|
https://mm.icann.org/pipermail/tz-announce/2022-March/000070.html
|
|
This patch adds CSS::property_affects_layout(PropertyID) which tells us
whether a CSS property would affect layout if it were changed.
This will be used to avoid unnecessary relayout work when something
changes that really only requires us to repaint the page.
To mark a property as not affecting layout, set "affects-layout" to
false in the corresponding Properties.json entry. Note that all
properties affect layout by default.
|
|
...and let LibWasm do the validation instead of removing the test when a
module is invalid.
Also, one of the tests has an integer literal starting with zero, so
account for this to make it not fail :^)
|
|
Co-Authored-By: Luke Wilde <lukew@serenityos.org>
|
|
|
|
|
|
Since we want to store an initial value for every CSS::PropertyID,
it's pretty silly to use a HashMap when we can use an Array.
This takes the function from ~2.8% when mousing around on GitHub all the
way down to ~0.6%. :^)
|
|
As there is no need for a Prekernel on aarch64, the Prekernel code was
moved into Kernel itself. The functionality remains the same.
SERENITY_KERNEL_AND_INITRD in run.sh specifies a kernel and an inital
ramdisk to be used by the emulator. This is needed because aarch64
does not need a Prekernel and the other ones do.
|
|
|
|
|
|
|
|
|
|
These work differently from how we validate StyleValues. There, we parse
a StyleValue from the CSS, and then see if it is allowed in the
property. That causes problems when the syntax is ambiguous - for
example, `0` can be a number or a Length.
Here instead, we ask what kinds of value are allowed for a
media-feature, and then only attempt to parse those kinds of value.
This makes the ambiguity problem go away. :^)
Each media-feature in the spec only accepts one type of value, and/or
some identifiers. This makes the switch statements for the type a bit
excessive, but the spec does not *require* that only one type is
allowed, so this is more future-proof.
|
|
Only "range" type media-features are allowed to appear in range syntax,
or have a `min-/max-` prefix.
|
|
This works largely the same as the PropertyID and ValueID generators,
but using LibMain, Core::Stream, and TRY().
Rather than have a MediaFeatureID::Invalid, I decided to return an
Optional. We'll see if that turns out better or not. :^)
|
|
These were duplicated among the CSS generators.
|
|
This patch adds NodeIterator (created via Document.createNodeIterator())
which allows you to iterate through all the nodes in a subtree while
filtering with a provided NodeFilter callback along the way.
This first cut implements the full API, but does not yet handle nodes
being removed from the document while referenced by the iterator. That
will be done in a subsequent patch.
|
|
|
|
This directory has to be writable if we want to install ports that have
been built inside Serenity. It's owned by root anyway, so having it be
read-only does not provide many security benefits.
|
|
Because of ninja's default behavior of using all processors this gave
the correct behaviour because MAKEJOBS was empty. However this meant
that the processor count was printed to stderr when building.
|
|
The default behavior of using all cores will still apply if no
MAKEJOBS variable is supplied.
|
|
The Window object is part of the HTML spec. :^)
https://html.spec.whatwg.org/multipage/window-object.html
|
|
|
|
This initial version lays down the basic foundation of IDL overload
resolution, but much of it will have to be replaced with the actual IDL
overload resolution algorithms once we start implementing more complex
IDL overloading scenarios.
|
|
This can be quite noisy and isn't generally useful information.
|
|
Just a small quality of life improvement :^)
|
|
The microvm machine type is a modern tool for kernel and firmware
developers to test their software against features like FDTs, second
IOAPIC, lack of legacy devices by default, the ability of using PCIe
without using PCI x86 IO ports, etc.
We can boot into such machine but we are limited in the functionality we
support currently for this type of virtual machine.
|
|
The ISA-PC machine type provides no PCI bus support, no IOAPIC support
and other modern PC features of our generation.
This is mainly a good environment for testing abstractions in the kernel
space, and can help with improving on them for the sake of porting the
OS to other chipsets and CPU architectures.
|