Commit graph

45824 commits

Author SHA1 Message Date
Timothy Flynn 5063e218af AK: Move the AK::FixedPoint formatter to FixedPoint.h
This does not need to be defined in Format.h. This causes FixedPoint.h
to be included everywhere. This is particularly going to be an issue
when trying to include <CoreServices/CoreServices.h> on macOS. The macOS
SDK defines its own FixedPoint structure which will conflict with ours.
2023-01-19 11:29:48 +00:00
Timothy Flynn 027aee2c66 Userland: Add missing Math.h and IntegralMath.h header includes
These are currently being implicitly including by FixedPoint.h by way of
Format.h. The former will soon be removed from the latter, which would
otherwise cause a compile error in these files.
2023-01-19 11:29:48 +00:00
Peter Elliott b217045f8f AK: Don't write trailing zeros with %g 2023-01-19 12:22:24 +01:00
Peter Elliott 5efcec308a Utilities: Rewrite sort(1) to be more posixy 2023-01-19 12:22:24 +01:00
Peter Elliott d50de8e4ef Utilities: Replace fgrep with grep --fixed-strings 2023-01-19 12:22:24 +01:00
Peter Elliott d844829de4 Ports: Fix compatiblity issues with running package.sh on Serenity 2023-01-19 12:22:24 +01:00
Joao Luz 18d72ed3fd Presenter: Disable actions when there is no loaded presentation 2023-01-19 11:15:46 +00:00
Tim Schumacher da1706d697 LibC: Remove the stub iconv header
This was added in 2019 to trick GCC into accepting a newlib build, but
now this no longer seems to be required to build the toolchain.
2023-01-19 11:51:58 +01:00
Tim Schumacher 4dcc26e940 LibAudio: Skip MP3 frames if not enough historic data is available 2023-01-19 11:42:32 +01:00
Tim Schumacher 4ad9fbc6a5 LibAudio: Clear the MP3 bit stream when seeking 2023-01-19 11:42:32 +01:00
Tim Schumacher 9bf9702842 SoundPlayer: Translate device samples to source samples before seeking 2023-01-19 11:42:32 +01:00
Tim Schumacher dfc57c0dd9 SoundPlayer: Don't offset the seek bar with the last seek value
The audio loader plugins already do this internally, if we do this a
second time the seek bar will just end up getting rendered at the wrong
place.
2023-01-19 11:42:32 +01:00
Tim Schumacher daf181caa8 LibCore: Let offset-related Stream functions return an unsigned value
A negative return value doesn't make sense for any of those functions.
The return types were inherited from POSIX, where they also need to have
an indicator for an error (negative values).
2023-01-19 11:41:56 +01:00
Tim Schumacher 1ca62de558 LibCore: Return EBADF on unsupported stream operations 2023-01-19 11:41:56 +01:00
Tim Schumacher e65767c2e7 LibDebug: Identify embedded resources with a preceding dot 2023-01-19 11:29:29 +01:00
Tim Schumacher edd4913573 LibDebug: Factor out the "looks like embedded resource" condition 2023-01-19 11:29:29 +01:00
Linus Groh afc055c088 LibWeb: Convert the Location object to IDL
This includes:

- Moving it from Bindings/ to HTML/
- Renaming it from LocationObject to Location
- Removing the manual definitions of the constructor and prototype
- Removing special handling of the Location interface from the bindings
  generator
- Converting the JS_DEFINE_NATIVE_FUNCTIONs to regular functions
  returning DeprecatedString instead of PrimitiveString
- Adding missing (no-op) setters for the various attributes, which are
  expected to exist by the bindings generator
2023-01-18 17:36:39 -05:00
konrad 78d6de2ec1 Kernel: Make a slightly better demo for Aarch64 multiprocessing 2023-01-18 22:58:42 +01:00
konrad 9b12571a86 AK: Unify kernel debug messages, avoid printing time if unavailable 2023-01-18 22:58:42 +01:00
konrad 5791072280 Kernel: Detect Aarch64 virtual address bit width with CPU ID registers 2023-01-18 22:58:42 +01:00
konrad 401fc6afae Kernel: Detect Aarch64 physical address bit width with CPU ID registers 2023-01-18 22:58:42 +01:00
konrad 66c65f6e2c Kernel: Add and use accessors to read from Aarch64 CPU ID registers
Following registers accessors are updated and put in use:
* ID_AA64ISAR0_EL1, Instruction Set Attribute Register 0

