Commit Graph

11090 Commits

Author SHA1 Message Date
Jelle Raaijmakers
55526634b6 Piano: Use default sample rate in absence of audio device 2021-11-21 09:27:00 +01:00
Jelle Raaijmakers
87e4abb4c7 AudioServer: Use strerror correctly in Mixer 2021-11-21 09:27:00 +01:00
Jelle Raaijmakers
ddb424a2e7 LibAudio: Verify source and target rates for ResampleHelper 2021-11-21 09:27:00 +01:00
Linus Groh
783222f87a LibJS: Implement parsing of TemporalInstantString 2021-11-20 23:10:09 +00:00
Linus Groh
79a18b058f LibJS: Implement parsing of TemporalCalendarString 2021-11-20 23:10:09 +00:00
Linus Groh
1583c7257c LibJS: Implement parsing of TemporalRelativeToString 2021-11-20 23:10:09 +00:00
Linus Groh
98b876ad3f LibJS: Implement parsing of TemporalZonedDateTimeString 2021-11-20 23:10:09 +00:00
Linus Groh
3b1de431cc LibJS: Implement parsing of TemporalYearMonthString 2021-11-20 23:10:09 +00:00
Linus Groh
3ddab2f4fe LibJS: Implement parsing of TemporalMonthDayString 2021-11-20 23:10:09 +00:00
Linus Groh
453c78215c LibJS: Implement parsing of TemporalTimeString 2021-11-20 23:10:09 +00:00
Linus Groh
b42b7d5f16 LibJS: Implement parsing of TemporalDateTimeString 2021-11-20 23:10:09 +00:00
Linus Groh
02e7de2cba LibJS: Implement parsing of TemporalDateString 2021-11-20 23:10:09 +00:00
Linus Groh
3f1af7c05f LibJS: Update parse_temporal_time_zone() to match the spec again 2021-11-20 23:10:09 +00:00
Linus Groh
27304017e3 LibJS: Don't assume calendar was parsed in to_temporal_zoned_date_time()
The first step of to_temporal_calendar_with_iso_default() is checking
whether the given value is undefined, so we should actually pass that
instead of unconditionally dereferencing the Optional<String>.
2021-11-20 23:10:09 +00:00
Linus Groh
9628452550 LibJS: Fix fallback of hour, minute, second in parse_iso_date_time()
It's not the `to_uint<u8>()` call that would fail, if we have a value
for these productions they will always be valid numbers. We do need to
provide a fallback for when that's not the case and any of them is
undefined, i.e. an empty Optional.
2021-11-20 23:10:09 +00:00
Linus Groh
de23f0b68c LibJS: Start fleshing out an ISO 8601 parser for Temporal
This is the start of a parser for the ISO 8601 grammar used in the
Temporal spec:
https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar

We will, on purpose, not use a generic ISO 8601 parser from AK or
similar for two reasons:

- Many AOs make specific assumptions about which productions exist and
  access them directly, even when they're part of a larger production.
- The spec says "The grammar deviates from the standard given in ISO
  8601 in the following ways:" and then lists 17 of such deviations.
  Making that work with a general purpose parser is not worth it.

The public API is not being used anywhere yet, but will be in the next
couple of commits. Likewise, the Production enum will be populated with
all the productions accessed directly (e.g. TemporalDateString).

Many thanks to Ali for showing me how to improve my initial approach
full of macros with a nice RAII helper - it's much nicer :^)

Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
2021-11-20 23:10:09 +00:00
Itamar
dd76ba2fe1 CrashReporter: Add "Inspect in Hack Studio" button
This allows the user to open the crash coredump in Hack Studio and
inspect it in the Debug tab.
2021-11-20 21:22:24 +00:00
Itamar
8316eb7306 HackStudio: Add option to inspect Coredump
This adds a --coredump <file> option to Hack Studio.

When used, Hack Studio will open the coredump and allow the user to
inspect it in the Debug tab.
2021-11-20 21:22:24 +00:00
Itamar
ce726fe027 HackStudio: Improve backtrace accuracy
We now decrement the return address of the previous frame by one to get
the address of the call instruction and use this address in the
backtrace.

This results in more accurate source position information than what we
previously had when using the return address.
2021-11-20 21:22:24 +00:00
Itamar
d6d48ce936 CrashReporter: Unlink coredump file on exit
Previously, when the --unlink flag was passed to CrashReporter, it
unlinked the coredump file immediately after reading it.

This change makes it so the coredump file is deleted when CrashReporter
exits.
2021-11-20 21:22:24 +00:00
Itamar
1c0a7cde63 LibCoredump: Add Coredump::Inspector
The coredump Inspector implements the ProcessInspector interface for
a coredump. It is implemented using Coredump::Reader.
2021-11-20 21:22:24 +00:00
Itamar
ac762fbbc3 LibCoredump: Add Reader::for_each_library 2021-11-20 21:22:24 +00:00
Itamar
94d68583fb HackStudio: Use ProcessInspector instead of DebugSession where possible 2021-11-20 21:22:24 +00:00
Itamar
7950f5cb51 LibDebug: Add ProcessInspector base class
ProcessInspector is an abstract base class for an object that can
inspect the address space of a process.

Concrete sub classes need to implement methods for peeking & poking
memory and walking the loaded libraries.

