summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2022-01-26LibGUI+LoginServer: Use default buttons in InputBox and LoginWindowthankyouverycool
2022-01-26LibGUI: Allow Buttons to set themselves as defaultthankyouverycool
Several apps were implementing this behavior ad hoc. This provides a standard API as well as a comfy visual cue for default return key behavior.
2022-01-26LibGUI: Allow Windows to set a default return key widgetthankyouverycool
The default return key widget takes precendence when dispatching return key events with the exception of focused buttons.
2022-01-26LibGL: Implement `glMateriali{v}`Jesse Buhagiar
2022-01-26LibGL: Implement `glLighti{v}`Jesse Buhagiar
2022-01-26LibGL: Correctly set scene ambient in `glLightModelfv`Jesse Buhagiar
This was only passing in the `R` value to the scene's ambient color, which is incorrect.
2022-01-26LibGL: Implement `glLightModeliv`Jesse Buhagiar
2022-01-26LibGL: Implement `glGetMaterial`Jesse Buhagiar
2022-01-26LibGL: Implement `glGetLight`Jesse Buhagiar
2022-01-26LibEDID: Use correct paths for LibEDID generated filesTimothy Flynn
Code generators that generate their files for both Lagom and Serenity have a blob in their CMake file like this: set(TIME_ZONE_DATA_HEADER LibTimeZone/TimeZoneData.h) set(TIME_ZONE_DATA_IMPLEMENTATION LibTimeZone/TimeZoneData.cpp) set(TIME_ZONE_META_TARGET_PREFIX LibTimeZone_) if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibTimeZone") # Serenity build. set(TIME_ZONE_DATA_HEADER TimeZoneData.h) set(TIME_ZONE_DATA_IMPLEMENTATION TimeZoneData.cpp) set(TIME_ZONE_META_TARGET_PREFIX "") endif() LibEDID generates files only for Serenity, but was using the Lagom build version of the _HEADER, _IMPLEMENTATION, and _PREFIX variables. Thus if pnp_ids.cmake was ever touched, the following error would be raised: Userland/Libraries/LibEDID/EDID.cpp:18:18: fatal error: LibEDID/PnpIDs.h: No such file or directory 18 | # include <LibEDID/LibEDID/PnpIDs.h> Use the Serenity paths in pnp_ids.cmake and in the #include within LibEDID itself.
2022-01-25LibCore: Support (and use) DateTime string formatting of the form %ZTimothy Flynn
This formats the time zone name. This is now used in the default format string because DateTime is meant to represent local time; it only makes sense to include the time zone by default now that we support non-UTC.
2022-01-25LibCore: Support DateTime string formatting of the form %:zTimothy Flynn
This formats the time zone offset as "+hh:mm" or "-hh:mm". This doesn't appear to be strictly POSIX, but it is how Linux implements this format.
2022-01-25LibCore: Support DateTime string formatting of the form %zTimothy Flynn
This formats the time zone offset as "+hhmm" or "-hhmm".
2022-01-25LibJS: Use new construct AO overload where easily applicableTimothy Flynn
2022-01-25LibJS: Add templated overloads for the construct AO to create its MVLTimothy Flynn
Instead of requiring callers to construct a MarkedValueList, add a variadic templated overload to construct the MVL on the caller's behalf.
2022-01-25LibJS: Use forwarding references for call's variadic template argumentsTimothy Flynn
2022-01-25LibJS: Remove erroneous variadic template from some call overloadsTimothy Flynn
These function do not use the Args variadic template.
2022-01-26LibRegex: Implement ECMA262 multiline matching without splitting linesAli Mohammad Pur
As ECMA262 regex allows `[^]` and literal newlines to match newlines in the input string, we shouldn't split the input string into lines, rather simply make boundaries and catchall patterns capable of checking for these conditions specifically.
2022-01-26LibRegex: Don't return empty vectors from RegexStringView::lines()Ali Mohammad Pur
Instead, return a vector of one empty string.
2022-01-25LibJS: Implement Intl.RelativeTimeFormat.prototype.resolvedOptionsTimothy Flynn
2022-01-25LibJS: Fix errors in Intl.DateTimeFormat.prototype.resolvedOptions testsTimothy Flynn
Noticed these while implementing this prototype for RelativeTimeFormat.
2022-01-25LibJS: Implement Intl.RelativeTimeFormat.supportedLocalesOfTimothy Flynn
2022-01-25LibJS: Implement the Intl.RelativeTimeFormat constructorTimothy Flynn
2022-01-25LibJS: Implement a nearly empty Intl.RelativeTimeFormat objectTimothy Flynn
This adds plumbing for the Intl.RelativeTimeFormat object, constructor, and prototype.
2022-01-25LibJS: Convert Intl.NumberFormat to use Unicode::StyleTimothy Flynn
2022-01-25LibJS: Convert Intl.DisplayNames to use Unicode::StyleTimothy Flynn
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-25LibUnicode: Add helper methods to convert a Style to and from a stringTimothy Flynn
This conversion is duplicated a few times in our Intl implementation, so let's just define these once and be done with it.
2022-01-25LibUnicode: Remove the Unicode::Style::Numeric valueTimothy Flynn
It is unused.
2022-01-25LibTimeZone+Userland: Rename current_time_zone to system_time_zoneTimothy Flynn
This renames the current implementation of current_time_zone to system_time_zone to more clearly indicate what it is. Then reimplements current_time_zone to return whatever was set up by tzset, falling back to UTC if something went awry, for convenience.
2022-01-25LibC: Ensure tzname and related fields are intializedTimothy Flynn
If a program never invokes tzset, the tzname variable should have system dependent default values.
2022-01-25LibC: Revert localtime_r to use time zone information set by tzsetTimothy Flynn
Now that tzset actually detects time zones, parties interested in time zone offsets should invoke tzset.
2022-01-25LibC: Invoke tzset from time functions required to update time zone infoTimothy Flynn
From POSIX: the ctime(), localtime(), mktime(), strftime(), and strftime_l() functions are required to set timezone information as if by calling tzset() ctime is excluded here because it invokes localtime, so there's no need to invoke tzset twice.
2022-01-25LibC: Implement tzset with time zone awareness in accordance with POSIXTimothy Flynn
2022-01-25LibC: Define the POSIX TZNAME_MAX limitTimothy Flynn
POSIX defines this as the "Maximum number of bytes supported for the name of a timezone (not of the TZ variable)." It must have a minimum value of _POSIX_TZNAME_MAX (6). The longest time zone name in the TZDB is about 40 chars, so 64 is chosen here for a little wiggle room, and to round up to a power of 2.
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-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-25AK: Add a consume_until(StringView) overload to GenericLexerIdan Horowitz
This allows us to skip a strlen call.
2022-01-25LibThreading: Invoke BackgroundAction completions on origin event loopAndreas Kling
We now capture the origin thread's current event loop when setting up a BackgroundAction and then invoke the on_complete callback on that same event loop.
2022-01-25LibCore: Make Core::s_main_event_loop actually globalAndreas Kling
This was accidentally per-TU, as it was declared "static" in the header.
2022-01-25LibJS: Correct FormatTimeZoneOffsetString arg in CreateTemporalTimeZoneLinus Groh
This is an editorial change in the Temporal spec (accidentally marked normative). See: https://github.com/tc39/proposal-temporal/commit/3039c98
2022-01-24LibPDF: Make Filter::decode() return ErrorOrSam Atkins
2022-01-24AK+Userland: Make AK::decode_base64 return ErrorOrSam Atkins
2022-01-24AK+Userland: Make AK::decode_hex() return ErrorOrSam Atkins
This lets us propagate the reason why it failed up to the caller. :^)
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2022-01-24LibJS/Tests: Enable Number.isInteger() test that now passesLinus Groh
2022-01-24LibJS: Update ShadowRealm AO parameter declaration notationsLinus Groh
This is an editorial change in the ShadowRealm spec. See: https://github.com/tc39/proposal-shadowrealm/commit/f5013fe
2022-01-24LibJS: Let WrappedFunction inherit target name and lengthLinus Groh
This is a normative change in the ShadowRealm spec. See: https://github.com/tc39/proposal-shadowrealm/commit/b73a1dc
2022-01-24LibJS: Implement the SetFunctionLength AOLinus Groh
2022-01-24LibJS: Implement the SetFunctionName AOLinus Groh