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: 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: 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: 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: 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
Andreas Kling
b6f49924be
LibDesktop: Make allowlist APIs return ErrorOr<void>
...
This makes it very smooth to use TRY() when setting up these lists,
as you can see in the rest of this commit. :^)
2021-11-24 00:25:23 +01:00
Andreas Kling
8b7b726680
LibCore: Add kill() syscall wrapper
2021-11-24 00:25:22 +01:00
Timothy Flynn
7f780e43a6
LibCore: Allow moving, but not copying, DirIterator
...
An explicit move constructor is required to null-out the moved-from
directory descriptor. Otherwise, we would call closedir() twice when
using ErrorOr<DirIterator>::release_value().
2021-11-23 22:58:05 +01:00
Linus Groh
55dbd19a16
LibJS: Update to_largest_temporal_unit() to allow undefined fallback
...
This is required for Temporal.Duration.prototype.round(). Subsequently,
this now returns ThrowCompletionOr<Optional<String>>, which brings the
signature in line with that of to_smallest_temporal_unit().
Much nicer! :^)
2021-11-23 21:03:05 +00:00
Andreas Kling
5a3f5582ba
LibCore: Add try_create(...) helper to all Core::Object derived classes
...
This is like construct(...) but returns ErrorOr<NonnullRefPtr<T>>.
2021-11-23 15:44:59 +01:00
Andreas Kling
16356ca478
LibCore: Add syscall wrappers for read() and write()
2021-11-23 15:44:59 +01:00
Federico Guerinoni
221a32577e
LibGUI: Support applying AutocompleteBox suggestions with mouse
...
Fixes : #8004
2021-11-23 13:43:11 +00:00
Andreas Kling
3db9979e40
LibCore: Add syscall wrapper for stat()
2021-11-23 12:23:54 +01:00
Andreas Kling
4a213869f2
LibCore: Add syscall wrapper for ftruncate()
2021-11-23 12:23:54 +01:00
Andreas Kling
4bf08e4d52
LibCore: Add syscall wrapper for close()
2021-11-23 12:23:54 +01:00
Andreas Kling
adb9b86807
LibGfx: Use Core::System::open() in Gfx::Bitmap :^)
2021-11-23 12:23:54 +01:00
Andreas Kling
0ed5f84bd9
LibCore: Use open() wrapper in Core::MappedFile :^)
2021-11-23 12:23:54 +01:00
Andreas Kling
50416c286d
LibCore: Add syscall wrapper for open()
2021-11-23 11:59:50 +01:00
Andreas Kling
094fa900a3
LibCore: Use mmap() and munmap() wrappers in Core::MappedFile
2021-11-23 11:51:46 +01:00
Andreas Kling
45842a5208
LibCore: Add syscall wrapper for munmap()
2021-11-23 11:51:11 +01:00
Andreas Kling
53e9b9758e
LibCore: Add syscall wrapper for mmap()
...
For convenience on SerenityOS, this also takes a custom alignment
request, and a memory region name. These are non-POSIX extensions.
2021-11-23 11:48:40 +01:00