Commit Graph

42179 Commits

Author SHA1 Message Date
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
Tobias Christiansen
30360918d4 Browser: Allow changing of existing Cookies in the CookieJar
And attach all the plumbing through to Tab over BrowserWindow.
2022-10-17 11:31:30 +02:00
Fausto Tommasi
813ca5ebbe PixelPaint: Make Alt-Clicking with all tool act like the PickerTool
Refactored PickerTool functionality to the ImageEditor level and added a
flag to Tool Base Class to allow for tools to override Alt+Click
ColorPicker functionality
2022-10-17 09:39:57 +02:00
cflip
66c039c66f Ports: Allow ports to specify working directory when run from launcher 2022-10-17 01:37:58 +02:00
cflip
05e7b338ad LibDesktop+Taskbar: Add 'WorkingDirectory' property to app files 2022-10-17 01:37:58 +02:00
cflip
953520df49 LibCore: Add argument to specify working directory in Process::spawn 2022-10-17 01:37:58 +02:00
Hendiadyoin1
490c097bc4 LibJS: Forward a string aproximation of the CallExpression to Call Ops
This gives us better debug output when analysing calls to `undefined`
and also fixes multiple test-js cases expecting an
`(evaluated from $Expression)` in the error message.

This also refactors out the generation of that string, to avoid code
duplication with the AST interpreter.
2022-10-17 01:36:41 +02:00
Liav A
a2ccf31a62 Ports/dmidecode: Remove install and post_install overriden sequences
We used to do whole bunch of unnecessary things in the install sequence
which the default port_include script sequence can do just fine,
therefore the install sequence is removed from the port script.

The post_install sequence wrongly called "make install-bin" which could
be done in the default install sequence, as well as to create the /bin
directory which is completely unnecessary to do because the image build
script already does that for us. Also, now /usr/local/bin is in the PATH
environment variable, so the installed binaries are runnable without
creating symlinks in the /bin directory, therefore making the sequence
of post_install completely unnecessary in the script so it is removed
too.
2022-10-17 01:13:10 +02:00
Chun Ngai Au
5bccb16e61 WindowServer: Add wallpaper backing bitmap
Fixes inconsistencies in redrawing the wallpaper when in stretch mode by
first drawing to a backing bitmap. To reduce unnecessary allocations,
the backing bitmap is only used for stretch mode.
2022-10-17 01:12:51 +02:00
Tobias Lundberg
d0008409a8 Base: Add more emoji
🐭 - U+1F42D mouse face
🦔 - U+1F994 hedgehog
🦤 - U+1F9A4 dodo
🦩 - U+1F9A9 flamingo
🦭 - U+1F9AD seal
2022-10-17 01:09:10 +02:00
Liav A
c0af32a83d Ports: Add potrace utility port 2022-10-17 01:08:22 +02:00
Liav A
db45e242c4 LibC: Do an explicit static_cast in the fgetc function
We assumed that by returning a char in the fgetc function that an
implicit cast is sufficient, but apparently if that char contains 0xff,
the result int will be -1 (0xFFFFFFFF). To ensure this does not happen,
let's do an explicit casting.
2022-10-17 01:08:22 +02:00
Liav A
711f64d366 Ports: Add tree utility port 2022-10-17 01:08:01 +02:00
Liav A
c58c938659 SpiceAgent: Add unveil call on the /proc/all node path
This is needed later in the program when doing unveil on the path of
"/tmp/session/%sid/portal/clipboard", because %sid is translated to the
root session ID which therefore relies on access to the /proc/all node.
2022-10-17 00:59:56 +02:00
Tim Schumacher
2a4f81fc83 Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
Tim Schumacher
9d6c4c5137 Meta: Allow shellcheck to search sourced files in the script directory 2022-10-16 23:39:45 +02:00
Tim Schumacher
032ef1b461 Meta: Define SUDO for all the image building scripts
Back when adding support for `pls` as a `sudo` replacement,
`build-image-qemu` dynamically set the `SUDO` variable depending on what
system it was running on and used the contents of that variable to call
the correct elevation utility.

