summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-11-10LibWeb: Use BackgroundRepeatStyleValue in `background` shorthandSam Atkins
This is step 1 in removing the two `background-repeat-x/y` pseudo-properties. Since adding the concept of compound StyleValues, we don't need `background-repeat` to be split in two any more.
2021-11-10LibWeb: Parse `background-clip` and `background-origin`Sam Atkins
Including as part of the `background` shorthand. :^)
2021-11-10LibWeb: Parse `background-attachment` as part of `background` propertySam Atkins
2021-11-10LibWeb: Add `background-position` to `background` propertySam Atkins
This required modifying the background-parsing code to use a TokenStream, but that turned out to be pretty simple.
2021-11-10LibWeb: Parse CSS `background-position` propertySam Atkins
This is done a bit differently from other properties: using a TokenStream instead of just a Vector of ComponentValues. The reason for this is, we can then use call the same function when parsing the `background` shorthand. Otherwise, we would have to know in advance how many values to pass down, which basically would involve duplicating the `background-position` parsing code inside `background`. The StyleValue is PositionStyleValue, since it represents a `<position>`: https://www.w3.org/TR/css-values-4/#typedef-position Unfortunately, background-position's parsing is a bit different from `<position>`'s, (background-position allows 3-value syntax and `<position>` doesn't) so we'll need to come back and write a different parsing function for that later.
2021-11-10LibJS: Implement Temporal.ZonedDateTime.prototype.toJSONLuke Wilde
2021-11-10LibJS: Implement Temporal.ZonedDateTime.prototype.toLocaleStringLuke Wilde
2021-11-10LibJS: Implement Temporal.ZonedDateTime.prototype.toStringLuke Wilde
2021-11-10LibJS: Implement the required AOs for ZonedDateTime stringifiersLuke Wilde
2021-11-10LibJS: Add tests for async functions and await expressionsIdan Horowitz
2021-11-10LibJS: Add support for await expressionsIdan Horowitz
2021-11-10LibJS: Add support for async functionsIdan Horowitz
This commit adds support for the most bare bones version of async functions, support for async generator functions, async arrow functions and await expressions are TODO.
2021-11-09LibJS: Mark RoundTemporalInstant as infallibleLuke Wilde
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/0b4141c This also allows us to get rid of two old exception checks.
2021-11-09LibJS: Mark DaysUntil as infallibleLinus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/30a8939
2021-11-09LibJS: Convert GeneratorObject to ThrowCompletionOrIdan Horowitz
2021-11-09LibJS: Convert the IntegerIndexedElementSet AO to ThrowCompletionOrIdan Horowitz
2021-11-09LibJS: Remove leftover exception check in OrdinaryHasPropertyIdan Horowitz
2021-11-08LibAudio: Replace log_pan with a constant power panning algoritmkleines Filmröllchen
This little functional change uses the most common algorithm for panning audio, known as constant power panning. It makes it so that the total output power (not directly the sample value, i.e. the peak) stays the same no matter how the audio is panned.
2021-11-08LibAudio: Improve local variable nameskleines Filmröllchen
This makes the code easier to read.
2021-11-08LibAudio: Rename Audio::Frame -> Audio::SampleDavid Isaksson
"Frame" is an MPEG term, which is not only unintuitive but also overloaded with different meaning by other codecs (e.g. FLAC). Therefore, use the standard term Sample for the central audio structure. The class is also extracted to its own file, because it's becoming quite large. Bundling these two changes means not distributing similar modifications (changing names and paths) across commits. Co-authored-by: kleines Filmröllchen <malu.bertsch@gmail.com>
2021-11-08LibAudio: Refactor out linear_to_log function and add its inverseDavid Isaksson
The conversion from a linear scale (how we think about audio) to a logarithmic scale (how audio actually works) will be useful for other operations, so let's extract it to its own utility function. Its inverse will also allow reversible operations to be written more easily.
2021-11-08LibJS: Implement Temporal.PlainMonthDay.prototype.with()Linus Groh
2021-11-08LibJS: Implement Temporal.PlainYearMonth.prototype.with()Linus Groh
2021-11-08LibJS: Implement Temporal.PlainDateTime.prototype.with()Linus Groh
2021-11-08LibJS: Implement Temporal.PlainDate.prototype.with()Linus Groh
With one caveat: in the PreparePartialTemporalFields AO I made a change to fix a spec issue that would require the input object to always have a month or monthCode property. This is tracked in https://github.com/tc39/proposal-temporal/issues/1910 and may get accepted as-is, in which case we simply need to remove the NOTE comment.
2021-11-08LibJS/Tests: Fix Temporal.PlainDate.prototype.equals() testsLinus Groh
Just calling "expect()" doesn't do anything!
2021-11-08LibJS: Use StringView literals in prepare_temporal_fields()Linus Groh
2021-11-08LibC: Fix huge libc.a file size due to the use of `llvm-ar -q`Daniel Bertalan
Before this change, we would generate the static C library by running the command `ar -qcs` to collect the various `*.o` files into a single archive. The `q` option stands for "quick append", which simply appends new files to the archive, without replacing any pre-existing entries for the same file. The problem with this is obvious: each LibC rebuild would add approximately 1 MB (the size of a cleanly built libc.a) to the size of the file. It got so bad on my machine that the total file size ended up being 3 gigabytes. Note that this did not affect the GNU toolchain, because, as the `ar(1)` manpage says: > Note - GNU ar treats the command qs as a synonym for r - replacing > already existing files in the archive and appending new ones at the > end.
2021-11-08LibJS: Create the RegExpExec result's "input" field lastTimothy Flynn
We move the input string into this field to avoid a string copy, so we must do this step last to avoid using any views into it (note that match.view here is a view into this string).
2021-11-08LibSQL: Replace Result<T, E> use with ErrorOr<T>Andreas Kling
2021-11-08LibIPC: Replace Result<T, E> use with ErrorOr<T>Andreas Kling
2021-11-08LibCore: Replace Result<T, E> use with ErrorOr<T> in Core::FileWatcherAndreas Kling
2021-11-08LibCore: Replace Result<T, E> use with ErrorOr<T> in Core::AccountAndreas Kling
2021-11-08LibKeyboard: Use ErrorOr<T> for CharacterMap::fetch_system_map()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::get_password()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::open()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::size()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::copy_file()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::remove()Andreas Kling
This function returns a subclass of Error, which is now possible.
2021-11-08LibCore: Use ErrorOr<T> for Core::File::link_file()Andreas Kling
2021-11-08AK: Use ErrorOr<T> for MappedFile factoriesAndreas Kling
Replace Result<T, E> with ErrorOr<T> and propagate the error to callers.
2021-11-08LibGfx: Use ErrorOr<T> for try_create_from_serialized_byte_buffer()Andreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08LibGfx: Convert Gfx::Bitmap to east const styleAndreas Kling
2021-11-08LibGfx: Deduplicate code in Bitmap::try_load_from_file()Andreas Kling
This can share logic with try_load_from_fd_and_close(), we just need to open the file first. :^)
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap infrastructure used by ShareableBitmapAndreas Kling
This also allows us to get rid of the ShareableBitmap(Bitmap) constructor which was easy to misuse. Everyone now uses Bitmap's to_shareable_bitmap() helper instead.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::cropped()Andreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::scaled()Andreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::flipped()Andreas Kling