Commit Graph

1320 Commits

Author SHA1 Message Date
Sam Atkins
b07659d00c Meta+LibWeb: Port PropertyID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Sam Atkins
fc81d6c9f3 Meta+LibWeb: Port ValueID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Sam Atkins
cb406e79f4 Meta+LibWeb: Port MediaFeatureID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Idan Horowitz
b172b56757 LibWeb: Include relevant headers in IDL constructor implementations
Similarly to implementations of prototype methods, the implementations
of constructors sometimes require generated types.
2022-04-02 13:13:37 +03:00
Idan Horowitz
a7f2d46b49 LibWeb: Support integral default values for IDL unions 2022-04-02 13:13:37 +03:00
Idan Horowitz
32d142b06c LibWeb: Remove no-op calls to emit_includes_for_all_imports for headers
When called with is_header=true the method was essentailly a no-op.
2022-04-02 13:13:37 +03:00
Idan Horowitz
110d73d786 LibWeb: Strip double quotes from IDL enum default values 2022-04-02 13:13:37 +03:00
Idan Horowitz
3ee8b5e534 LibWeb: Cache and reuse resolved IDL imports instead of rejecting them
This ensures that transitive imports succeed even if they were directly
imported beforehand.
2022-04-02 12:22:48 +04:30
Ali Mohammad Pur
265dd9b445 Meta: Avoid showing elements in extremely large vectors in gdb
This is most often just an invalid vector anyway.
2022-04-01 21:41:41 +01:00
Ali Mohammad Pur
899888bbf2 Meta: Update gdb script for changes in HashTable 2022-04-01 21:41:41 +01:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Idan Horowitz
852ae6c195 Meta: Switch to clang-format-14 as the standard formatter
Now that clang-format-14 ubuntu packages are available, it's time to
finally upgrade our clang-format version. This version brings with it
a bunch of useful features with const-placement being the most notable.
These will be enabled in the following commits.
2022-04-01 21:24:45 +01:00
Liav A
d0abae8907 Kernel: Stop debug spam when using mmap on /dev/mem device
This is not really useful and quite annoying so let's disable it by
default.
2022-04-01 19:59:45 +02:00
Tim Schumacher
743922984c Fuzzers: Add a basic input shim when running standalone 2022-03-31 22:11:04 -07:00
Tim Schumacher
bf502ae3b0 CMake: Allow building fuzzing targets without libFuzzer or OSS-Fuzz 2022-03-31 22:11:04 -07:00
Tim Schumacher
e3519b8e5c Meta: Rename Fuzzer flags to ENABLE_FUZZERS_{LIBFUZZER,OSSFUZZ} 2022-03-31 22:11:04 -07:00
EWouters
98db3a3ce9 Meta: Fix format-string in the port linter 2022-03-31 21:59:20 -07:00
Matthew Olsson
5f9d35909d LibPDF: Move font files into their own directory 2022-03-31 18:10:45 +02:00
Idan Horowitz
f45d361f03 LibWeb: Replace ad-hoc EventHandler type with callback function typedef 2022-03-31 01:10:47 +02:00
Idan Horowitz
1c4f128fd1 LibWeb: Add support for IDL callback functions 2022-03-31 01:10:47 +02:00
Idan Horowitz
9ff79c9d54 LibWeb: Support non-interface top-level extended attributes 2022-03-31 01:10:47 +02:00
Idan Horowitz
c14cb65215 LibWeb: Add support for IDL typedefs 2022-03-31 01:10:47 +02:00
Idan Horowitz
f0cd28dedd LibWeb: Stop generating C++ includes for non-code-generating IDL files
Specifically, IDL files that do not include interface or enumeration
declarations do not generate any code, and as such should not be
included.
2022-03-31 01:10:47 +02:00
Pankaj Raghav
820a653725 Meta: Use 4k logical and physical blocks for nvme in QEMU
4k logical blocks are better for block devices in QEMU as they align
with the underlying filesystem which typically has 4k logical blocks
such as our EXT2 filesystem.
2022-03-30 19:31:12 +03:00
Timothy Flynn
066352c9aa LibJS+LibUnicode: Align ECMA-402 "sanctioned" terminology with UTS 35
This is an editorial change in the Intl spec. See:
https://github.com/tc39/ecma402/commit/087995c
https://github.com/tc39/ecma402/commit/233d29c

This also adds a missing spec link for the sanctioned units and fixes a
broken spec link for IsSanctionedSingleUnitIdentifier. In LibUnicode,
the NumberFormat generator is updated to use the constexpr helper to
retrieve sanctioned units.
2022-03-30 14:24:32 +01:00
Tom Maisey
d63cb35c0d Meta: Fix e2fsck variable on macOS in build-image-qemu.sh
Despite carefully adding homebrew's e2fsprogs to the PATH,
the script then defined E2FSCK as if we are always on Linux.
2022-03-30 01:57:51 -07:00
Idan Horowitz
824cf570d3 LibWeb: Stop casting unsigned long IDL return values to i32
These values may not fit into an i32.
2022-03-30 08:56:25 +03:00
Idan Horowitz
44601a8e74 LibWeb: Support IDL optional integer arguments 2022-03-30 08:56:25 +03:00
Kenneth Myhra
de7d333d43 markdown-check: Port to LibMain 2022-03-29 21:28:29 -07:00
Jelle Raaijmakers
c637795888 Ports: Update PHP to 8.1.4 2022-03-29 22:49:27 +01:00
Andreas Kling
ab4c73746c LibWeb: Add @@toStringTag own property on wrappers
This makes wrappers stringify to the expected "[object InterfaceName]"
instead of just "[object Object]".
2022-03-29 17:03:15 +02:00
Karol Kosek
dcb24e943d Tests: Add a basic UTF-8 to UTF-8 LibTextCodec test 2022-03-29 01:01:32 +02:00
Daniel Bertalan
3d0178a2f7 Meta: Do not try to unzip the already decompressed WASM test suite .tar
WASM_SPEC_TEST_TAR_PATH actually refers to a tarball that has already
been decompressed with gzip, so running `tar -xzf` on it fails.