During recent changes to the elevation error message, that usage of the
variable was replicated across all of our scripts, but without also
replicating the logic to set that variable in the first place.

Add back the variable setting logic to all the other scripts to keep
them from running into unset variables.
2022-10-16 23:39:45 +02:00
Andrew Kaster
2f439327ac LibThreading: Only set pthread name on Serenity
pthread_setname_np is a can of worms for portability. Linux, macOS,
and the BSDs all do it differently.

Also skip adding the tid as an inspectable Core::Object property on
systems where pthread_t is known to be a pointer.
2022-10-16 15:39:00 -06:00
Paul Herman
d989c50c90 AK: Document the non-standard extensions in TRY
I'm not sure there's a material improvement from this patch. However,
I've been reading the error handling code from multiple projects and
was excited to see Serenity being able to handle assignment
(`auto x = TRY(make_x())`) the same way as actions (`TRY(do_x())`).
I think it's worth documenting that this is only possible due to
non-standard extensions.
2022-10-16 22:05:42 +02:00
Timothy Flynn
9fad23018a Meta: Remove unused "prefix" variable from invoke_generator() helper
This became unused after 1ae0cfd.
2022-10-16 21:16:48 +02:00
Jelle Raaijmakers
0cf3cb6279 LibGL: Immediately dereference vertex attribute data in display lists
According to the spec, pointers to client data need to be dereferenced
immediately when adding calls such as `glDrawElements` or
`glArrayElement` to a display list. We were trying to support display
lists for these calls but since they only invoke _other_ calls that also
support display lists, we can simply defer the display list
functionality to them.

This fixes the rendering of the ClassiCube port by cflip.
2022-10-16 21:12:15 +02:00
Linus Groh
0ea4d228e6 LibWeb: Add missing body has_value() check in XMLHttpRequest::send() 2022-10-16 18:04:46 +02:00
demostanis
1c979889b2 Meta: Print error if cmake does not exist 2022-10-16 17:49:18 +02:00
Liav A
b9dca3300e Kernel: Use more fine-grained content data block granularity in TmpFS
Instead of just having a giant KBuffer that is not resizeable easily, we
use multiple AnonymousVMObjects in one Vector to store them.
The idea is to not have to do giant memcpy or memset each time we need
to allocate or de-allocate memory for TmpFS inodes, but instead, we can
allocate only the desired block range when trying to write to it.
Therefore, it is also possible to have data holes in the inode content
in case of skipping an entire set of one data block or more when writing
to the inode content, thus, making memory usage much more efficient.

To ensure we don't run out of virtual memory range, don't allocate a
Region in advance to each TmpFSInode, but instead try to allocate a
Region on IO operation, and then use that Region to map the VMObjects
in IO loop.
2022-10-16 17:46:40 +02:00
Julian Offenhäuser
e8bdd885a3 Base: Add a PDF document to test Adobe Type 1 font rendering
It also tests a subset of PDF version 1.5 functionality, such as
compressed object streams.
2022-10-16 17:44:54 +02:00
Julian Offenhäuser
b14f0950a5 LibPDF: Add very basic support for Adobe Type 1 font rendering
Previously we would draw all text, no matter what font type, as
Liberation Serif, which results in things like ugly character spacing.

We now have partial support for drawing Type 1 glyphs, which are part of
a PostScript font program. We completely ignore hinting for now, which
results in ugly looking characters at low resolutions, but gain support
for a large number of typefaces, including most of the default fonts
used in TeX.
2022-10-16 17:44:54 +02:00
Julian Offenhäuser
e6f29302a7 LibPDF: Add glyph drawing and type info methods to PDFFont
A PDFFont can now be asked for its specific type and whether it is part
of the standard 14 fonts. It now also contains a method to draw a
glyph, which is stubbed-out for now.

This will be useful for the renderer to take into consideration when
drawing text, since we don't include replacements for the standard set
of fonts yet, but still want to make use of embedded fonts when
available.
2022-10-16 17:44:54 +02:00