summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2022-07-15LibUnicode: Fallback to per-locale default calendarsTimothy Flynn
When patterns, symbols, etc. for a requested calendar are not found, use the locale's default calendar.
2022-07-15LibUnicode: Fallback to per-locale default numbering systemsTimothy Flynn
When patterns, grouping digits, symbols, etc. for a requested numbering system are not found, use the locale's default numbering system. This will allow using the correct digits e.g. for the locale "en-u-nu-arab" even though the "en" locale only contains patterns for the "latn" numbering system.
2022-07-15LibUnicode: Generate a method to lookup locale-preferred keyword valuesTimothy Flynn
2022-07-15LibUnicode: Generate a method to lookup available keyword valuesTimothy Flynn
2022-07-15LibUnicode: Generate available values for the keywords co, kf, kn, hcTimothy Flynn
This also ensures we only include values we actually support in the generated list of available values.
2022-07-14LibWeb: Add definitions from '2.2.1. Methods' in the Fetch specLinus Groh
2022-07-14LibWeb: Move Origin into the HTML namespaceLinus Groh
Origin is defined in the HTML Standard, and therefore belongs into the HTML directory and namespace in LibWeb. https://html.spec.whatwg.org/multipage/origin.html#origin
2022-07-14LibCore: Replace the ArgsParser option argument setting with an enumTim Schumacher
Replacement conditions for `requires_argument` have been chosen based on what would be most convenient for implementing an eventual optional argument mode.
2022-07-13Meta+Ports: Automatically generate a meson cross file that we can useTim Schumacher
2022-07-12Everywhere: Use default StringView constructor over nullptrsin-ack
While null StringViews are just as bad, these prevent the removal of StringView(char const*) as that constructor accepts a nullptr. No functional changes.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Split Error::from_string_literal and Error::from_string_viewsin-ack
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-07-12Meta+Userland: Simplify some formatterssin-ack
These are mostly minor mistakes I've encountered while working on the removal of StringView(char const*). The usage of builder.put_string over Format<FormatString>::format is preferrable as it will avoid the indirection altogether when there's no formatting to be done. Similarly, there is no need to do format(builder, "{}", number) when builder.put_u64(number) works equally well. Additionally a few Strings where only constant strings were used are replaced with StringViews.
2022-07-12LibUnicode: Parse and generate per-locale plural rangesTimothy Flynn
2022-07-11LibWeb/IDL: Add support for optional sequencesLuke Wilde
2022-07-11Documentation: Merge UsingFontEditor into existing FontEditor manpagekleines Filmröllchen
The generate-manpages script needs to be updated again to handle the new PNGs in section 1. (I'm intentionally not making this a multi-directory glob.)
2022-07-11Meta: Also check CONTRIBUTING with check-markdown.shkleines Filmröllchen
2022-07-10Meta: Make utmp start out as an empty object instead of empty stringLuke Wilde
The reason empty string was treated as JSON null was to paper over an issue where UTMP would start out as the empty string and presumably cause errors when trying to parse it as JSON. This was added in commit a409b832. This changes that by making UTMP start out as an empty JSON object instead of the empty string.
2022-07-10Meta: Teach pick_host_compiler about Homebrew ClangDaniel Bertalan
Homebrew does not add upstream LLVM's install location to $PATH so as not to conflict with XCode tools, so we should look for it by its absolute path. LLVM is installed to /opt/homebrew/opt/llvm on ARM Macs, and is a symlink that points to the latest stable LLVM version.
2022-07-08LibUnicode: Replace NumberFormat::Plurality with Unicode::PluralCategoryTimothy Flynn
To prepare for using plural rules within number & duration format, this removes the NumberFormat::Plurality enumeration. This also adds PluralCategory::ExactlyZero & PluralCategory::ExactlyOne. These are used in locales like French, where PluralCategory::One really means any value from 0.00 to 1.99. PluralCategory::ExactlyOne means only the value 1, as the name implies. These exact rules are not known by the general plural rules, they are explicitly for number / currency format.
2022-07-08LibJS+LibUnicode: Do not generate the PluralCategory enumTimothy Flynn
The PluralCategory enum is currently generated for plural rules. Instead of generating it, this moves the enum to the public LibUnicode header. While it was nice to auto-discover these values, they are well defined by TR-35, and we will need their values from within the number format code generator (which can't rely on the plural rules generator having run yet). Further, number format will require additional values in the enum that plural rules doesn't know about.
2022-07-08LibWeb: Add URLSearchParams as part of union type for XHR::send()Kenneth Myhra
This patch adds support for URLSearchParams to XHR::send() and introduces the union type XMLHttpRequestBodyInit. XHR::send() now has support for String and URLSearchParams.
2022-07-08Meta: Don't disable custom Toolchain on SerenityOSTim Schumacher
Parts of our build system and scripts rely on the fact that we are cross-compiling. For now, remove the "try to build natively" part to get the build running and leave a TODO for later.
2022-07-08Meta: Provide the correct path for `e2fsck` on SerenityOSTim Schumacher
2022-07-08Meta: Use `pls` instead of `sudo` on SerenityOSTim Schumacher
2022-07-08LibJS: Use Intl.PluralRules within Intl.RelativeFormatTimothy Flynn
The Polish test cases added here cover previous failures from test262, due to the way that 0 is specified to be "many" in Polish.
2022-07-08LibUnicode: Generate a list of available plural categories per localeTimothy Flynn
Separate lists are generated for cardinal and ordinal form.
2022-07-08LibUnicode: Parse and generate per-locale plural rules from the CLDRTimothy Flynn
Plural rules in the CLDR are of the form: "cs": { "pluralRule-count-one": "i = 1 and v = 0 @integer 1", "pluralRule-count-few": "i = 2..4 and v = 0 @integer 2~4", "pluralRule-count-many": "v != 0 @decimal 0.0~1.5, 10.0, 100.0 ...", "pluralRule-count-other": "@integer 0, 5~19, 100, 1000, 10000 ..." } The syntax is described here: https://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax There are up to 2 sets of rules for each locale, a cardinal set and an ordinal set. The approach here is to generate a C++ function for each set of rules. Each condition in the rules (e.g. "i = 1 and v = 0") is transpiled to a C++ if-statement within its function. Then lookup tables are generated to match locales to their generated functions. NOTE: -Wno-parentheses-equality is added to the LibUnicodeData compile flags because the generated plural rules have lots of extra parentheses (because e.g. we need to selectively negate and combine rules). The code to generate only exactly the right number of parentheses is quite hairy, so this just tells the compiler to ignore the extras.
2022-07-07Meta: Don't overwrite newer files when building the root filesystemTim Schumacher
2022-07-06LibUnicode: Generate per-region week dataTimothy Flynn
This includes: * The minimum number of days in a week for that week to count as the first week of a new year. * The day to be shown as the first day of the week in a calendar. * The start/end days of the weekend. Like the existing hour cycle data, week data is presented per-region in the CLDR, rather than per-locale. The method to add likely subtags to a locale to perform region lookups is the same. The list of regions in the CLDR for hour cycle, minimum days, first day, and weekend days are quite different. So rather than changing the existing HourCycleRegion enum to a generic Region enum, we generate separate enums for each of the week data fields. This allows each lookup into these fields to remain simple array-based index access, without any "jumps" for regions that don't have CLDR data for a field.
2022-07-06LibUnicode: Generate per-locale text layout informationTimothy Flynn
Currently contains just each locale's character order, but is set up to easily add other text layout fields from the CLDR if ECMA-402 eventually requires them.
2022-07-06LibTimeZone: Parse and generate a list of time zones used by regionTimothy Flynn
The zone1970.tab file in the TZDB contains regional time zone data, some of which we already parse for the system time zone settings map. This parses the region names from that file and generates a list of time zones which are used in each of those regions.
2022-07-06Meta: Build select Services in LagomAndrew Kaster
Add overrides for serenity_bin and serenity_lib to allow the actual CMakeLists.txt from Userland to be used to build as many services as possible without adding more clutter to Meta/Lagom/CMakeLists.txt
2022-07-06Meta: Rename Lagom library target names from LagomFoo to LibFooAndrew Kaster
This matches the target names for the main serenity build, and will make simplifying the Lagom build much easier going forward. The LagomFoo name came from a time when we had both library builds in the same CMake generated project and needed to deconflict the names.
2022-07-06Meta: Use CMAKE_INSTALL_FOODIR variables instead of hardcoding usr/fooAndrew Kaster
In preparation for future refactoring of Lagom, let's use the variables from GNUInstallDirs as much as possible for the helper macros and other scripts used by the main build already.
2022-07-06LibWeb: Replace all uses of -'s and ::'s when running the IDL generatorDexesTTP
These were obvious wrong uses of the old default "only first occurence" parameter that was used in String::replace.
2022-07-06AK: Use an enum instead of a bool for String::replace(all_occurences)DexesTTP
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-07-05LibWeb: Implement XMLSerializerLuke Wilde
The main thing that is missing is validating certain pieces of data against XML productions in well-formed mode, but nothing uses well-formed mode right now. Required by Closure Library for sanitising HTML. https://github.com/google/closure-library/blob/e687b3d8ab014787b9f10b08b3f597b637392480/closure/goog/html/sanitizer/safedomtreeprocessor.js#L117
2022-07-04Lagom: Do not set -fno-semantic-interposition on macOSDaniel Bertalan
The Mach-O file format does not have ELF's interposition rules, so this flag does not make sense for macOS builds. While GCC silently accepts the unsupported option, Clang issues a warning for it. This commit makes it possible to build Lagom with LLVM from Homebrew.
2022-07-01LibUnicode: Generate data about DurationFormat-required units as wellIdan Horowitz
2022-07-01LibUnicode: Extract the timeSeparator numeric symbol from CLDRIdan Horowitz
This will be used by Intl.DurationFormat
2022-06-29LibWeb: Return instead of throwing on unknown enums in attribute settersLuke Wilde
I saw one site relying on this, where they are trying to set XHR.responseType to "text/plain", which is not a valid responseType. However, they also don't expect it to throw. The IDL spec special cases enumerations to make it return instead of throwing in this case.
2022-06-19Meta: Install runtime/utility from jakt to make hello-jakt build againAndrew Kaster
Also add a compile flag that fixes a warning from including <serenity.h>
2022-06-18Meta: Add a PNG size check to CI and pre-commit checkskleines Filmröllchen
This uses optipng to check how much size can be reduced on PNG files. If that's more than 2 KiB for at least one file, the check fails. As with other checks, it doesn't run if optipng is not installed.
2022-06-13LibWeb: Add ability to present LibGL framebuffer and add clearingLuke Wilde
2022-06-13LibWeb: Add the ability to retrieve a WebGL context from getContextLuke Wilde
2022-06-13LibWeb: Introduce the WebGL namespace and add WebGLContextEventLuke Wilde
2022-06-13LibWeb/IDL: Add support for returning JS::Object from IDL functionsLuke Wilde