Commit Graph

7008 Commits

Author SHA1 Message Date
kleines Filmröllchen
1e9554145e LibGUI: Add a cancel button callback to settings window tabs
Some settings tabs, like the ones on the upcoming terminal settings,
need to know when the cancel button is pressed to clean up things like
temporary live updates. Therefore, the SettingsWindow::Tab now features
a cancel_settings callback which does not need to be implemented.
2021-11-27 12:45:44 +01:00
Kenneth Myhra
951d8a06d8 LibCore: Add syscall wrapper for gethostname() 2021-11-27 11:14:16 +01:00
Idan Horowitz
957f54d96f LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded
These seem more appropriate.
2021-11-27 01:58:05 +02:00
Andreas Kling
f1cc3d0fc4 Userland: Use Core::ArgsParser's Vector<StringView> API everywhere
...and remove the Vector<String> variant since there are no remaining
users of this API.
2021-11-26 23:27:57 +01:00
Andreas Kling
395ba619d8 LibCore: Add Vector<StringView> variant of add_positional_argument() 2021-11-26 23:27:57 +01:00
kleines Filmröllchen
a099a77e82 SoundPlayer+LibDSP: Move the FFT implementation to LibDSP
LibDSP can greatly benefit from this nice FFT implementation, so let's
move it into the fitting library :^)

Note that this now requires linking SoundPlayer against LibDSP. That's
not an issue (LibDSP is rather small currently anyways), as we can
probably make great use of it in the future anyways.
2021-11-24 23:45:08 +00:00
Andreas Kling
748c8b4879 LibCore: Add syscall wrapper for ptsname() 2021-11-24 23:24:53 +01:00
Andreas Kling
a152b1f215 LibCore: Add syscall wrapper for dup2() 2021-11-24 23:07:31 +01:00
Andreas Kling
71bc9bee0a LibCore: Add syscall wrapper for pipe2() 2021-11-24 23:07:31 +01:00
Andreas Kling
e623e73f63 LibGUI: Add GUI::Toolbar::try_add_separator()
This is a fallible variant of add_separator() that returns ErrorOr.
2021-11-24 23:07:31 +01:00
Andreas Kling
a18631c5e7 LibGUI: Add GUI::Menu::try_add_submenu()
This is a fallible variant of add_submenu() that returns ErrorOr.
2021-11-24 23:07:31 +01:00
Sam Atkins
dea4f83037 LibWeb: Use a string instead of an internal Parser class in Supports
Now that we can serialize CSS tokens, we can just hold a string and then
re-parse it when the Supports is evaluated. This feels a little weird,
but it only happens once so it's not going to slow it down much, and it
keep the API cleaner.
2021-11-24 22:57:46 +01:00
Sam Atkins
7d5c626276 LibWeb: Add <general-enclosed> support to Media Queries 2021-11-24 22:57:46 +01:00
Sam Atkins
b03dac99a5 LibWeb: Use MatchResults for MediaQuery evaluation 2021-11-24 22:57:46 +01:00
Sam Atkins
99e18f40fb LibWeb: Use new GeneralEnclosed class in Supports 2021-11-24 22:57:46 +01:00
Sam Atkins
e760263728 LibWeb: Parse CSS <general-enclosed> 2021-11-24 22:57:46 +01:00
Sam Atkins
42176d37fc LibWeb: Implement independent GeneralEnclosed class
This is `<general-enclosed>` in CSS grammar. It represents a section of
a `@media` or `@supports` rule that exists in some future standard that
we don't understand yet, but don't want to make the entire rule invalid.

There's not much that it can usefully do, but we store a string
representation of its contents so that it can be serialized out.
2021-11-24 22:57:46 +01:00
Sam Atkins
b40388584b LibWeb: Make StyleRule to_string() methods output valid CSS
Also removed unused `append_raw()` function.
2021-11-24 22:57:46 +01:00
Sam Atkins
933a271a78 LibWeb: Implement StyleComponentValueRule::to_string() 2021-11-24 22:57:46 +01:00
Sam Atkins
cf07da082e LibWeb: Implement CSS::Token::to_string()
This outputs valid CSS, as opposed to to_debug_string().
2021-11-24 22:57:46 +01:00
Ben Wiederhake
33079c8ab9 Kernel+UE+LibC: Remove unused dbgputch syscall
Everything uses the dbgputstr syscall anyway, so there is no need to
keep supporting it.
2021-11-24 22:56:39 +01:00
Jelle Raaijmakers
30580ed7e4 LibPthread: Initialize conditions with realtime clock
All the way back in commit 1670ee5aba, the default clock for
condition variables was set to `CLOCK_MONOTONIC`, because there was no
other clock available.

However, if a condition variable is initialized without any additional
attributes by an application, they sometimes assume that the absolute
time that is passed to e.g. `pthread_cond_timedwait` is actually based
on a realtime clock, as can be seen here in SDL2:

6f419bdf5f/src/thread/pthread/SDL_syscond.c (L99)

Additionally, the glibc implementation defaults to a realtime clock:

aac54dcd37/nptl/pthread_cond_init.c (L42)

