Commit graph

43486 commits

Author SHA1 Message Date
Liav A 9e7d099678 Documentation: Add guidelines document for kernel development 2022-11-25 22:34:32 +01:00
kleines Filmröllchen 66c903424c Base: Add an example presentation
This contains CatDog and uses most of the currently supported features.
2022-11-25 14:28:33 -07:00
kleines Filmröllchen de44d6c0a6 Applications: Add Presenter
This version can already:
- load all of the defined file format except for the image type and the
  frame-specific stuff
- navigate frames and slides (though frames are mostly stubbed out)
- display text with various common settings
- displays text with various fitting and scaling methods
- scale and position objects correctly no matter the window size
2022-11-25 14:28:33 -07:00
kleines Filmröllchen 295f83e54c Base: Document Presenter and its file format 2022-11-25 14:28:33 -07:00
kleines Filmröllchen af439cf3af LibGfx: Add Size::match_aspect_ratio
This will create a size that matches the given aspect ratio while
preserving one of the two dimensions.
2022-11-25 14:28:33 -07:00
kleines Filmröllchen 5b5b4f57fa LibGfx: Add Size::aspect_ratio
This can compute the aspect ratio of the size.
It can use another type for these computations,
which is important for integer sizes.
2022-11-25 14:28:33 -07:00
kleines Filmröllchen 2be89597a8 Base: Create "Office" Application category
This category includes anything useful for getting work done with your
computer. It is mostly a split-off from the Utilites category which was
becoming very large.
2022-11-25 14:28:33 -07:00
kleines Filmröllchen 4777dc75c5 LibCore: Allow array-like rectangle specifications for rect properties
This allows rectangle specifications in the form [x, y, width, height],
which mirrors margin properties and is much more convenient than the
JSON object specifications that were allowed before. Those are still
allowed, of course.
2022-11-25 14:28:33 -07:00
sin-ack 3b03077abb Kernel: Update the ".." inode for directories after a rename
Because the ".." entry in a directory is a separate inode, if a
directory is renamed to a new location, then we should update this entry
the point to the new parent directory as well.

Co-authored-by: Liav A <liavalb@gmail.com>
2022-11-25 17:33:05 +01:00
Aliaksandr Kalenik 2b246d980a LibWeb: Fix typo in calculate_inner_height 2022-11-25 17:06:59 +01:00
Aliaksandr Kalenik 7bc7790912 LibWeb: Flex, grid and table containers should not create BFC
Fixes https://github.com/SerenityOS/serenity/issues/16082
2022-11-25 10:45:37 +01:00
Lucas CHOLLET 1944e8936d cat: Return a non-null value if an error occurred 2022-11-24 21:01:54 -05:00
Lucas CHOLLET 71c9da90b6 cat: Use Core::Stream::File 2022-11-24 21:01:54 -05:00
Zaggy1024 7514e49c17 LibVideo: Make all VP9 block intermediates stack-allocated arrays
This has two benefits:
- I observed a ~34% decrease in decoding time running TestVP9Decode.
- Removing all of these silly Vector fields helps simplify the code
  relationships between all the functions in Decoder.cpp. It'll also be
  much easier to make these static with template specializations, if
  that turns out to be worthy performance improvement.
2022-11-25 02:44:18 +03:30
Andreas Kling c922d21ecb LibJS: Unbreak test262-parser-tests after source range caching changes
Turns out we have to be a little more lenient when dealing with the
slightly hostile inputs in tests262-parser-tests.

This fix papers over some problematic situations by returning a fallback
range if we can't figure out exactly where an error occurred.
I've added a FIXME about returning nicer values.
2022-11-24 18:01:52 +01:00
Andreas Kling d16fab5815 LibJS: Avoid unnecessary SourceRange construction in parse_program()
This takes `test-js` runtime from 4.3 sec to 4.1 sec on my machine.
2022-11-24 16:06:20 +00:00
Andreas Kling f0482b61bf LibJS: Make Error stack trace generation faster with a line break cache
Generating Error objects got a lot slower after the introduction of
SourceCode in b0b022507b.