Accessors for following registers are added and put in use:
* ID_AA64ISAR1_EL1, Instruction Set Attribute Register 1
* ID_AA64ISAR2_EL1, Instruction Set Attribute Register 2
* ID_AA64MMFR1_EL1, AArch64 Memory Model Feature Register 1
* ID_AA64MMFR2_EL1, AArch64 Memory Model Feature Register 2
* ID_AA64MMFR3_EL1, AArch64 Memory Model Feature Register 3
* ID_AA64MMFR4_EL1, AArch64 Memory Model Feature Register 4
* ID_AA64PFR0_EL1, AArch64 Processor Feature Register 0
* ID_AA64PFR1_EL1, AArch64 Processor Feature Register 1
* ID_AA64PFR2_EL1, AArch64 Processor Feature Register 2
* ID_AA64ZFR0_EL1, AArch64 SVE Feature ID register 0
* ID_AA64SMFR0_EL1, AArch64 SME Feature ID register 0
* ID_AA64DFR0_EL1, AArch64 Debug Feature Register 0
* ID_AA64DFR1_EL1, AArch64 Debug Feature Register 1

Additionally, there are few CPU features detected with
* TCR_EL1, Translation Control Register

but detection mechanism using it (for LPA/LPA2) is probably wrong as
this is control register, not a id register, and needs further work.

Finally, following registers are provided. Former one is already used,
while latter is given for future use:
* MIDR_EL1, Main ID Register
* AIDR_EL1, Auxiliary ID Register
2023-01-18 22:58:42 +01:00
konrad 6979cf230e Kernel: Print Aarch64 CPU features during CPU initialization 2023-01-18 22:58:42 +01:00
konrad a8e9591bac Kernel: Split Aarch64 CPU setup into two stages
Former aims to bring the processor itself into desired state,
while latter allows for additional initialization with heap available.
2023-01-18 22:58:42 +01:00
konrad 97dce5d001 Kernel: Add Aarch64 CPU feature detection 2023-01-18 22:58:42 +01:00
konrad 9f736d782c AK: Patch ArbitrarySizedEnum operators for missing constructor
Patch kindly provided by Ali on #aarch64 on Discord.

Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
2023-01-18 22:58:42 +01:00
konrad 0f81fb03f2 Kernel: Introduce stages in Aarch64 CPU initialization phase
Dropping to each exception level is now more explicit.
2023-01-18 22:58:42 +01:00
konrad c08f059340 Kernel: Add CPUFeature enumeration for Aarch64 CPUs
Also, enumeration name & description mappings are provided along.
2023-01-18 22:58:42 +01:00
konrad 823aab8296 Kernel: Use a descriptive name for x86-64 cpu_feature_to_string_view
Settled for `cpu_feature_to_name` as that naming is more descriptive
and similarly named `cpu_feature_to_description` function will be
provided for Aarch64.
2023-01-18 22:58:42 +01:00
Liav A 649f78d0a4 LibGfx+Ladybird+Userland: Don't sniff for TGA images with only raw bytes
Because TGA images don't have magic bytes as a signature to be detected,
instead assume a sequence of ReadonlyBytes is a possible TGA image only
if we are given a path so we could check the extension of the file and
see if it's a TGA image.