It is currently only implemented by DebugSession.
2021-11-20 21:22:24 +00:00
Itamar
38ddf301f6 Kernel+LibC: Fix ptrace for 64-bit
This makes the types used in the PT_PEEK and PT_POKE actions
suitable for 64-bit platforms as well.
2021-11-20 21:22:24 +00:00
qiu-x
c0a7e0ad23 LibCore: Fix LocalSocket.cpp build on FreeBSD
This fixes the build on FreeBSD by chagning LOCAL_PEERPID to
LOCAL_PEERCRED inside a ifdef
2021-11-20 21:11:30 +00:00
Sam Atkins
dc3fa1c2e5 KeyboardSettings: Add icons
A calculator isn't the ideal icon for the Num-lock section, so hopefully
someone will produce a better one later.
2021-11-20 21:05:20 +00:00
Sam Atkins
c6099eca5c KeyboardSettings: Add text area to test the currently selected keymap
Right now, this is a bit of a hack. We can't set a keymap to only apply
to the test area, so we set the system keymap instead, while also
keeping track of the "real" current keymap. Whenever the settings are
applied, we update what that "real" keymap is, and when we exit, we
revert to that keymap.

Basically, it behaves as you would expect, apart from it also affecting
other applications you are typing in while the KeyboardSettings window
is open with a different keymap selected.
2021-11-20 21:05:20 +00:00
Sam Atkins
0a2b6b64c6 KeyboardSettings: Migrate to using SettingsWindow :^) 2021-11-20 21:05:20 +00:00
Sam Atkins
4bac30f737 KeyboardSettings: Migrate layout to GML
All other Settings applications use this, so let's match them!
2021-11-20 21:05:20 +00:00
Sam Atkins
1dd5c838cf DisplaySettings: Migrate to using SettingsWindow :^) 2021-11-20 21:05:20 +00:00
Sam Atkins
a4af8b2a64 DisplaySettings: Move screen number show/hide logic into widget
This is functionally the same as before, as selecting a tab fires Show
and HideEvents. But this way, we don't need to directly access the
TabWidget, which will make using SettingsWindow simpler.
2021-11-20 21:05:20 +00:00
Sam Atkins
9fc53017c6 MouseSettings: Adjust layout so mouse-button image is no longer clipped 2021-11-20 21:05:20 +00:00
Sam Atkins
f20b0403bc MouseSettings: Migrate to using SettingsWindow :^) 2021-11-20 21:05:20 +00:00
Sam Atkins
fca7924437 MailSettings: Migrate to using SettingsWindow :^) 2021-11-20 21:05:20 +00:00
Sam Atkins
23341f35cb LibGUI: Add SettingsWindow class
The FooSettings apps have quite a lot of boilerplate just around
creating a tabbed window with the same styling and the same row of
buttons along the bottom. So, let's extract that out into a class we can
reuse! :^)

You create a SettingsWindow instead of a regular Window, passing a title
and a flag to determine if a "Defaults" button is shown. Then call
add_tab() to add tabs to it. Tabs are widgets extending
SettingsWindow::Tab, which has methods for saving and resetting the
values.
2021-11-20 21:05:20 +00:00
Ben Wiederhake
63078ba7fc FontEditor: Set all pixels when pasting a glyph
For an empty glyph (all pixels initially clear), this makes no
difference. However, if the glyph for the selected code point already
contains some set pixels, pasting used to "add" the set pixels, instead
of overwriting.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
8d80d1346d FontEditor: Add ability to copy the selected code point
This makes it easier to preview the current glyph, if it is not easily
typable.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
7180813cd4 FontEditor: Support flipping and rotating
This is especially useful for highly symmetric scripts like this:
https://www.unicode.org/charts/PDF/U1400.pdf
2021-11-20 12:56:35 +01:00
Ben Wiederhake
1dfb3ff4eb FontEditor: Tighten type of UndoGlyph::undo_state (cannot fail) 2021-11-20 12:56:35 +01:00
Ben Wiederhake
bce5a0a00d FontEditor: Don't show focus box after clicking 'present' checkbox 2021-11-20 12:56:35 +01:00
Ben Wiederhake
197b5f7c4a FontEditor: More reasonable labels, move property to GML 2021-11-20 12:56:35 +01:00
Ben Wiederhake
a8c95097b5 FontEditor: Convert UI from fixed to implicit height
This gets rid of a magic number, and means that the widget will adapt
nicely when the system font changes.
2021-11-20 12:56:35 +01:00
Andreas Kling
5bd3d0cf25 LibWeb: Use the sandboxed image ImageDecoder when loading favicons 2021-11-20 11:25:46 +01:00
Andreas Kling
25a8bd3a8a LibWeb: Use the sandboxed ImageDecoder when creating image documents
An image document is the synthetic DOM::Document we create to wrap an
image when you open the URL of an image directly in a web view.
The path that creates these documents will now also call out to the
separate ImageDecoder process for the actual decoding work.
2021-11-20 10:56:36 +01:00
Andreas Kling
e017fe92e6 LibWeb: Move ImageDecoder client connection singleton to its own file
This will allow us to use it in more places around LibWeb.
2021-11-20 10:56:31 +01:00
Ben Wiederhake
b224efe73b FontEditor: Show code point name in status bar 2021-11-20 00:31:55 +01:00
Ben Wiederhake
b06b54772e Meta+LibUnicode: Provide code point names through library 2021-11-20 00:31:55 +01:00
Andreas Kling
4bd4ce439a PixelPaint: Allow toggling the active layer boundary display rect
Let the user opt out of painting a rectangle around the currently
active layer.
2021-11-20 00:25:24 +01:00
Sam Atkins
85e5586a27 LibWeb: Add spec comments to CSS Tokenizer
Some of the code has been slightly rearranged to match the spec order,
but otherwise I've tried not to mess with it.
2021-11-19 22:35:05 +01:00