Commit graph

42205 commits

Author SHA1 Message Date
Gunnar Beutner
ce8d410f36 Ports: Make the quake3 port buildable on ARM64 hosts
Previously, on ARM64 hosts we'd try to build ARM64 binaries even when
SERENITY_ARCH was set to x86_64. This would cause the build to fail.
2022-10-18 17:23:52 +02:00
Timothy Flynn
27737f613c LibTimeZone+LibJS: Update to TZDB version 2022e
https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html

This version changes America/Chicago's transtion from LMT to CST from
1883 Nov 18 12:09:24 to 1883 Nov 18 18:00.
2022-10-18 16:01:44 +02:00
Andreas Kling
0e06d4a767 Meta: Add Timon Kruiper to the contributors list :^) 2022-10-18 15:48:29 +02:00
Liav A
74a080fb68 LibC: Use proper casting in fgetc and fgetc_unlocked functions
In the fgetc function, a fix was already in place but was clunky. A real
proper solution is to use an unsigned char instead of a char when
returning the value, so an implicit cast is happening based on the
assumption that the value is unsigned, so if the variable contained 0xff
it won't be treated as -1, but as unsigned 0xff, so the result int will
be 0xff and not -1.

The same solution is applied to the fgetc_unlocked function as well.
2022-10-18 13:21:38 +02:00
Timon Kruiper
1a84cb5457 Kernel/aarch64: Stub more functions to be able to build Scheduler.cpp
With all these functions stubbed, Scheduler.cpp is now buidable!
2022-10-18 13:08:25 +02:00
Timon Kruiper
352f980ca2 Kernel: Call Processor::are_interrupts_enabled in Scheduler::idle_loop
This expresses the intent better, and we shouldn't be calling global
functions anyway.
2022-10-18 13:08:25 +02:00
Jesse Buhagiar
c962cfdc28 Kernel: Reintroduce ScopedAddressSpaceSwitcher to aarch64 build 2022-10-18 13:08:25 +02:00
Jesse Buhagiar
2db73f2171 Kernel: Reintroduce Mutex.cpp to aarch64 build
A few more stubs have been added to support the building of this file
2022-10-18 13:08:25 +02:00
Jesse Buhagiar
07649bcb02 Kernel: Reintroduce Credentials.cpp to aarch64 build 2022-10-18 13:08:25 +02:00
Jesse Buhagiar
fd5671b5d5 Kernel: Add more stubs for the Thread class
Slowly getting there...
2022-10-18 13:08:25 +02:00
Jesse Buhagiar
e61d22b5b6 Kernel: Prevent atomic read/write from failing on nullptr
Having this function return `nullptr` explicitly triggers the compiler's
inbuilt checker, as it knows the destination is null. Having this as a
static (scoped) variable for now circumvents this problem.
2022-10-18 13:08:25 +02:00
Jesse Buhagiar
6582e34bbb Kernel: Include KBufferBuilder.cpp in aarch64 build 2022-10-18 13:08:25 +02:00
Gunnar Beutner
056e406a12 Kernel: Add even more AARCH64 stubs 2022-10-18 13:08:25 +02:00
Gunnar Beutner
63a91d6971 Kernel: Add more AARCH64 stubs 2022-10-18 13:08:25 +02:00
b14ckcat
bf3c99ef23 Kernel/USB: Refactor USB Pipe
Decompose the current monolithic USBD Pipe interface into several
subclasses, one for each pair of endpoint type & direction. This is to
make it more clear what data and functionality belongs to which Pipe
type, and prevent nonsensical things like trying to execute a control
transfer on a non-control pipe. This is important, because the Pipe
class is the interface by which USB device drivers will interact with
the HCD, so the clearer and more explicit this interface is the better.
2022-10-18 12:58:12 +02:00
b14ckcat
1304575190 Kernel/USB: Adjust USB Pipe buffer
Allocate DMA buffer pages for use within the USBD Pipe class, and allow
for the user to specify the size of this buffer, rounding up to the
next page boundary.
2022-10-18 12:58:12 +02:00
Zaggy1024
f0420def78 LibWeb: Implement HTMLSelectElement length, item() and namedItem()
These are simple calls through to the HTMLOptionsCollection functions
the same names, as with HTMLSelectElement.add().
2022-10-18 12:57:40 +02:00
Johannes Laudenberg
2547e0b966 LibWeb: Use calculate_min_content_height() for sizing of grid children
When sizing grid children we now also check whether
calculate_min_content_height() adds to the computed height. Previously
we were using the result of layout_inner() which led to zero height of
not specifically sized block level children.

