Commit Graph

55040 Commits

Author SHA1 Message Date
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
Ali Mohammad Pur
0214e9b905 Shell: Rewrite 'FOR NAME do ... done' according to Dr.POSIX
Dr.POSIX says this form of the loop is supposed to iterate over exactly
`"$@"`, this commit makes us support that.
2023-10-02 21:21:38 +02:00
Ali Mohammad Pur
764ea6104e Shell: Treat '(' and '{' as operators in POSIX mode 2023-10-02 21:21:38 +02:00
Ali Mohammad Pur
9e978c6cd1 Shell: Recognise the (seemingly) bash-specific <<\WORD heredoc key
Bash eats the backslash in this format (similarly for W\ORD etc.).
Dr.POSIX doesn't specify this anywhere, but it's used all over the
place, so let's support it.
2023-10-02 21:21:38 +02:00
Ali Mohammad Pur
21ea9cedff Shell: Add the POSIX-only 'eval' builtin
This just concatenates its arguments together, and executes it as a
command.
2023-10-02 21:21:38 +02:00
Ali Mohammad Pur
e2af20a69b Shell: Correct the continue builtin's count guard
This builtin only supports count = 1 (as the error message says), but we
were looking for count = 0.
2023-10-02 21:21:38 +02:00
Dan Klishch
75fd28014c JSSpecCompiler: Add converter from LibCpp's AST
This will effectively allow us to use C++ code as an input for the
compiler. This would be useful for testing, since otherwise we would
have had to specify tests as a spec-like XML, which is not exactly the
most developer-friendly experience.
2023-10-02 21:15:08 +02:00
Dan Klishch
567b1f6e7c JSSpecCompiler: Adopt more C++ terminology
Let's not use strange names like `ExecutionContext`, which nobody will
understand in the future.
2023-10-02 21:15:08 +02:00
Dan Klishch
4578004ad6 JSSpecCompiler: Do not frame nodes with < and > when dumping AST
Let's not pretend we are outputting some invalid HTML.
2023-10-02 21:15:08 +02:00
Dan Klishch
f9d485191d LibCpp: Add some missing accessors to AST nodes 2023-10-02 21:15:08 +02:00
Dan Klishch
14a86c8fd6 JSSpecCompiler: Elide nested TreeList nodes 2023-10-02 21:15:08 +02:00
Tim Ledbetter
f30815b534 Base: Add man page for realpath 2023-10-02 20:56:38 +02:00
Tim Ledbetter
e904f69c26 realpath: Add the -q option to suppress error messages 2023-10-02 20:56:38 +02:00
Tim Ledbetter
cbda6e1ff4 realpath: Allow multiple path arguments to be given 2023-10-02 20:56:38 +02:00
Tim Schumacher
00ed042eda Ports/ffmpeg: Update to version 6.0
This additionally includes a patch from the current master branch,
which fixes building with binutils 2.41 and newer.
2023-10-02 20:21:27 +02:00
Tim Ledbetter
dd81bea9ef LibGfx: Don't read past EOF in JPEGLoader
Previously, it was possible to pass JPEGLoader a crafted input which
would read past the end of the stream. We now return an error in such
cases.
2023-10-02 20:09:25 +02:00
Kemal Zebari
001abbcd66 AK: Rename URLParser:parse_host() param is_not_special to is_opaque
Since the spec renamed it to make it easier to read.
2023-10-01 14:35:40 +02:00
Tim Ledbetter
c087ba24b9 Assistant: Avoid an unnecessary copy of the results list 2023-10-01 14:34:28 +02:00
Tim Ledbetter
55f4d468ad Assistant: Remember currently selected result when updating results
This fixes an issue where the selected result index would be reset to
0 when the file cache finished building and the results list updated.
2023-10-01 14:34:28 +02:00
Tim Ledbetter
3ee12ffa8f stat: Show the device ID for the given file 2023-10-01 13:34:41 +02:00
Tim Ledbetter
ad984ba522 Kernel: Populate stat.st_dev with fsid
This allows userland programs to differentiate inodes on different
filesystems.
2023-10-01 13:34:41 +02:00
kleines Filmröllchen
4cefb02324 AK: Use secure SipHash-4-8 for IP addresses
Routing tables formed with IP address hashes should be DoS-resistant.
2023-10-01 11:06:36 +03:30
kleines Filmröllchen
9a026fc8d5 AK: Implement SipHash as the default hash algorithm for most use cases
SipHash is highly HashDoS-resistent, initialized with a random seed at
startup (i.e. non-deterministic) and usable for security-critical use
cases with large enough parameters. We just use it because it's
reasonably secure with parameters 1-3 while having excellent properties
and not being significantly slower than before.
2023-10-01 11:06:36 +03:30