I introduced this mistake in 66582a875f.

There is no need to keep an intermediary plain .tar file around, we can
pass the WASM_SPEC_TEST_GZ_PATH .tar.gz directly to `tar -xzf`.
2022-03-29 00:00:36 +02:00
Ali Mohammad Pur
67357fe984 LibXML: Add a fairly basic XML parser
Currently this can parse XML and resolve external resources/references,
and read a DTD (but not apply or verify its rules).
That's good enough for _most_ XHTML documents as the HTML 5 spec
enforces its own rules about document well-formedness, and does not make
use of XML DTDs (aside from a list of predefined entities).

An accompanying `xml` utility is provided that can read and dump XML
documents, and can also run the XML conformance test suite.
2022-03-28 23:11:48 +02:00
Hendiadyoin1
bd6927ecab Meta: Refactor the IPC-compiler and port it to LibMain
This does a few things in total:
* Ports the IPC-compiler to LibMain
* Extract some compiler steps into separate functions
* Minify some appends to use appendln (or appendff in the case of
  StringBuilder)

This reduces the clang-tidies maximum cognitive-complexity score for
this file from 325 to under 100.
2022-03-28 23:08:08 +02:00
Daniel Bertalan
66582a875f Meta: Specify -z when decompressing tar.gz archives
While GNU tar automatically detects the used compression algorithm,
POSIX requires that we specify -z if the tarball is compressed with
gzip.

Fixes a build error on OpenBSD.
2022-03-27 12:17:59 -07:00
Linus Groh
6ca03b915e Kernel: Support all Intel-defined CPUID feature flags for EAX=1
We're now able to detect all the regular CPUID feature flags from
ECX/EDX for EAX=1 :^)

None of the new ones are being used for anything yet, but they will show
up in /proc/cpuinfo and subsequently lscpu and SystemMonitor.

Note that I replaced the periods from the SSE 4.1 and 4.2 instructions
with underscores, which matches the internal enum names, Linux's
/proc/cpuinfo and the general pattern of replacing special characters
with underscores to limit feature names to [a-z0-9_].

The enum member stringification has been moved to a new function for
better re-usability and to avoid cluttering up Processor.cpp.
2022-03-27 18:54:56 +02:00
Linus Groh
4727b5bd4d Meta: Fix path to GCC's addr2line in serenity.sh
I'm not sure when this changed, but the path is wildly different now.
2022-03-27 18:54:56 +02:00
Sam Atkins
d6901d2119 Meta: Add range checking to all numeric CSS types
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.
2022-03-26 18:15:08 +01:00
Andreas Kling
261cd1d4c7 LibWeb: Mark CSS properties as not affecting stacking context by default
We were mistakenly treating all CSS properties as if changing them
requires a rebuild of the stacking context tree.
2022-03-25 11:57:30 +01:00
Tim Schumacher
fad1114d4d Meta: Remove obsolete HeaderCheck .gitignore
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.
2022-03-24 20:11:39 -07:00
Idan Horowitz
45c5fcf5cb Meta: Disable KASLR when debugging the kernel with GDB
This lets GDB resolve the kernel symbols correctly.
2022-03-24 23:36:56 +00:00
Idan Horowitz
5626e1b324 LibWeb: Rename PARSER_DEBUG => HTML_PARSER_DEBUG
Since this macro was created we gained a couple more parsers in the
system :^)
2022-03-24 21:37:49 +01:00
Lenny Maiorani
e08cd4d608 CMake: Add serenity_lib_static 2022-03-24 03:04:57 +01:00
Timothy Flynn
324f709d29 LibWeb: Support IDL default values of "null" for optional arguments
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.
2022-03-22 02:08:15 +01:00
Timothy Flynn
57296393ed LibWeb: Begin implementing SVGRectElement's SVGAnimatedLength attributes 2022-03-21 21:04:39 +01:00
Timothy Flynn
3ebc5cc58e LibWeb: Support generating IDL float types
The float type is used quite a bit in the SVG spec.
2022-03-21 21:04:39 +01:00
Andreas Kling
8c88ee1165 LibWeb: Only invalidate stacking context tree for opacity/z-index change
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. :^)
2022-03-21 13:03:33 +01:00
Nico Weber
681fac07ed Meta: Always disable kvm on aarch64 hosts for now
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.
2022-03-20 19:53:47 -07:00
Nico Weber
20c6dabaff Lagom: Build with -fsigned-char
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.
2022-03-20 19:53:47 -07:00