summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2021-09-29LibJS: Convert internal_prevent_extensions() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_set_prototype_of() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_get_prototype_of() to ThrowCompletionOrLinus Groh
2021-09-30LibWeb: Add the CSSStyleRule interface with some limited functionalityAndreas Kling
2021-09-29LibWeb: Generate CSS::property_id_from_camel_case_string()Andreas Kling
This allows us to resolve a "camelCase" CSS property name to our own CSS::PropertyID enum. This will be used by CSSOM bindings.
2021-09-29LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^)Andreas Kling
This patch makes both of these classes inherit from RefCounted and Bindings::Wrappable, plus some minimal rejigging to allow us to keep using them internally while also exposing them to web content.
2021-09-29LibWeb: Add support for custom #import IDL statementsIdan Horowitz
This will currently be used to support dictionary inheritance between dictionaries defined across different IDL definition files.
2021-09-29LibWeb: Add initial support for the IDL [Unscopable] extended attributeLuke Wilde
This adds support for the [Unscopable] extended attribute to attributes and functions. I believe it should be applicable to all interface members, but I haven't done that here.
2021-09-29LibWeb: Make StyleSheetList.item an IDL getterLuke Wilde
2021-09-29RequestServer: Use an OwnPtr for cached connectionsAli Mohammad Pur
Otherwise we'd end up trying to delete the wrong connection if a connection made before us is deleted. Fixes _some_ RequestServer spins (though not all...). This commit also adds a small debug mechanism to RequestServer (which can be enabled by turning REQUEST_SERVER_DEBUG on), that can dump all the current active connections in the cache, what they're doing, and how long they've been doing that by sending it a SIGINFO.
2021-09-29LibWeb: Add support for converting IDL dictionaries to native structsIdan Horowitz
2021-09-29LibWeb: Add support for parsing IDL dictionariesIdan Horowitz
2021-09-29LibWeb: Change IDL::parse_interface's return type to NonnullOwnPtrIdan Horowitz
We always returned an interface, so there's no need for the null state.
2021-09-28LibWeb: Add partial support for IDL Iterable declarationsIdan Horowitz
This currently only supports pair iterables (i.e. iterable<key, value>) support for value iterables (i.e. iterable<value>) is left as TODO(). Since currently our cmake setup calls the WrapperGenerator separately and unconditionally for each (hard-coded) output file iterable wrappers have to be explicitly marked so in the CMakeLists.txt declaration, we could likely improve this in the future by querying WrapperGenerator for the outputs based on the IDL.
2021-09-28LibWeb: Add support for wrapping arbitrary values to WrapperGeneratorIdan Horowitz
This patch essentially just splits the non return-specific logic from generate_return_statement (i.e. the wrapping of the cpp value into a javascript one) into a separate function generate_wrap_statement that can be used to wrap any cpp value during wrapper generation.
2021-09-28LibWeb: Only consume [a-zA-Z0-9_] characters for IDL typesIdan Horowitz
2021-09-27LibWeb: Add support for the any type in returning and parametersLuke Wilde
Required for CustomEvent.
2021-09-27LibWeb: Add [CustomVisit] IDL interface extended attributeLuke Wilde
This custom attribute will be used for objects that hold onto arbitrary JS::Value's. This is needed as JS::Handle can only be constructed for objects that implement JS::Cell, which JS::Value doesn't. This works by overriding the `visit_edges` function in the wrapper. This overridden function calls the base `visit_edges` and then forwards it to the underlying implementation. This will be used for CustomEvent, which must hold onto an arbitrary JS::Value for it's entire lifespan.
2021-09-26Meta: Pass `-serial stdio` to qemu on aarch64Nico Weber
With this, `Meta/serenity.sh run aarch64` produces some output on the terminal :^)
2021-09-27LibWeb: Add DOMRect and Element.getBoundingClientRect()Andreas Kling
This marks our entry into the Web::Geometry namespace, based on the "Geometry" spec at https://drafts.fxtf.org/geometry/
2021-09-26LibWeb: Add support for IDL legacy platform objectsLuke Wilde
A legacy platform object is a non-global platform object that implements a special operation. A special operation is a getter, setter and/or deleter. This is particularly used for old collection types, such as HTMLCollection, NodeList, etc. This will be used to make these spec-compliant and remove their custom wrappers. Additionally, it will be used to implement collections that we don't have yet, such as DOMStringMap.
2021-09-25LibWeb: Return undefined from generated EventHandler settersIdan Horowitz
Returning an empty value without throwing an exception is no longer valid.
2021-09-24LibWeb: Clarify StyleValue API with new naming schemeSam Atkins
This does a few things, that are hard to separate. For a while now, it's been confuzing what `StyleValue::is_foo()` actually means. It sometimes was used to check the type, and sometimes to see if it could return a certain value type. The new naming scheme is: - `is_length()` - is it a LengthStyleValue? - `as_length()` - casts it to LengthStyleValue - `has_length()` - can it return a Length? - `to_length()` - gets the internal value out (eg, Length) This also means, no more `static_cast<LengthStyleValue const&>(*this)` stuff when dealing with StyleValues. :^) Hopefully this will be a bit clearer going forward. There are lots of places using the original methods, so I'll be going through them to hopefully catch any issues.
2021-09-24LibWeb: Return undefined from generated setters, not an empty valueLinus Groh
These now crash as VM::call() uses ThrowExceptionOr<T>, which refuses to hold an empty JS::Value as its non-exception result. We only need to return an empty value when should_return_empty() says so for the return value of throw_dom_exception_if_needed(). Co-authored-by: Luke Wilde <lukew@serenityos.org>
2021-09-23LibWeb: Add range-checking to property_accepts_value()Sam Atkins
For `number` and `integer` types, you can add a range afterwards to add a range check, using similar syntax to that used in the CSS specs. For example: ```json "font-weight": { ... "valid-types": [ "number [1,1000]" ], ... } ``` This limits any numbers to the range `1 <= n <= 1000`.
2021-09-23LibWeb: Generate property_accepts_value() function :^)Sam Atkins
Previously, we have not been validating the values for CSS declarations inside the Parser. This causes issues, since we should be discarding invalid style declarations, so that previous ones are used instead. For example, in this code: ```css .foo { width: 2em; width: orange; } ``` ... the `width: orange` declaration overwrites the `width: 2em` one, even though it is invalid. According to the spec, `width: orange` should be rejected at parse time, and discarded, leaving `width: 2em` as the resulting value. Many properties (mostly shorthands) are parsed specially, and so they are already rejected if they are invalid. But for simple properties, we currently accept any value. With `property_accepts_value()`, we can check if the value is valid in `parse_css_value()`, and reject it if it is not.
2021-09-23LibWeb: Generate property_maximum_value_count()Sam Atkins
This will allow the CSS Parser to check if a property has been give too many arguments, and if so, reject it as invalid.
2021-09-21LibWeb: Don't add shorthand CSS properties to cascaded valuesAndreas Kling
We already expand shorthands in the cascade, so there's no need to preserve them in the output. This patch reorganizes the CSS::PropertyID enum values so that we can easily iterate over all shorthand or longhand properties.
2021-09-21CI: Create a secondary ccache for the Clang toolchain buildTimothy Flynn
We bust the prebuilt cache when any header in e.g. LibC changes. Doing a full toolchain rebuild probably isn't necessary, so this adds a separate ccache to speed up toolchain builds.
2021-09-21CI: Set ccache path based on template parameterTimothy Flynn
Currently, the templated steps in Caches.yml rely on the environment variable CCACHE_DIR being set to configure the ccache location. To prepare for multiple ccache paths, do not rely on this environment variable because only one ccache can use it at a time. Instead, pass the path into the template as a parameter.
2021-09-21LibWeb: Don't print debug spam when looking up missing initial valuesAndreas Kling
I'm about to look up a lot of missing values, and the spam was getting out of hand.
2021-09-19LibWeb: Implement basic support for MessageChannel and MessagePortAndreas Kling
This patch adds a basic initial implementation of these API's. Since LibWeb currently doesn't support workers, this implementation of messaging doesn't bother with serializing and deserializing messages.
2021-09-19Meta: Bump default VM memory size to 1 GiBAndreas Kling
2021-09-18Lagom/Fuzzers: Add fuzzer for the LibCrypto PEM parserBrian Gianforcaro
2021-09-18Lagom/Fuzzers: Add fuzzer for the LibTLS ASN1 parserBrian Gianforcaro
2021-09-18Documentation: Update Lagom ReadMe with new fuzzer build instructionsAndrew Kaster
2021-09-17LibWeb: Generate shorthand initial values after their longhandsSam Atkins
When parsing shorthand values, we'd like to use `property_initial_value()` to get their longhand property values, instead of hard-coding them as we currently do. That involves recursively calling that function while the `initial_values` map is being initialized, which causes problems because the shorthands appear alphabetically before their longhand components, so the longhands aren't initialized yet! The solution here is to perform 2 passes when generating the code, outputting properties without "longhands" first, and the rest after. This could potentially cause issues when shorthands have multiple levels, in particular `border` -> `border-color` -> `border-left-color`. But, we do not currently define a default value for `border`, and `border-color` takes only a single value, so it's fine for now. :^)
2021-09-17LibWeb: Add the IdleDeadline interface from the RequestIdleCallback specAndreas Kling
2021-09-17Meta: Set SERENITY_ARCH if it is not set in debug-kernel.shBrian Gianforcaro
This appears to have regressed recently in commit 783a58dbc.
2021-09-16Meta: Ensure BUILD_LAGOM is set when running `serenity.sh test lagom`Andrew Kaster
If the superbuild created the lagom binary directory, it won't set BUILD_LAGOM=ON in the CMake cache for that binary directory. Insert a check into build_target() to make sure that if the user explicitly asks for the lagom target, we have all our ducks in a row.
2021-09-16CI+Meta: Update Sonar Cloud CI job for new SuperBuild configurationAndrew Kaster
This requires exposing the `configure` step on the `serenity` ExternalProject in the SuperBuild CMakeLists so that we can continue to only build the generated sources and not the entire OS.
2021-09-16Meta: Fix Lagom RPATH for non-Ubuntu Linux and macOS hostsAndrew Kaster
Multi-lib distros like Gentoo and Fedora install lagom-core.so into lagom-install/lib64 rather than lib. Set the install RPATH based on CMAKE_INSTALL_LIBDIR to avoid the wrong path being set in the binaries. Also apply macOS specific RPATH rules to fix the build on that platform.
2021-09-15Meta: Make QtCreator aware of all CMake filesBen Wiederhake
2021-09-15Meta: Add FIXME for not setting BUILD_SHARED_LIBS in Lagom buildAndrew Kaster
This is really the business of the consuming project. We will need to make changes to libjs-test262 and to oss-fuzz to address this properly.
2021-09-15Meta: Update serenity.sh for the SuperBuildAndrew Kaster
Direct build commands to the SuperBuild's binary directory, and image/run commands to the Serenity binary directory. As a side benefit, make the lagom target only build Lagom instead of the entire OS alongside Lagom.
2021-09-15Meta: Switch to a SuperBuild that splits host and target buildsAndrew Kaster
Replace the old logic where we would start with a host build, and swap all the CMake compiler and target variables underneath it to trick CMake into building for Serenity after we configured and built the Lagom code generators. The SuperBuild creates two ExternalProjects, one for Lagom and one for Serenity. The Serenity project depends on the install stage for the Lagom build. The SuperBuild also generates a CMakeToolchain file for the Serenity build to use that replaces the old toolchain file that was only used for Ports. To ensure that code generators are rebuilt when core libraries such as AK and LibCore are modified, developers will need to direct their manual `ninja` invocations to the SuperBuild's binary directory instead of the Serenity binary directory. This commit includes warning coalescing and option style cleanup for the affected CMakeLists in the Kernel, top level, and runtime support libraries. A large part of the cleanup is replacing USE_CLANG_TOOLCHAIN with the proper CMAKE_CXX_COMPILER_ID variable, which will no longer be confused by a host clang compiler.
2021-09-15Meta: Move all options to targetname_options.cmake filesAndrew Kaster
This common strategy of having a serenity_option() macro defined in either the Lagom or top level CMakeLists.txt allows us to do two things: First, we can more clearly see which options are Serenity-specific, Lagom-specific, or common between the target and host builds. Second, it enables the upcoming SuperBuild changes to set() the options in the SuperBuild's CMake cache and forward each target's options to the corresponding ExternalProject.
2021-09-15Meta: Add Meta/CMake to the CMAKE_MODULE_PATH for Serenity and LagomAndrew Kaster
This makes it so we don't need to specify the full path to all the helper scripts we include() from different places in the codebase and feels a lot cleaner.
2021-09-15Meta: Use Lagom:: namespaced names for code generatorsAndrew Kaster
This will be required when we switch to a SuperBuild that has Lagom as a configure time dependency, but is a distinct enough change to be separate.
2021-09-15Meta: Allow specifying alternative paths for downloaded Unicode dataAndrew Kaster
This lets us possibly share downloaded artifacts between different builds without re-downloading them every time you change toolchains.