Commit graph

1355 commits

Author SHA1 Message Date
Ali Mohammad Pur 302a0c54f0 Base: Add some default completions to shellrc 2022-04-18 19:53:10 +04:30
Sam Atkins 42d87239a8 LibWeb: Generate some metadata about transform functions
This will be used to parse and validate their parameters.
2022-04-18 14:16:28 +02:00
Sam Atkins 872ad98eba LibWeb: Generate TransformFunction to/from string functions 2022-04-18 14:16:28 +02:00
Sam Atkins 5f3498d50f LibWeb: Add code generator for CSS transform functions
This first step just generates the TransformFunction enum, but more will
follow.
2022-04-18 14:16:28 +02:00
Tim Schumacher 8c278bba43 Meta: Keep timestamps of manually copied toolchain output 2022-04-17 10:53:31 -07:00
Jelle Raaijmakers 8cfabbcd93 Tests: Implement reference image testing for LibGL
Each LibGL test can now be tested against a reference QOI image.
Initially, these images can be generated by setting `SAVE_OUTPUT` to
`true`, which will save a bunch of QOI images to `/home/anon`.
2022-04-17 09:58:29 +04:30
Sam Atkins d564cf1e89 LibCore+Everywhere: Make Core::Stream read_line() return StringView
Similar reasoning to making Core::Stream::read() return Bytes, except
that every user of read_line() creates a StringView from the result, so
let's just return one right away.
2022-04-16 13:27:51 -04:00
Sam Atkins 3b1e063d30 LibCore+Everywhere: Make Core::Stream::read() return Bytes
A mistake I've repeatedly made is along these lines:
```c++
auto nread = TRY(source_file->read(buffer));
TRY(destination_file->write(buffer));
```

It's a little clunky to have to create a Bytes or StringView from the
buffer's data pointer and the nread, and easy to forget and just use
the buffer. So, this patch changes the read() function to return a
Bytes of the data that were just read.

The other read_foo() methods will be modified in the same way in
subsequent commits.

Fixes #13687
2022-04-16 13:27:51 -04:00
Sam Atkins a20188cd91 LibWeb: Use generated enum code for property value validation
This has the nice benefit of removing a lot of duplicated lists of
values from Properties.json. :^)
2022-04-14 14:54:06 +02:00
Sam Atkins c66da0f2cb LibWeb: Assign an underlying type to generated CSS enums
I'm *pretty* sure that even a u32 would be overkill but you never know
with CSS specs.
2022-04-14 14:54:06 +02:00
Sam Atkins c50661067d LibWeb: Generate and use to_string(css_enum) functions
The only one that's actually used is for Repeat, but it's easy to
generate them so might as well. :^)
2022-04-14 14:54:06 +02:00
Sam Atkins 9bf511caa3 LibWeb: Generate to_value_id() functions 2022-04-14 14:54:06 +02:00
Sam Atkins 3f61f869c8 LibWeb: Generate ValueID-to-enum conversion functions 2022-04-14 14:54:06 +02:00
Sam Atkins a97944e483 LibWeb: Add a new code generator for CSS enums
Alias values are represented by "alias-name=real-name".

We have a lot of repetitive code for converting between ValueID and
property-specific enums. Let's see if we can generate it. :^)

This first step just produces the enums, from a JSON file. The values in
there are a duplication of what's in Properties.json, but eventually
those will go away.
2022-04-14 14:54:06 +02:00
Sam Atkins c449cabae3 LibWeb: Move CSS Parser into new Web::CSS::Parser namespace
The goal here is to move the parser-internal classes into this namespace
so they can have more convenient names without causing collisions. The
Parser itself won't collide, and would be more convenient to just
remain `CSS::Parser`, but having a namespace and a class with the same
name makes C++ unhappy.
2022-04-12 23:03:46 +02:00
EWouters d89a58216d Ports/pt2-clone: Update pt2-clone to version 1.43
Upgrade patches to git style, add ReadMe.md and remove from the list
of ports missing descriptions.
2022-04-11 19:43:56 -07:00
EWouters cf0798158a Ports/klong: Update klong to version 20220315
Upgrade patch to git style, add ReadMe.md and remove from the list of
ports missing descriptions.
2022-04-11 19:43:56 -07:00
EWouters 769615fc48 Ports/gawk: Update gawk to version 5.1.1
The patch for config.sub is no longer required.