This fixes a height issue with our GitHub page. The footer is now at
its place and is not hovering over other content anymore.
2022-10-18 12:55:34 +02:00
implicitfield
3dddc02400 2048: Do not decrement m_target_tile_power
This fixes an issue where the target tile would decrease each time that
the settings window was opened.
2022-10-17 22:40:52 +02:00
implicitfield
5d77daebf3 2048: Convert to GML 2022-10-17 22:40:52 +02:00
Linus Groh
a6ba82fc49 LibTimeZone: Resolve /etc/localtime with realpath(), not readlink()
On Fedora Silverblue and other OSTree-based systems, /etc/localtime is
a symlink to /run/host/etc/localtime, which then points to the expected
zoneinfo file, e.g. ../usr/share/zoneinfo/Europe/Berlin.
By using realpath() instead of readlink() we can resolve the symlink
recursively and avoid falling back to UTC.
2022-10-17 22:19:50 +02:00
Timothy Flynn
b1b17f286f LibC: Retrieve the current time zone from LibTimeZone
This ensures we have just one location for determining the time zone, so
that LibC and LibTimeZone will behave the same.

(Note the FIXME removed here is also in TimeZone::current_time_zone.)
2022-10-17 21:50:55 +02:00
Timothy Flynn
ed612d835d LibTimeZone: Default to UTC if parsing the TZ environment variable fails
Commit c3fd455 changed LibTimeZone to fall back to the system time zone
when we fail to parse the TZ environment variable. This behavior differs
from both our LibC and glibc; they abort parsing and default to UTC.

This changes LibTimeZone to behave the same way to avoid a very awkward
situation where some parts of the codebase thinks the timezone is UTC,
and others think the timezone is whatever /etc/timezone indicates.
2022-10-17 21:50:55 +02:00
brapru
6691ef5a44 route: Accept CIDR notation when specifying network
Now that the IPv4Address has the ability to generate valid IP addresses
from CIDR notations, this provides a nicer interface to the user when
specifying the network address to add or delete.
2022-10-17 20:18:44 +02:00
Timon Kruiper
c7aa05cdcc Kernel/aarch64: Initialize TimeManagement in init.cpp
Also remove the check for aarch64 in AK/Format.cpp, so now the format
functions will prepend the time since boot!
2022-10-17 20:11:31 +02:00
Timon Kruiper
01a14ac7af Kernel: Implement TimeManagement for aarch64
This sets up the RPi::Timer to trigger an interurpt every 4ms using one
of the comparators. The actual time is calculated by looking at the main
counter of the RPi::Timer using the Timer::update_time function.

A stub for Scheduler::timer_tick is also added, since the TimeManagement
code now calls the function.
2022-10-17 20:11:31 +02:00
Timon Kruiper
83b95c135e Kernel/aarch64: Implement HardwareTimer for RPi::Timer
This makes the RPi::Timer suitable for use in the TimeManagement code.
2022-10-17 20:11:31 +02:00
Timon Kruiper
de0bb99893 Kernel: Correctly calculate delta_ticks when 64-bit counter wraps around
We never caught this bug in the HPET, since it takes ages for a 64-bit
counter to wrap around. Also remove an unnecessary if check.
2022-10-17 20:11:31 +02:00
Timon Kruiper
6680241773 Kernel/aarch64: Add implementation for Processor::current_in_irq 2022-10-17 20:11:31 +02:00
Timon Kruiper
1348757dda Kernel/aarch64: Add implementation of Processor::is_bootstrap_processor
This should really go into a generic Processor class, but there is no
such class yet, so a FIXME is added for that.
2022-10-17 20:11:31 +02:00
Timon Kruiper
9827c11d8b Kernel: Move InterruptDisabler out of Arch directory
The code in this file is not architecture specific, so it can be moved
to the base Kernel directory.
2022-10-17 20:11:31 +02:00
Linus Groh
8b5b42f667 WebDriver: Replace Session* session = ... with auto* session = ... 2022-10-17 18:20:05 +02:00
Linus Groh
324eb98bb9 WebDriver: Pass endpoint handler function parameters by const reference 2022-10-17 18:20:05 +02:00
Linus Groh
727e982c50 WebDriver: Put endpoint functions in spec order 2022-10-17 18:20:05 +02:00
Linus Groh
eafb924580 WebDriver: Include section number and title in spec comments
Also, only add the HTTP method and path to the Client side where they
are relevant for seeing which parameters are available and such.
2022-10-17 18:20:05 +02:00
leeight
0d96468e9b LibJS: Implement RegExp legacy static properties
RegExp legacy static properties Spec url is https://github.com/tc39/proposal-regexp-legacy-features
2022-10-17 17:08:33 +02:00
Andrew Kaster
5e2fe7e2bf Lagom: Enable compile_commands.json for the lagom build directory
This allows a developer who only wants to look at Lagom to have their
IDE find source files and headers properly.
2022-10-17 15:55:55 +02:00
Andrew Kaster
b8e51425e9 Lagom+CMake: Propagate dependencies for generated custom targets
We have logic for serenity_generated_sources which works well for source
files that are specified in GENERATED_SOURCES prior to calling
serenity_lib or serenity_bin. However, code generated with
invoke_generator, and the LibWeb generators do not always follow the
pattern of the IDL and GML files.