This was noticeable with `test-js` which generates a lot of errors,
so walking the source code over and over to compute (line, column)
was eating a ton of time.

This patch makes repeated lookups a lot faster by building a cache
of line break offsets in the source code. The cache is built on first
offset lookup, so we only pay for this in code that actually throws.

On my machine, this takes `test-js` runtime from 6.7 sec to 4.3 sec.
2022-11-24 16:06:20 +00:00
Andreas Kling e7ba03ddd1 AK: Add Utf8View::iterator_at_byte_offset_without_validation()
Unlike iterator_at_byte_offset(), this function assumes the provided
byte offset is a valid offset into the UTF-8 character stream.

This avoids walking the stream from the start.
2022-11-24 16:06:20 +00:00
Baitinq 45e22dafb3 Meta: Look for e2fsck path on build-image-qemu.sh
Now we attempt to look for the path of e2fsck before checking if the
path can be found in any of the predefined routes. This fixes e2fsck
not being found on some "special" distros like NixOS.

Related #13754
2022-11-24 16:58:30 +01:00
Andreas Kling 5556b27e38 Kernel: Update tv_nsec field when using utimensat() with UTIME_NOW
We were only updating the tv_sec field and leaving UTIME_NOW in tv_nsec.
2022-11-24 16:56:27 +01:00
Andreas Kling 376b3c95f7 LibCore: Use utimensat() in Core::File to preserve nanosecond timestamps
This takes care of two FIXMEs! :^)
2022-11-24 16:56:27 +01:00
Andreas Kling a9d55ddf57 Kernel/TmpFS: Update mtime instead of ctime when asked to update mtime 2022-11-24 16:56:27 +01:00
Andreas Kling 10fa72d451 Kernel: Use AK::Time for InodeMetadata timestamps instead of time_t
Before this change, we were truncating the nanosecond part of file
timestamps in many different places.
2022-11-24 16:56:27 +01:00
Andreas Kling f8290e1ad4 stat: Show nanosecond part of file timestamps 2022-11-24 16:56:27 +01:00
Daniel Bertalan efaf9f137a LibIPC: Handle ECONNRESET when reading from the IPC socket
Reading from a socket with a dead peer returns the `ECONNRESET` error
code in some cases on Linux. This commit changes LibIPC to gracefully
shut down the socket if that happens, fixing an occasional crash in
Ladybird.

Fixes SerenityOS/ladybird#116
2022-11-24 14:37:13 +01:00
Jelle Raaijmakers 45108438ce Ports: Fix warning when building with useconfigure="false"
When building a port with `useconfigure="false"`, the `do_configure`
function invokes a `buildstep` with multiple positional arguments as the
command to execute.