When we know the path of the file being loaded, we will try to first
check its extension, and only if there's no match to a known decoder,
based on simple extension lookup, then we would probe for other formats
as usual with the normal sniffing method.
2023-01-18 21:48:35 +01:00
dependabot[bot] 9f2d4d3fd5 CI: Bump actions/setup-java from 1 to 3
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 1 to 3.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 14:49:51 +00:00
dependabot[bot] 3d9b88d2a7 CI: Bump r-lib/actions from 1 to 2
Bumps [r-lib/actions](https://github.com/r-lib/actions) from 1 to 2.
- [Release notes](https://github.com/r-lib/actions/releases)
- [Commits](https://github.com/r-lib/actions/compare/v1...v2)

---
updated-dependencies:
- dependency-name: r-lib/actions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 14:49:36 +00:00
dependabot[bot] cdc2d6ac18 CI: Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 14:48:47 +00:00
dependabot[bot] 086116983b CI: Bump actions/setup-node from 2 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 14:48:16 +00:00
dependabot[bot] a8bd231a65 CI: Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 14:47:40 +00:00
Cameron Youell c6df488a1f LibWeb: Fix FrameLoader::load_error_page
We weren't properly creating a `LoadRequest` which resulted in `m_page`
not having a value in certain situations inside
`ResourceLoader::load(LoadRequest&)`
2023-01-18 14:46:13 +00:00
Cameron Youell ce1b7e63c9 LibWeb: Fix error page icon outside of serenity 2023-01-18 14:46:13 +00:00
Timothy Flynn 537fcaf59e AK+LibUnicode: Provide Unicode-aware caseless String matching
The Unicode spec defines much more complicated caseless matching
algorithms in its Collation spec. This implements the "basic" case
folding comparison.
2023-01-18 14:43:40 +00:00
Timothy Flynn 8f2589b3b0 LibUnicode: Parse and generate case folding code point data
Case folding rules have a similar mapping style as special casing rules,
where one code point may map to zero or more case folding rules. These
will be used for case-insensitive string comparisons. To see how case
folding can differ from other casing rules, consider "ß" (U+00DF):

    >>> "ß".lower()
    'ß'

    >>> "ß".upper()
    'SS'

    >>> "ß".title()
    'Ss'

    >>> "ß".casefold()
    'ss'
2023-01-18 14:43:40 +00:00
Timothy Flynn 9226cf7272 LibUnicode: Rename a special casing variable name in the UCD generator
This name will soon be a bit ambiguous with a similar case folding
variable name.
2023-01-18 14:43:40 +00:00
Timothy Flynn 8d9fb898d7 LibUnicode: Update out-of-date spec links
And remove links that aren't adding much value but will often get out of
date (i.e. links to UCD files, which are already all listed in
unicode_data.cmake).
2023-01-18 14:43:40 +00:00
Timothy Flynn 142abc0b2e LibCore+ConfigServer: Add FileWatcherFlags to replace InodeWatcherFlags
InodeWatcherFlags is an enumeration from the Kernel. To avoid using it
outside of Serenity, add a FileWatcherFlags for FileWatcher, much like
we already have FileWatcherEvent::Type.
2023-01-18 09:37:11 -05:00
Timothy Flynn 98e6dbf50a Userland: Add missing limits.h header includes
This is currently being implicitly including by InodeWatcherEvent.h by
way of FileWatcher.h. The former will soon be removed from the latter,
which would otherwise cause a compile error in these files.
2023-01-18 09:37:11 -05:00
Jelle Raaijmakers 6ef8100e25 CI: Ignore dependabot in commit linter for PRs
Dependabot cannot be configured to significantly change the way it
formats its commit message, and it currently includes a "Signed-Off-By"
tag which is not allowed by our linter.

This updates our CI commit linter to exclude bots from the checks.
2023-01-18 14:06:05 +00:00
Timothy Flynn 5a1ac851aa FuzzilliJs: Print the result of JS::Value::to_string using AK::outln
JS::Value::to_string now returns a String, which does not have a null-
terminated characters() accessor.
2023-01-18 12:52:25 +00:00
Timothy Flynn 8ca528217c LibCore: Implement FileWatcher for Linux
This implements FileWatcher using inotify filesystem events. Serenity's
InodeWatcher is remarkably similar to inotify, so this is almost an
identical implementation.

The existing TestLibCoreFileWatcher test is added to Lagom (currently
just for Linux).

This does not implement BlockingFileWatcher as that is currently not
used anywhere but on Serenity.
2023-01-18 06:46:12 -05:00
Timothy Flynn 91cbdc67de LibCore: Default-initialize the FileWatcher event mask 2023-01-18 06:46:12 -05:00
Timothy Flynn 8419ca8b78 LibCore: Handle multiple events in the FileWatcher event mask formatter 2023-01-18 06:46:12 -05:00
Timothy Flynn 5bfc9daba1 LibCore: Move FileWatcher implementations into separate files
Rather than one big file with (eventually) all implementations for each
OS, let's keep OS-specific implementations in their own files.
2023-01-18 06:46:12 -05:00
Cameron Youell 204257526c LibWeb: Define window.isSecureContext 2023-01-18 09:52:47 +00:00