For the LibWeb generators, we can just add_dependencies to LibWeb at the
time we declare the generate_Foo custom target. However for LibLocale,
LibTimeZone, and LibUnicode, we don't have the name of the target
available, so export the name in a variable to set into
GENERATED_SOURCES.

To make this work for Lagom, we need to make sure that lagom_lib and
serenity_bin in Lagom/CMakeLists.txt call serenity_generated_sources on
the target.

This enables the Xcode generator on macOS hosts, at least for Lagom.
2022-10-17 15:55:55 +02:00
Andrew Kaster
8160b53228 Lagom: Make lagom_lib take names prefixed with Lib
This matches serenity_lib, and consolidates the logic to strip Lib from
the front of the library name for the Lagom export name into one place
at the top of lagom_lib.
2022-10-17 15:55:55 +02:00
Andrew Kaster
3f13959c68 Kernel: Mark Version.h as a dependency of Kernel rather than ALL 2022-10-17 15:55:55 +02:00
Tobias Christiansen
61dd7d5d86 WebDriver: Add/Expand some dbgln's
`update_cookie` was missing a dbgln and not all functions getting
arguments printed them.
2022-10-17 15:48:22 +02:00
Tobias Christiansen
122e2d2076 WebDriver: Implement POST /session/{id}/cookie endpoint
This allows the WebDriver to create a cookie.
We use a Web::Cookie::ParsedCookie to transport the data through IPC
to take advantage of the RFC6265 Section 5.3 implementation in the
CookieJar.
2022-10-17 15:48:22 +02:00
Linus Groh
b79b78a5cc LibJS: Sync the set of rounding modes
This is a normative change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/9613358
- https://github.com/tc39/proposal-temporal/commit/4c45464
2022-10-17 13:31:22 +02:00
Linus Groh
3d4ce3cc6d LibJS: Add missing validation to remaining Calendar operations
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/c2a0cea
2022-10-17 12:56:05 +02:00
Linus Groh
4567ded8e4 LibJS: Reject relativeTo string such as "2022-08-18T17:01Z"
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2dc20bf
2022-10-17 12:56:05 +02:00
Linus Groh
57162ad510 LibJS: Rename IsValidTimeZoneName to IsAvailableTimeZoneName
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/873313b
2022-10-17 12:56:05 +02:00
Linus Groh
72997c6b77 LibJS: Define IsValidTimeZoneName in terms of AvailableTimeZones
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/d83dcf0

Note that even though we already implement AvailableTimeZones for Intl,
I kept the existing implementation calling into LibTimeZone directly.
2022-10-17 12:56:05 +02:00
Tobias Christiansen
fefe447cf5 WebDriver: Implement DELETE /session/{id}/cookie/{name} endpoint 2022-10-17 11:31:30 +02:00
Tobias Christiansen
0d6dc2492d WebDriver: Implement DELETE /session/{id}/cookie endpoint 2022-10-17 11:31:30 +02:00
Tobias Christiansen
c710780852 Browser: Add update_cookie WebDriver IPC endpoint
Through this the WebDriver will be able to change cookies. Needed for
deleting cookies.
2022-10-17 11:31:30 +02:00