This also removes gawk from the list of ports missing descriptions as
it no longer has any patches.
2022-04-11 19:43:56 -07:00
EWouters 8828b038f5 Ports/diffutils: Update diffutils to version 3.8
The fnmatch patch that was added in 6de6dff is reverted because it is
not clear why it is necessary, as discussed in #9206.

This also removes diffutils from the list of ports missing descriptions
as it no longer has any patches.
2022-04-11 19:43:56 -07:00
Simon Wanner 4cbbb72ce8 Meta/Lagom: Add a fuzzer for the WOFF parser 2022-04-09 23:48:18 +02:00
Simon Wanner bf6d64c199 LibGfx: Add a loader the Web Open Font Format (WOFF)
This format is 'just' a zlib compressed wrapper for TrueType/OpenType
which makes implementing it rather convenient. :^)
2022-04-09 23:48:18 +02:00
Simon Wanner 206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Simon Wanner 6f8fd91f22 LibGfx: Move TTF files from TrueTypeFont/ to Font/TrueType/ 2022-04-09 23:48:18 +02:00
stelar7 ce08fae13b Meta: Add fuzzer for Poly1305 2022-04-08 14:02:02 +04:30
Timothy Flynn 1f2542247f LibUnicode: Upgrade to CLDR version 41.0.0
Release notes: https://cldr.unicode.org/index/downloads/cldr-41

Note that the HourCycleRegion enum now contains 272 entires, thus needs
to be bumped from u8 to u16.
2022-04-07 08:29:10 -04:00
Timothy Flynn 8a46794ff8 LibUnicode: Replace individual UCD file downloads with single UCD.zip
Instead of downloading nearly 20 files individually, we can download a
single .zip file similar to how we download a single CLDR .zip. This is
to reduce the number of connections/downloads to/from unicode.org.
2022-04-06 17:12:08 -07:00
Stephan Unverwerth 5bb76e9b63 LibGL+LibGPU+LibSoftGPU: Load SoftGPU driver dynamically
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
2022-04-06 11:32:24 +02:00
Kenneth Myhra 0b86574293 LibWeb: Verify argument_check before generating if statement
This fixes an error where we would generate an empty 'if' statement body
if argument_check was empty.
2022-04-05 22:33:44 +02:00
Kenneth Myhra 887e13f364 LibWeb: Get argument count from Function::parameters::size()
Previously this retrieved argument count from Function::length() which
did not return the correct count in all situations.
2022-04-05 22:33:44 +02:00
Kenneth Myhra ba23d036bd LibWeb: Add IDLGenerators::is_primitive()
This adds the is_primitive() method as described in the Web IDL
specification. is_primitive() returns true if the type is a bigint,
boolean or numeric type.
2022-04-05 22:33:44 +02:00
Timothy Flynn b36c3a68d8 js: Convert non-UTF-8 encoded files to UTF-8 before parsing 2022-04-05 00:14:29 +01:00
Nico Weber fd82121319 Tests: Add some test coverage for the TTF parser
This is in Tests/LibTTF instead of Tests/LibGfx because Tests/LibGfx
depends on serenity's file system layout and can't run in lagom,
but this new test runs just fine in lagom.
2022-04-03 19:16:03 +02:00
Nico Weber 9b24600779 Meta: Give Lagom build errors colored diagnostics
Non-lagom builds get this from the root CMakeLists.txt file,
but lagom builds didn't before this change.
2022-04-03 19:16:03 +02:00
Jelle Raaijmakers 9ca15793e7 Meta: Move screenshots into subdir
It's a bit neater to give them their own directory instead of jamming
them in between our shell scripts :^)
2022-04-03 13:14:15 +01:00
Jelle Raaijmakers 31b72c20f0 Meta: Check port property for ports in the linter
We now make sure the directory name and `port` property are identical.
2022-04-03 12:35:14 +01:00
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