1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 03:50:45 +00:00
Commit Graph

55262 Commits

Author SHA1 Message Date
Tim Ledbetter
2c0f6d8c7b find: Ensure the terminating ; is present when using -exec
The program now terminates with an error if the command passed to
`-exec` is not terminated with a semicolon.

This commit also ensures that the argument containing the terminating
semicolon must be 1 byte long. Previously, any argument whose first
byte was a semicolon was treated as a valid terminator.
2023-10-04 09:14:15 +01:00
Tim Ledbetter
8f8354d9a0 find: Add the -ok option
This behaves identically to the `-exec` option but prompts the user
for confirmation before executing the specified command.

A command is executed if a line beginning with 'y' or 'Y' is entered
by the user. This matches the behavior of `find` on Linux and FreeBSD
when using the POSIX locale.
2023-10-04 09:14:15 +01:00
Vladimir Serbinenko
2e9a28272e Kernel/Audio: Fail AC97 probe if no good BAR1 is found
Otherwise we get a kernel panic later on Intel SOF.
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
3e1146d4b8 Kernel: Detect PS2 keyboards on some chromebooks properly
Some chromebooks don't support PS2 controller reset and ignore it.
Other OSes in case of failed reset check by keyboard ID. Do the same
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
160609d80a Kernel/Memory: Map framebuffer and address space <4GiB
Address space under 4GiB is used for I/O but is absent
from memory maps on some systems.
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
342c707be3 Kernel: Don't use framebuffer if flag is not set
According to multiboot spec if flag for framebuffer isn't
set then corresponding fields are invalid. In reality they're set
to 0 but let's be defensive.
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
10d4bbd133 Prekernel: Fix wrong and misleading comment
Comment speaks about MULTIBOOT_MEMORY_INFO but those fields are actually
about aout kludge.
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
19cede9b3b Prekernel: Load multiboot values before loading kernel
This makes sure we don't clobber multiboot structure before we need it
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
d13609a607 Prekernel: Support kernel preloaded at high address
Loaders try to put modules as low as reasonable but on
EFI often "reasonable" is much higher than on BIOS. As
a result target can be easily higher than source.

Then we have 2 problems:
* memmove compares virtual address and since target
  is mapped higher it ends up going backwards which
  is wrong if target is physically below source
* order of copying of sections must be inverted if
  target is below source
2023-10-03 16:19:03 -06:00
Vladimir Serbinenko
982ce17927 Prekernel: Map entire 4GiB space
Prekernel code currently assumes that mapping until MAX_KERNEL_SIZE
is enough to make the modules accessible. GRUB tries to load as low
as possible but higher than 1 MiB. Hence this is usually true.
However on EFI some ranges may already be used by boot services and
GRUB tries to avoid them if possible. This pushes modules higher.
The simplest solution is to map entire 4 GiB space.
As an additional benefit it makes the framebuffer accessible that
can be used for the debugging.
2023-10-03 16:19:03 -06:00
Junior Rantila
31ff752a10 Ladybird/AppKit: Update chrome color on theme color change 2023-10-03 16:17:43 -06:00
Junior Rantila
a5b01689f1 LibWeb+LibWebView+WebContent: Add support for meta theme-color 2023-10-03 16:17:43 -06:00
Bastiaan van der Plaat
3c27843cfe LibWeb: Add DOMMatrix fromFloat32Array and fromFloat64Array 2023-10-03 16:15:14 -06:00
Bastiaan van der Plaat
2e122b16e4 LibWeb: Add DOMMatrix toFloat32Array and toFloat64Array 2023-10-03 16:15:14 -06:00
Nicolas Ramz
7b4b5b735b LibGfx/ILBMLoader: Add support for EHB mode 2023-10-03 16:09:55 -06:00
kleines Filmröllchen
398d271a46 Kernel: Share Processor class (and others) across architectures
About half of the Processor code is common across architectures, so
let's share it with a templated base class. Also, other code that can be
shared in some ways, like FPUState and TrapFrame functions, is adjusted
here. Functions which cannot be shared trivially (without internal
refactoring) are left alone for now.
2023-10-03 16:08:29 -06:00
Tim Ledbetter
0b824ab7a6 LibGfx: Check bounds of color table access in TinyVGLoader 2023-10-03 22:59:38 +01:00
Jelle Raaijmakers
3c02e3ba09 Maps: Pad grid size to prevent missing tiles
Previously, we would divide the widget width and height by the tile size
and round up, which did not result in enough tiles to cover the entire
widget. Although this calculation is correct if you starting drawing
tiles in the top left corner, we have an additional offset to account
for.