...so we probably should do so as well :^)
2021-11-24 19:44:57 +01:00
Jelle Raaijmakers
ce3a63253a LibC: Remove commented out code from futex() 2021-11-24 19:44:57 +01:00
Linus Groh
905b8bd545 LibJS: Make section URLs more consistent
- Drop index.html
- Include trailing slash before anchor
- Don't use multipage spec URLs
2021-11-24 18:37:57 +00:00
Linus Groh
ad294ff2ee LibJS: Simplify TemporalRelativeToString
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/d3b2e90
2021-11-24 18:18:05 +00:00
Vyacheslav Pukhanov
3f006d81fe LibWeb: Add JSON serialization for nested browsing contexts
This changes allows for nested browser contexts to be embedded in the
serialized JSON of their container element (like `iframe`) and enables
their inspection in the DOM Inspector.
2021-11-24 19:07:48 +01:00
Linus Groh
de69f5dbf4 LibJS: Implement Temporal.ZonedDateTime.prototype.since() 2021-11-24 17:53:00 +00:00
Linus Groh
7a2eeae8c6 LibJS: Implement Temporal.ZonedDateTime.prototype.until() 2021-11-24 17:53:00 +00:00
Luke Wilde
7dc846d51c LibJS: Implement balance_duration_relative() 2021-11-24 17:53:00 +00:00
Luke Wilde
9559cea8e5 LibJS: Implement add_duration() 2021-11-24 17:53:00 +00:00
Luke Wilde
1f84deaf63 LibJS: Implement default_temporal_largest_unit() 2021-11-24 17:53:00 +00:00
Luke Wilde
16301a603c LibJS: Implement difference_zoned_date_time() 2021-11-24 17:53:00 +00:00
Linus Groh
1e41a8668d LibJS: Add sign(Crypto::SignedBigInteger const&) overload 2021-11-24 17:53:00 +00:00
Linus Groh
a20b189eab LibJS: Fix incorrectly formatted section comments
A couple of missing URLs, spaces, and a stray comma.
2021-11-24 17:37:27 +00:00
Tim Schumacher
acf3154483 LibArchive: Limit all Tar header fields to their buffer length 2021-11-24 19:09:00 +02:00
Timothy Flynn
251f692440 LibJS: Re-implement SetNumberFormatDigitOptions AO
This is an editorial change in the Intl spec.

See: https://github.com/tc39/ecma402/commit/d89c84f
2021-11-24 14:17:15 +00:00
Timothy Flynn
a2f629f38a LibJS: Update spec comments in GetOption and DefaultNumberOption AOs
This is an editorial change in the Intl spec.

See: https://github.com/tc39/ecma402/commit/913ca6d
2021-11-24 14:17:15 +00:00
Andreas Kling
dbab20782e LibGUI: Make FilteringProxyModel factory function return ErrorOr 2021-11-24 13:52:01 +01:00
Andreas Kling
51c4de8774 LibGUI: Add GUI::Menu::try_add_action() and try_add_separator()
These are fallible variants that return ErrorOr. :^)
2021-11-24 13:52:01 +01:00
Andreas Kling
9b07e13fb6 LibGUI: Add GUI::Toolbar::try_add_action()
This is a fallible variant of add_action() that returns ErrorOr.
It's careful to not fail with a partially added action.
2021-11-24 13:52:01 +01:00
Andreas Kling
47b6339025 LibGUI: Add GUI::TabWidget::try_add_tab<T>(...)
This is a fallible variant of add_tab<T>(...) that returns ErrorOr.
2021-11-24 13:52:01 +01:00
Andreas Kling
dc47fce2d9 LibGUI: Add GUI::Window::try_set_main_widget<T>(...)
This is a fallible variant of set_main_widget<T>() that returns ErrorOr.
2021-11-24 13:52:01 +01:00
Andreas Kling
bde9c2bc65 LibGUI: Add GUI::Window::try_add_menu()
This is a fallible variant of add_menu() that returns ErrorOr.
2021-11-24 13:52:01 +01:00
Andreas Kling
6b79745aa4 LibGUI: Add GUI::Widget::try_set_layout<T>(...)
This is a fallible variant of set_layout<T>(...) that returns ErrorOr.
2021-11-24 13:52:01 +01:00
Andreas Kling
bc79be362d LibGUI: Add GUI::Menubar::try_add_menu()
This is a fallible variant of Menubar::add_menu() that returns ErrorOr.
2021-11-24 13:52:01 +01:00
Andreas Kling
b81ce827b6 LibCore: Add Core::Object::try_add<T>(...)
This is a fallible version of add<T>(...) that returns ErrorOr<T>.
It can be used together with TRY() to handle allocation failures when
instantiating new Core::Objects.
2021-11-24 13:52:01 +01:00
Vyacheslav Pukhanov
2189cc6bf1 LibGUI: Reverse FilteringProxyModel update propagation flow
FilteringProxyModel is a narrowing projection of its parent model with
a filter applied. That means that updates of FilteringProxyModel should
not propagate to its parent model, but the opposite - updates happening
in the parent model should "trickle down" and trigger an update of the
filtering model.
2021-11-24 13:46:09 +01:00
thankyouverycool
781bc67a96 LibGfx: Correct BitmapFont row indexing when un/masking fonts
Now indexes by total bytes per glyph to account for changes made
to row's pointer type in 3ca00c8. Fixes glyphs not showing and
saving correctly in FontEditor.
2021-11-24 16:05:40 +03:30
Linus Groh
78724fdd33 LibJS: Don't accept UTC designators in strings for plain Temporal types
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/cd2dc7d
2021-11-24 08:56:03 +00:00
Linus Groh
836ce8ee5d LibJS: Fix parse ErrorType used in parse_temporal_date_string()
TemporalInvalidDateString, not TemporalInvalidDateTimeString.
2021-11-24 08:38:50 +00:00