summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-12-12LibCore: Add support for range-based for loops on LineIteratorsSahan Fernando
2021-12-12LibCore: Fix bug in IODevice::LineIterator causing skipped linesSahan Fernando
2021-12-12LibC: Implement sigwait()Idan Horowitz
This is done internally by just calling the more modern sigtimedwait syscall and then massaging the results to fit sigwait's interface.
2021-12-12LibC: Implement sigwaitinfo()Idan Horowitz
This is implemented as a simple wrapper around sigtimedwait()
2021-12-12Kernel+LibC: Implement sigtimedwait()Idan Horowitz
This includes a new Thread::Blocker called SignalBlocker which blocks until a signal of a matching type is pending. The current Blocker implementation in the Kernel is very complicated, but cleaning it up is a different yak for a different day.
2021-12-11LibCore: Add syscall wrapper for clock_settime()Kenneth Myhra
2021-12-11LibCore: Add syscall wrapper for getgrnam()Kenneth Myhra
2021-12-11LibCore: Add syscall wrapper for getpwnam()Kenneth Myhra
2021-12-11LibCore: Add syscall wrapper for chown()Kenneth Myhra
2021-12-11LibGL: Improve mipmap lookup in Texture2DJelle Raaijmakers
We can get rid of a `VERIFY` since we already do this in `Array::at()`. Also move `::mipmap()` to the header file so it is inlined in `Sampler2D`.
2021-12-11LibGL: Always inline `to_rgba32()`Jelle Raaijmakers
This function popped up in profiles.
2021-12-11LibGL: Fix scissor box coordinate systemJelle Raaijmakers
We were working with (0, 0) being the top-left of the render target, but `glScissor` documentation states that this should be the bottom-left instead.
2021-12-11LibGL: Remove unused default from rasterizer scissor_boxJelle Raaijmakers
Its value is always set in the constructor.
2021-12-11LibGL: Use simpler syntax for `GL_SCISSOR_BOX` retrievalJelle Raaijmakers
2021-12-11LibGL: Make `glDeleteTextures` skip over 0 namesJelle Raaijmakers
As stated in the manual: glDeleteTextures silently ignores 0's and names that do not correspond to existing textures. If we do not skip these 0 names, they end up as invalid free texture names in our name allocator.
2021-12-11LibGL: Remove unnecessary `break;` from SoftwareGLContextJelle Raaijmakers
2021-12-11LibGL: Fix a number of enum values in `gl.h`Jelle Raaijmakers
Their values should match the enum values as defined by the Khronos Group.
2021-12-11LibGL: Implement `GL_(UN)PACK_ALIGNMENT`Jelle Raaijmakers
These enums are used to indicate byte-alignment when reading from and to textures. The `GL_UNPACK_ROW_LENGTH` value was reimplemented to support overriding the source data row width.
2021-12-11LibGL: Use `Array::back()` for last mipmap selectionJelle Raaijmakers
2021-12-11Everywhere: Fix -Winconsistent-missing-override warnings from ClangDaniel Bertalan
This option is already enabled when building Lagom, so let's enable it for the main build too. We will no longer be surprised by Lagom Clang CI builds failing while everything compiles locally. Furthermore, the stronger `-Wsuggest-override` warning is enabled in this commit, which enforces the use of the `override` keyword in all classes, not just those which already have some methods marked as `override`. This works with both GCC and Clang.
2021-12-11LibJS+LibUnicode: Generate unique numeric symbol listsTimothy Flynn
There are 443 number system objects generated, each of which held an array of number system symbols. Of those 443 arrays, only 39 are unique. To uniquely store these, this change moves the generated NumericSymbol enumeration to the public LibUnicode/NumberFormat.h header with a pre- defined set of symbols that we need. This is to ensure the generated, unique arrays are created in a known order with known symbols. While it is unfortunate to no longer discover these symbols at generation time, it does allow us to ignore unwanted symbols and perform less string-to- enumeration conversions at lookup time.
2021-12-10LibJS: Use AK::NaN<double> in Date::date_value() to fix build errorLinus Groh
This was not happening locally for me, neither when building Lagom on Linux nor with the SerenityOS toolchain... error: implicit conversion from ‘float’ to ‘double’ to match other result of conditional [-Werror=double-promotion]
2021-12-10LibJS: Implement the thisTimeValue() AO and use it where applicableLinus Groh
2021-12-10LibJS: Remove Object::value_of()Linus Groh
Being really close to Object.prototype.valueOf() name wise makes this unnecessarily confusing - while it sometimes serves as the implementation of a valueOf() function, it's an abstraction which the spec doesn't have. Use the appropriate getters to retrieve specific internal slots instead, most commonly [[FooData]] from the primitive wrapper objects. For the Object class specifically, use the Value(Object*) ctor instead.
2021-12-10LibJS: Add test case for locales which do not define day periodsTimothy Flynn
Some locales do not define morning, night, etc. day period ranges. TR-35 states they should fall back to the fixed day periods AM and PM. Add a test case for the "as" locale, which is one such locale, to ensure its AM/PM symbols are used.
2021-12-10LibJS: Use locale-aware day period time ranges to format period symbolsTimothy Flynn
For the test cases changed here, we now recognize "morning2" and "afternoon2" from the CLDR, so the expected results now match the specs and other engines.
2021-12-10LibUnicode: Parse and generate per-locale day period rangesTimothy Flynn
2021-12-10LibUnicode: Parse and generate secondary day period symbolsTimothy Flynn
Generate morning2, afternoon2, evening2, and night2 symbols.
2021-12-10LibJS+LibUnicode: Rename some Unicode::DayPeriod valuesTimothy Flynn
In the CLDR, there aren't "night" values, there are "night1" & "night2" values. This is for locales which use a different name for nighttime depending on the hour. For example, the ja locale uses "夜" between the hours of 19:00 and 23:00, and "夜中" between the hours of 23:00 and 04:00. Our CLDR parser is currently ignoring "night2", so this rename is to prepare for that. We could probably come up with better names, but in the end, the API in LibUnicode will be such that outside callers won't even see Night1, etc.
2021-12-10LibWeb: Implement AbortSignal.throwIfAbortedLuke Wilde
See: https://github.com/whatwg/dom/commit/cfe2f1e
2021-12-10LibWeb: Add support for AbortSignal.reasonLuke Wilde
2021-12-10LibWeb: Fix off-by-one error when highlighting unquoted HTML attributesSam Atkins
This fixes #11166
2021-12-10LibJS: Implement ECMA-402 Date.prototype.toLocaleTimeStringTimothy Flynn
2021-12-10LibJS: Implement ECMA-402 Date.prototype.toLocaleDateStringTimothy Flynn
2021-12-10LibJS: Implement ECMA-402 Date.prototype.toLocaleStringTimothy Flynn
2021-12-10Browser+LibWeb+WebContent: Add variables display to InspectorSam Atkins
This allows us to see which custom properties apply to a given element, which previously wasn't shown.
2021-12-09LibJS: Implement Intl.DateTimeFormat.prototype.formatRangeToPartsTimothy Flynn
2021-12-09LibJS: Implement Intl.DateTimeFormat.prototype.formatRangeTimothy Flynn
2021-12-09LibJS: Store range format patterns in the Intl.DateTimeFormat objectTimothy Flynn
Now that LibUnicode generates these patterns, the AO steps to retrieve them may be implemented.
2021-12-09LibJS: Do not return views into potentially freed memoryTimothy Flynn
In a future commit, the "part" view returned from FormatDateTimePattern may be a view into a string that goes out of scope. Ensure the AO only returns valid views. A similar approach is used in Intl.NumberFormat.
2021-12-09LibUnicode: Add method to combine two format pattern skeletonsTimothy Flynn
The fields of the generated elements must be in the same order as the table here: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table Further, only one field from each group of fields is allowed.
2021-12-09LibUnicode: Parse and generate date time range format patternsTimothy Flynn
2021-12-09LibUnicode: Parse and generate format pattern skeletonsTimothy Flynn
Pattern skeletons are more or less the "key" of format patterns. Every format pattern is assigned a skeleton. Interval patterns (which are not yet parsed) are also assigned a skeleton - this is used to match them to an "owning" format pattern. So we will use the skeleton generated here to match format patterns at runtime with their available interval patterns. An alternative approach would be to append interval patterns directly to their owning format pattern, but this has some draw backs: 1. Skeletons aren't totally unique. A skeleton may appear in both the "dateFormats" and "availableFormats" objects, in which case the same interval formats would be generated more than once. 2. Otherwise unique format patterns may only differ by the interval patterns assigned to them. This would cause the UniqueStorage for the format patterns to increase in size, impacting both compile times and libunicode.so size.
2021-12-09LibJS: Update spec comment in balance_duration_relative()Linus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/665871e
2021-12-09LibJS: Update spec comment in Temporal.Duration.prototype.round()Linus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/513c05b
2021-12-09LibGUI: Add EngineType to EditingEngine classesscwfri
This will allow users of EditingEngine classes to determine current type of EditingEngine (currently either vim or regular).
2021-12-09LibWeb: Remove now-unused CustomStyleValueSam Atkins
2021-12-09LibWeb: Handle dependency cycles in CSS var()s :^)Sam Atkins
We now detect situations like this, where variables infinitely recur, without crashing: ```css div { --a: var(--b); --b: var(--a); background: var(--a); } p { --foo: var(--foo); background: var(--foo); } ```
2021-12-09LibWeb: Mitigate the billion-laughs attack on CSS variablesSam Atkins
We now stop processing variables once a length of 16384 tokens is reached. This is an arbitrary number, but should be far beyond what anyone will reasonably use, and small enough to not crash.
2021-12-09LibWeb: Handle fallback values for CSS variables :^)Sam Atkins