Now, we take the number of tiles that fit in the widget completely and
pad it with 2 tiles to account for the partial left/right and top/bottom
sides. An additional tile is added to account for the iterator
translating by width / 2, which rounds down again.

The resulting tile rects are always intersected with the widget
dimensions, so even if we're generating more tile coordinates than
strictly necessary, we're not performing the actual download or draw
operations.
2023-10-03 20:25:09 +02:00
Jelle Raaijmakers
eb4dd7f896 Maps: Fix spiraling tile iterator end
The `operator++` of the spiraling tile iterator was repeating the first
coordinates (`0, 0`) instead of moving to the next tile on the first
iteration. Swapping the move and check ensures we get to the end of the
iterator, fixing gray tiles that would sometimes pop up in the lower
right.

Since we never return from `operator++` without setting a valid
position, we can drop `current_x` and `current_y` and just use the
`Gfx::Point<T>` directly.
2023-10-03 20:25:09 +02:00
Jelle Raaijmakers
092bb76cd6 Maps: Use bilinear blending for downscaled tiles
Since we divide the width and height of the downscaled tiles by 2,
bilinear blending is identical to box sampling and should be preferred
since it's the simpler one of the two algorithms.
2023-10-03 20:25:09 +02:00
Aliaksandr Kalenik
9df00d0677 LibWeb: Exit event handlers if active document is not fully active
Fixes https://github.com/SerenityOS/serenity/issues/21304
2023-10-03 19:31:17 +02:00
Shannon Booth
ff72436448 LibWeb: Add a FlyString version of Element::tag_name
Renaming the DeprecatedString version of this function to
deprecated_tag_name. A FlyString is used here as we often need to
perform equality checks here, and the HTMLParser already has tag_name as
a FlyString.

Remove a FIXME while we're at it - we were already following the spec
there, and we still are :^)
2023-10-03 14:47:53 +01:00
Shannon Booth
9303e9e76f LibWeb: Port Element::local_name and TagNames from Deprecated String
Which pretty much needs to be done together due to the amount of places
where they are compared together.

This also involves porting over StackOfOpenElements over to FlyString
from DeprecatedFly string to prevent a gazillion calls to
`.to_deprecated_fly_string` calls in HTMLParser.
2023-10-03 14:47:53 +01:00
Cr4xy
bbfe0d3a82 LibWeb: Implement text-transform: capitalize 2023-10-03 09:47:17 -04:00
Tim Ledbetter
9f7cfb1394 LibArchive: Ensure tar extended header length is within expected range 2023-10-03 15:39:20 +02:00
Linus Groh
006bf1905b Ports: Update Python to 3.12.0
Released on 2023-10-02.
https://www.python.org/downloads/release/python-3120/

Note that the top-level setup.py script has disappeared completely,
hence the two dropped patches. AFAICT this doesn't regress building any
of the native modules, presumably because the configure script fully
takes care of this now:

```
The necessary bits to build these optional modules were not found:
_dbm                  _gdbm                 _posixshmem
_tkinter              nis                   ossaudiodev
To find the necessary bits, look in configure.ac and config.log.

Checked 111 modules (31 built-in, 73 shared, 1 n/a on serenityos-x86_64,
0 disabled, 6 missing, 0 failed on import)
```
2023-10-03 15:21:40 +02:00
Tim Schumacher
e7f33cef1e Ports/libuuid: Enable building shared libraries
This needs the (now relatively common) `libtool` patch, but allows us to
sidestep a bunch of issues that relate to linking static libraries into
position-independent executables.
2023-10-03 15:21:40 +02:00
kleines Filmröllchen
181cd8fb0c Ports: Add abseil and protobuf
Abseil's Serenity support is a little limited:
- No support for any timezone shenanigans since protobuf hopefully
  doesn't use those. For now, abseil will always believe to be in UTC on
  Serenity.
- In most places where explicit platforms need to be added to a list of
  supported platforms, Serenity will be missing. Again I only added the
  ones that are required for protobuf.
