Commit graph

30245 commits

Author SHA1 Message Date
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
Jelle Raaijmakers 8292061f53 Toolchain: Remove git clone of project from Dockerfile
The goal of these more recent additions to the Dockerfile is to provide
a working copy of SerenityOS with the toolchain prebuilt. To me, these
additions feel misplaced:

- The toolchain is built assuming the i686 architecture, which may not
  be what you want.
- You get a shallow clone of the project limiting you in your abilities
  to navigate through the project's history or bisect.
- There's this awkward directory structure of `/serenity/serenity-git`
  and `/serenity/out`.

The Dockerfile is immensely useful for building SerenityOS in a
containerized environment, separate from the host's environment. If we
want to automate builds, we can always use CI or extend this image to
do so. For now, let's remove the `git clone` and associated actions.

Fixes #9310.
2021-11-20 21:16:51 +00:00
Jelle Raaijmakers cff3add897 Toolchain: Remove unused gettext package from Dockerfile
It is no longer used to build the git port, it seems.
2021-11-20 21:16:51 +00:00
Jelle Raaijmakers b08a265840 Toolchain: Remove unused wget package from Dockerfile 2021-11-20 21:16:51 +00:00
Jelle Raaijmakers 8744086781 Toolchain: Add Qemu build dependencies to Dockerfile
Also add `libsdl2-dev` as a required dependency and reorder the
list of packages passed to `apt-get`.
2021-11-20 21:16:51 +00:00
Jelle Raaijmakers b7bf1a4330 Toolchain: Update Dockerfile to ubuntu:21.10 2021-11-20 21:16:51 +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
Lady Gegga 4b34a1302b Base: Add new FontEditor icons already in use
These should have been part of 7180813cd4.
2021-11-20 13:51:54 +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
Sam Atkins 9403cc42f9 LibWeb: Convert CSS Token::m_value from StringBuilder to FlyString
Again, this value does not change once we have finished creating the
Token, so it can be more lightweight.
2021-11-19 22:35:05 +01:00
Sam Atkins 75e7c2c5c0 LibWeb: Convert CSS Token::m_unit from StringBuilder to FlyString
This value doesn't change once it's assigned to the Token, so it can be
more lightweight than a StringBuilder.
2021-11-19 22:35:05 +01:00
Sam Atkins 9286aa77bc LibWeb: Break friendship between CSS Token and Parser :^(
The Parser no longer needs to mess with Token's internals, since we have
getter functions that are safer.
2021-11-19 22:35:05 +01:00
Sam Atkins d37f62fd54 LibWeb: Verify that the Tokenizer doesn't produce Dimensions from %
If `12.34%` ever produces a Dimension token instead of a Percentage,
then something has gone wrong and we want to know about it!
2021-11-19 22:35:05 +01:00
Sam Atkins 522faa1554 LibWeb: Use number value from CSS Tokens
This lets us get rid of `try_parse_float()`, and simplifies the various
places we were calling it before.
2021-11-19 22:35:05 +01:00
Sam Atkins 1d2276f0e7 LibWeb: Return numeric values from Token value getters
This saves user code from having to parse the numbers, as we already did
that while Tokenizing. :^)

As a bonus, we now round extremely large integers to the closest
available value, like the spec tells us to.
2021-11-19 22:35:05 +01:00
Sam Atkins f6869797a7 LibWeb: Convert numeric tokens to numbers in CSS Tokenizer
The spec wants us to produce numeric values as the Tokenizer sees them,
rather than waiting until the parse stage. This is a first step towards
that.
2021-11-19 22:35:05 +01:00
thislooksfun d2ef8b29e8 CI: Prevent false errors if a commit message contains CRLF
Previously if a commit message contained any carriage returns it would
correctly fail the 'contains CRLF line breaks' test, but it would also
report 'Commit message lines are too long' and 'Commit title ends in a
period', even if neither is true.
2021-11-19 22:30:11 +02:00
Linus Groh 8d6d39e07c LibJS: Treat relativeTo parameters as PlainDate or ZonedDateTime
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/c822e14
2021-11-19 19:59:13 +00:00
Linus Groh 2ecb47c985 LibJS: Update spec comments in format_time_zone_offset_string()
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/60c753a
2021-11-19 19:29:18 +00:00
Linus Groh d0c29c9735 LibJS: Allow string as parameter in Temporal's round() / total()
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/1f0c586
2021-11-19 11:06:53 +00:00
Timothy Flynn 93ee922027 LibUnicode: Support locales-without-script aliases for ECMA-402
As noted by ECMA-402, if a supported locale contains all of a language,
script, and region subtag, then the implementation must also support the
locale without the script subtag. The most complicated example of this
is the zh-TW locale.

The list of locales in the CLDR database does not include zh-TW or its
maximized zh-Hant-TW variant. Instead, it inlcudes the zh-Hant locale.
However, zh-Hant-TW is listed in the default-content locale list in the
cldr-core package. This defines an alias from zh-Hant-TW to zh-Hant. We
must then also support the zh-Hant-TW alias without the script subtag:
zh-TW. This transitively maps zh-TW to zh-Hant, which is a case quite
heavily tested by test262.
2021-11-19 11:45:35 +01:00
Timothy Flynn 4b535ce1c8 LibUnicode: Stop passing the cldr-core package to UnicodeNumberFormat
This is no longer needed now that this generator isn't parsing the
default-content locales.
2021-11-19 11:45:35 +01:00