It then tests whether the positional arguments evaluate to an emtpy
string, but could fail when multiple positional arguments were provided.
This resulted in the following warning when building the Composer port,
for example:

  ../.port_include.sh: line 16: [: echo: binary operator expected

Prevent this warning by testing against the number of positional
arguments, instead.
2022-11-24 12:06:25 +00:00
Jelle Raaijmakers fef0330ee5 Ports: Clean up PHP's package.sh 2022-11-24 10:52:10 +00:00
Jelle Raaijmakers aa32207746 Ports: Update PHP to 8.1.12 2022-11-24 10:52:10 +00:00
Jelle Raaijmakers f89d6a046f Ports: Configure LibCrypt include path for PHP
Since ac40197047 LibCrypt has its own library. PHP tries to detect the
`crypt_data` struct but fails to do so since it cannot find `crypt.h`.
By adding this explicit include path, PHP builds again.
2022-11-24 10:52:10 +00:00
Jelle Raaijmakers f0a4cc2d80 LibCrypt: Clean up crypt_r
Remove an unused constant, use a C++-style `reinterpret_cast` and employ
an early return to remove excessive indentation. No functional changes.
2022-11-24 10:52:10 +00:00
Xexxa 2f7873d427 Base: Add emoji for current and former Norwegian subdivisions
🏴󠁮󠁯󠀰󠀱󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0031 U+E007F NO-01
Østfold
🏴󠁮󠁯󠀰󠀳󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0033 U+E007F NO-03
Oslo
🏴󠁮󠁯󠀰󠀴󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0034 U+E007F NO-04
Hedmark
🏴󠁮󠁯󠀰󠀵󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0035 U+E007F NO-05
Oppland
🏴󠁮󠁯󠀰󠀶󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0036 U+E007F NO-06
Buskerud
🏴󠁮󠁯󠀰󠀹󠁿 - U+1F3F4 U+E006E U+E006F U+E0030 U+E0039 U+E007F NO-09
Aust-Agder
🏴󠁮󠁯󠀱󠀰󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0030 U+E007F NO-10
Vest-Agder
🏴󠁮󠁯󠀱󠀲󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0032 U+E007F NO-12
Hordaland
🏴󠁮󠁯󠀱󠀴󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0034 U+E007F NO-14
Fjordane
🏴󠁮󠁯󠀱󠀵󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0035 U+E007F NO-15
Møre og Romsdal
🏴󠁮󠁯󠀱󠀶󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0036 U+E007F NO-16
Sør-Trøndelag
🏴󠁮󠁯󠀱󠀷󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0037 U+E007F NO-17
Nord-Trøndelag
🏴󠁮󠁯󠀱󠀸󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0038 U+E007F NO-18
Nordland
🏴󠁮󠁯󠀱󠀹󠁿 - U+1F3F4 U+E006E U+E006F U+E0031 U+E0039 U+E007F NO-19
Troms
🏴󠁮󠁯󠀲󠀱󠁿 - U+1F3F4 U+E006E U+E006F U+E0032 U+E0031 U+E007F NO-21
Svalbard
🏴󠁮󠁯󠀲󠀲󠁿 - U+1F3F4 U+E006E U+E006F U+E0032 U+E0032 U+E007F NO-22
Jan Mayen
🏴󠁮󠁯󠀲󠀳󠁿 - U+1F3F4 U+E006E U+E006F U+E0032 U+E0033 U+E007F NO-23
Trøndelag
🏴󠁮󠁯󠀳󠀰󠁿 - U+1F3F4 U+E006E U+E006F U+E0033 U+E0030 U+E007F NO-30
Viken
🏴󠁮󠁯󠀳󠀴󠁿 - U+1F3F4 U+E006E U+E006F U+E0033 U+E0034 U+E007F NO-34
Innlandet
🏴󠁮󠁯󠀴󠀲󠁿 - U+1F3F4 U+E006E U+E006F U+E0034 U+E0032 U+E007F NO-42
Agder
🏴󠁮󠁯󠀴󠀶󠁿 - U+1F3F4 U+E006E U+E006F U+E0034 U+E0036 U+E007F NO-46
Vestland
🏴󠁮󠁯󠀵󠀰󠁿 - U+1F3F4 U+E006E U+E006F U+E0035 U+E0030 U+E007F NO-50
Trøndelag
🏴󠁮󠁯󠀵󠀴󠁿 - U+1F3F4 U+E006E U+E006F U+E0035 U+E0034 U+E007F NO-54
Troms og Finnmark
2022-11-24 10:06:42 +00:00
Timothy Flynn 7edd57dc87 LibWeb+WebDriver: Support running headless WebDriver sessions
This adds an "extension capability" for clients to indicate that a
headless browser should be used for the session.
2022-11-24 00:10:56 +00:00
Timothy Flynn e840d27d8e headless-browser: Add a mode for being controlled by WebDriver
This adds command line flags for WebDriver to pass its IPC socket path
(if running on Serenity) or its FD passing socket (if running elsewhere)
for the headless-browser to connect to.
2022-11-24 00:10:56 +00:00
Timothy Flynn 0135a2ab5b WebContent: Remove WebContent::ConnectionFromClient from WebDriver 2022-11-24 00:10:56 +00:00
Timothy Flynn 46b2cb308d LibWeb+WebContent: Virtualize methods needed for WebDriver in PageClient
WebDriver currently uses the WebContent::ConnectionFromClient IPC class
directly for these features. To support headless-browser, WebDriver will
instead need to rely on PageClient to provide these.
2022-11-24 00:10:56 +00:00
Timothy Flynn be80d43161 WebContent: Store a base PageClient in the WebDriverConnection
WebDriverConnection can now work with PageClient's virtual interface.
This will allow constructing a WebDriverConnection from the PageClient
implementation in headless-browser.
2022-11-24 00:10:56 +00:00
Timothy Flynn d1c6b85dcf WebContent: Set the WebDriver active flag directly on the Page
One less thing for headless-browser to need to implement.
2022-11-24 00:10:56 +00:00
Timothy Flynn c917a59abe LibWeb+WebContent: Virtualize PageClient methods needed for all clients 2022-11-24 00:10:56 +00:00
Timothy Flynn 1f08cb7020 LibWeb+WebContent: Move pending dialog handling from PageHost to Page
Currently, all handling of pending dialogs occurs in PageHost. In order
to re-use this functionality to run WebDriver in a headless move, move
it to Page.
2022-11-24 00:10:56 +00:00
Aliaksandr Kalenik 7c00619e47 LibWeb: Use calculate_inner_width to compute min and max widths
Use calculate_inner_width that consider box-sizing in compute_width
to resolve min_width and max_width.
2022-11-23 23:11:39 +01:00
Aliaksandr Kalenik 428db6e766 LibWeb: Return max margin box width from greatest_child_width
Return max margin box width instead of max border box width
from greatest_child_width.

This change fixes:
https://wpt.live/css/CSS2/margin-padding-clear/margin-008.xht
2022-11-23 23:11:39 +01:00
Linus Groh 16f2904443 Meta: Add mattco98's full name to mailmap
This will merge the following two git identities so they are considered
the same:

Matthew Olsson <matthewcolsson@gmail.com>
mattco98 <matthewcolsson@gmail.com>
2022-11-23 17:13:49 +00:00
Andreas Kling a7ce0509f7 LibJS: Add missing <AK/TypeCasts.h> include in $262Object.cpp 2022-11-23 16:05:59 +00:00
Andreas Kling 15c324a70b Userland+Tests: Remove a few more LibJS/{AST.h,Parser.h} includes 2022-11-23 16:05:59 +00:00
Andreas Kling 3503c658fb LibJS+LibWeb: Move JS::ModuleRequest to its own header file
This allows us to not include LibJS/AST.h in a couple more places.
2022-11-23 16:05:59 +00:00
Andreas Kling 38c7fdaac1 LibWeb: Avoid including LibJS/Parser.h in a handful of cpp files 2022-11-23 16:05:59 +00:00
Andreas Kling 6dbca785d1 LibJS: Make AsyncFunctionConstructor.h not include AST.h 2022-11-23 16:05:59 +00:00
Andreas Kling 3f1ffc2b94 LibJS: Remove unnecessary AST.h include in a handful of cpp files 2022-11-23 16:05:59 +00:00
Andreas Kling 71067cbc6c LibJS+LibWeb: Make Runtime/AbstractOperations.h not include AST.h
This led to considerable fallout and many files had to be patched with
now-missing include statements.
2022-11-23 16:05:59 +00:00
Andreas Kling b81816a539 LibJS+LibWeb: Make CyclicModule.h not include AST.h
This led to some fallout as many things in LibJS and LibWeb were pulling
in other things via CyclicModule.h
2022-11-23 16:05:59 +00:00