2023-10-03 15:21:26 +02:00
kleines Filmröllchen
68b4a75ad2 Ports: Add rubberband 2023-10-03 15:21:26 +02:00
kleines Filmröllchen
98fd21bf15 Ports: Add libsndfile 2023-10-03 15:21:26 +02:00
kleines Filmröllchen
7d0d44216e Ports: Add libfftw3
This is just the double-precision version of the already ported library.
2023-10-03 15:21:26 +02:00
kleines Filmröllchen
228022925a Ports: Add qt6-qtsvg 2023-10-03 15:21:26 +02:00
kleines Filmröllchen
82206ba2ac Ports/qt6base: Enable SQL 2023-10-03 15:21:26 +02:00
kleines Filmröllchen
e6bcd8aa64 Ports: Add LAME 2023-10-03 15:21:26 +02:00
kleines Filmröllchen
33a545a753 Ports: Add chromaprint 2023-10-03 15:21:26 +02:00
Aliaksandr Kalenik
5d885e9047 LibWeb/Fetch: Align is_network_error() with the latest specification 2023-10-03 09:41:56 +02:00
Aliaksandr Kalenik
084cb4350e LibWeb/Fetch: Include body and headers in Response for failed requests
Fixes https://github.com/SerenityOS/serenity/issues/21290
2023-10-03 09:41:56 +02:00
Aliaksandr Kalenik
b9e0ad4358 LibWeb: Make ResourceLoader pass body and headers in error callback
Pass body and headers of a failed request to callback so caller can
process them.
2023-10-03 09:41:56 +02:00
Shannon Booth
50350fb79c LibWeb: Add a non-DeprecatedString version of Element::get_attribute
Renaming the DeprecatedString version of this function to
Element::get_deprecated_attribute.

While performing this rename, port over functions where it is trivial to
do so to the Optional<String> version of this function.
2023-10-03 09:41:20 +02:00
Shannon Booth
ebe01b51c8 LibWeb: Add a non-DeprecatedString version of Element::prefix()
Renaming the old DeprecatedString version of this function to
deprecated_prefix().
2023-10-03 09:41:20 +02:00
Shannon Booth
e5e4920e66 LibWeb: Make Element::has_attribute_ns take a StringView
Similar to Element::has_attribute, ideally this would take a
`FlyString const&`, but NamedNodeMap::get_attribute_ns already takes a
StringView. To aid in porting away from DeprecatedString, just take a
StringView for now.
2023-10-03 09:41:20 +02:00
Tim Ledbetter
eaa6304aab Userland: Return empty if ImageDecoder client receives an invalid frame
This simplifies error checking for all the users of the ImageDecoder
client.
2023-10-03 08:33:53 +02:00
Tim Ledbetter
e6c1429311 LibGfx: Check bounds of color table accesses in BMPLoader
Previously, it was possible to crash the decoder by crafting a file
with invalid color table index values.
2023-10-03 08:33:53 +02:00
Andreas Kling
c14db6ab12 LibJS: Make Executable ref-counted and let instruction iterator co-own it
This ensures that the instruction stream pointed at by the instruction
iterator remains valid as long as the iterator exists.
2023-10-03 08:23:33 +02:00
Aliaksandr Kalenik
b1ee5c8738 LibWeb: Implement CSS fonts lazy loading
By loading only the fonts actually used on a page, we can often avoid
making a lot of unnecessary requests and style invalidations.

This change makes initial loading of apple.com much faster.

Fixes https://github.com/SerenityOS/serenity/issues/20747
2023-10-03 07:11:40 +02:00
Nico Weber
005bdd210a pdf: Add a --dump-outline flag 2023-10-03 07:11:25 +02:00
Tim Ledbetter
361e29cfc9 LibGUI: Don't enter TableView edit mode when a control key is pressed
A key press, which is an ASCII control character will no longer cause
TableView to begin editing.

This fixes an issue in Spreadsheet where navigating to a cell then
pressing escape would cause a that cell's text to be set to a
non-printable value. Pressing escape after navigating to a cell
now has no effect.
2023-10-02 21:38:09 +02:00
toadkarter
4e2e2027c3 MasterWord: Use GML compiler 2023-10-02 21:31:06 +02:00
Kemal Zebari
18124a5611 SpaceAnalyzer: Port to GML compiler 2023-10-02 21:28:40 +02:00
Ali Mohammad Pur
986130d9ea Shell: Accept IoNumber as a valid redirection target 2023-10-02 21:21:38 +02:00