summaryrefslogtreecommitdiff
path: root/Meta/Lagom
AgeCommit message (Collapse)Author
2022-02-08LibJS+Everywhere: Remove all VM::clear_exception() callsdavidot
Since VM::exception() no longer exists this is now useless. All of these calls to clear_exception were just to clear the VM state after some (potentially) failed evaluation and did not use the exception itself.
2022-02-07LibGUI: Remove GML prefix in favor of proper namespacekleines Filmröllchen
Prefixes are very much a C thing which we don't need in C++. This commit moves all GML-related classes in LibGUI into the GUI::GML namespace, a change somewhat overdue.
2022-02-07Meta: Add instructions on using Lagom in an external projectJames Puleo
2022-02-07LibWeb: Add a proper FocusEvent interface for "focus" and "blur" eventsAndreas Kling
2022-02-06Everywhere: Rename JS::PropertyKey variables from property_{name => key}Linus Groh
PropertyKey used to be called PropertyName, but got renamed. Let's update all the variables of this type as well.
2022-02-06Lagom: Exclude libraries with X86 code when building for macOS on ArmMorten Larsen
The CMakeLists.txt for Lagom contains a few libraries and executables with X86-specific code. By excluding those libraries, Lagom builds for macOS on Arm as well. The places are marked FIXME to be removed when the libraries will build for Arm.
2022-02-04LibWeb: Type-check calc() in in property_accepts_value()Sam Atkins
This means only CalculatedStyleValues that would return the desired type will be accepted.
2022-02-03LibWeb: Add barebones CanvasGradient objectAndreas Kling
Also add the CanvasRenderingContext2D APIs to go along with it. Note that it can't be used for anything yet.
2022-02-03LibTimeZone: Parse and generate time zone coordinate dataTimothy Flynn
2022-01-31LibUnicode: Download and parse {Grapheme,Word,Sentence} break propsIdan Horowitz
2022-01-31Everywhere: Update copyrights with my new serenityos.org e-mail :^)Timothy Flynn
2022-01-31LibWeb: Add initial support for passing union types into IDL functionsLuke Wilde
This currently does not accept ArrayBuffer, DataView, TypedArrays, callback functions, nullable types, dictionaries, records and frozen arrays.
2022-01-31LibWeb: Add support for passing sequences into IDL functionsLuke Wilde
2022-01-31LibTimeZone: Use new generator util to generate all time zonesTimothy Flynn
Added the call to generate_available_values(), then realized it is the exact same as the existing, manually written implementation. So let's use the new utility.
2022-01-31LibUnicode: Generate a list of available currenciesTimothy Flynn
2022-01-31LibUnicode: Generate a list of available numbering systemsTimothy Flynn
2022-01-31LibUnicode: Generate a list of available calendarsTimothy Flynn
2022-01-29LibUnicode: Fill in case-first and numeric BCP47 keywordsTimothy Flynn
Unlike other BCP47 keywords that we are parsing, these only appear in the BCP47 XML file itself within the CLDR. The values are very simple though, so just hard code them until the Unicode org re-releases the CLDR with BCP47: https://unicode-org.atlassian.net/browse/CLDR-15158
2022-01-29IPCCompiler: Don't loop endlessly on nameless parametersItamar
Previously, given a malformed IPC call declaration, where a parameter does not have a name, the IPCCompiler would spin endlessly while consuming more and more memory. This is because it parses the parameter type incorrectly (it consumes superfluous characters into the parameter type). An example for such malformed declaration is: tokens_info_result(Vector<GUI::AutocompleteProvider::TokenInfo>) =| As a temporary fix, this adds VERIFY calls that would fail if we're at EOF when parsing parameter names. A real solution would be to parse C++ parameter types correctly. LibCpp's Parser could be used for this task.
2022-01-27LibUnicode: Parse and generate relative-time format patternsTimothy Flynn
Relative-time format patterns are of one of two forms: * Tensed - refer to the past or the future, e.g. "N years ago" or "in N years". * Numbered - refer to a specific numeric value, e.g. "in 1 year" becomes "next year" and "in 0 years" becomes "this year". In ECMA-402, tensed and numbered refer to the numeric formatting options of "always" and "auto", respectively.
2022-01-27LibUnicode: Create a nearly empty generator for relative-time formattingTimothy Flynn
This sets up the generator plumbing to create the relative-time data files. This data could probably be included in the date-time generator, but that generator is large enough that I'd rather put this tangentially related data in its own file.
2022-01-27LibUnicode: Remove extraneous semi-colons at end of generator functionsTimothy Flynn
2022-01-27LibUnicode: Generate per-locale minimum grouping digit valuesTimothy Flynn
Previously, we were breaking up digits into groups without regard for the locale's minimumGroupingDigits value in the CLDR. This value is 1 in most locales, but is 2 in locales such as pl-PL. What this means is that in those locales, the group separator should only be inserted if the thousands group has at least 2 digits. So 1000 is formatted as "1,000" in en-US, but "1000" in pl-PL. And 10000 is "10,000" in en-US and "10 000" in pl-PL.
2022-01-25Tests+LibJS: Add very simple bytecode LibJS testsdavidot
These tests are not meant as a replacement to test-js with the -b option but are meant to test simple cases until that works. Before this it was very easy to accidentally break bytecode since no tests were run in bytecode mode. This hopefully makes it easier to spot such regressions :^).
2022-01-25LibJS+LibUnicode: Convert Intl.ListFormat to use Unicode::StyleTimothy Flynn
Remove ListFormat's own definition of the Style enum, which was further duplicated by a generated ListPatternStyle enum with the same values.
2022-01-25LibTimeZone: Handle time zones which begin the year in daylight savingsTimothy Flynn
2022-01-25LibTimeZone: Add an API to retrieve both daylight and standard offsetsTimothy Flynn
This API will also include the formatted name of the time zone, with respect for DST (e.g. EST vs EDT for America/New_York).
2022-01-25LibTimeZone: Slightly refactor the generated DST rule finding methodTimothy Flynn
This just splits up the method to find the active DST rule for specified time and time zone. This is to allow re-using the now split-off function in upcoming commits.
2022-01-25LibTimeZone: Parse and generate time zone abbreviation format stringsTimothy Flynn
For example, today, America/New_York has the format string "E%sT" and uses US DST rules. Those rules indicate the %s should be replaced by a "D" in daylight time and "S" in standard time.
2022-01-25AK: Standardize the behaviour of GenericLexer::consume_until overloadsIdan Horowitz
Before this commit all consume_until overloads aside from the Predicate one would consume (and ignore) the stop char/string, while the Predicate overload would not, in order to keep behaviour consistent, the other overloads no longer consume the stop char/string as well.
2022-01-23Meta+LibEDID: Download and generate the PNP ID databaseTom
This downloads the UEFI's published PNP ID database and generates a lookup table for use in LibEDID. The lookup table isn't optimized at all, but this can be easily done at a later point if needed.
2022-01-23LibJS+LibIMAP: Use the new Optional<U>(Optional<T>) constructorIdan Horowitz
These look much nicer than these repeated ternaries :^)
2022-01-23Everywhere: Convert VM::call() to JS::call()mjz19910
2022-01-23LibTimeZone: Add an API to retrieve a list of all known IANA time zonesTimothy Flynn
2022-01-22Utilities+Lagom: Remove test-cryptoNico Weber
After 4d5ffd364a3, Tests/{LibCrypto,LibTLS} test the same things and test-crypto has been redundant since then.
2022-01-22LibJS: Refactor interpreter to use Script and Source Text ModulesLuke Wilde
This also refactors interpreter creation to follow InitializeHostDefinedRealm, but I couldn't fit it in the title :^) This allows us to follow the spec much more closely rather than being completely ad-hoc with just the parse node instead of having all the surrounding data such as the realm of the parse node. The interpreter creation refactor creates the global execution context once and doesn't take it off the stack. This allows LibWeb to take the global execution context and manually handle it, following the HTML spec. The HTML spec calls this the "realm execution context" of the environment settings object. It also allows us to specify the globalThis type, as it can be different from the global object type. For example, on the web, Window global objects use a WindowProxy global this value to enforce the same origin policy on operations like [[GetOwnProperty]]. Finally, it allows us to directly call Program::execute in perform_eval and perform_shadow_realm_eval as this moves global_declaration_instantiation into Interpreter::run (ScriptEvaluation) as per the spec. Note that this doesn't evalulate Source Text Modules yet or refactor the bytecode interpreter, that's work for future us :^) This patch was originally build by Luke for the environment settings object change but was also needed for modules. So I (davidot) have modified it with the new completion changes and setup for that. Co-authored-by: davidot <davidot@serenityos.org>
2022-01-22LibAudio: Convert FlacLoader to use new Core::Stream APIs :^)kleines Filmröllchen
For this change to work "easily", Loader can't take const ByteBuffer's anymore, which is fine for now.
2022-01-21adjtime: Port to LibMainmjz19910
2022-01-20LibWeb: Remove Length::Type::Percentage :^)Sam Atkins
All `<percentage>`s in the CSS grammar are now represented by the `Percentage` class, and `<length-percentage>` by `LengthPercentage`.
2022-01-20LibWeb: Add CSS::Percentage, PercentageOr and LengthPercentage typesSam Atkins
Length and Percentage are different types, and sometimes only one or the other is allowed in a given CSS property. This is a first step towards separating them.
2022-01-19LibJS+LibUnicode: Return the appropriate time zone name depending on DSTTimothy Flynn
2022-01-19LibUnicode: Generate both standard and daylight time zone namesTimothy Flynn
While LibTimeZone didn't support DST, we only generated one of them, preferring the standard name. Now that DST can be tested, generate both names.
2022-01-19LibJS+LibTimeZone+LibUnicode: Indicate whether a time zone is in DSTTimothy Flynn
Return whether the time zone is in DST during the provided time from TimeZone::get_time_zone_offset,
2022-01-19LibJS+LibTimeZone: Begin handling DST when computing time zone offsetsTimothy Flynn
This also updates some expectations in a Temporal time zone offset test that is using a time stamp which is in DST for a few time zones.
2022-01-19LibTimeZone: Parse and generate DST rule links for each ZONE entryTimothy Flynn
Each ZONE entry contains a RULES segment with one of the following: * A DST rule name, which links the ZONE to a RULE entry holding the DST rules to apply. * A static offset to be applied to the STDOFF offset. This implicitly means that the time zone is in DST during that time frame. * A "-" string, meaning no offset is applied to the STDOFF offset, and the time zone is in standard time during that time frame.
2022-01-19LibTimeZone: Begin parsing and generating DaylightSavings rulesTimothy Flynn
2022-01-18LibUnicode: Generate code point abbreviationsTimothy Flynn
2022-01-17LibJS+LibUnicode: Make static const Utf8View variables constexprIdan Horowitz
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2022-01-14gml-format: Port to LibMainLucas CHOLLET