Commit Graph

56746 Commits

Author SHA1 Message Date
Shannon Booth
d777b279e3 LibUnicode+Tests: Remove now unused to_unicode_*_full methods
Relocating all of the tests for these in LibUnicode over to the AK
String testsuite.
2023-11-28 17:15:27 -05:00
Shannon Booth
d1ed04a6cb FontEditor: Use String.to_uppercase
Remove the last user of Unicode::to_unicode_uppercase_full
2023-11-28 17:15:27 -05:00
Shannon Booth
96af80acd1 LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
Shannon Booth
9cd36839d2 LibWeb: Port DOMStringMap from DeprecatedString to String
Porting name to FlyString as it is often compared in lookup, and in many
cases, we already have a FlyString to supply anyway.
2023-11-28 17:15:27 -05:00
Shannon Booth
49a48fcfac LibWeb: Port CrossOriginOpenerPolicy from DeprecatedString
Noone is using the members yet, so this is straight forward!
2023-11-28 17:15:27 -05:00
Shannon Booth
1b05598cd3 LibWeb: Port ParsedCookie from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
f43313d099 LibWeb: Port LegacyPlatformObject from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
56d10bf198 LibWeb: Port Layout::TextNode from DeprecatedString 2023-11-28 17:15:27 -05:00
Shannon Booth
6b32a1f18f AK+LibUnicode: Expose TrailingCodePointTransformation in to_titlecase
Relocating the definition of this enum from LibUnicode to AK.
2023-11-28 17:15:27 -05:00
Shannon Booth
af7df1dbbf LibWeb: Port CSSStyleDeclaration from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
629f661e3b LibWeb: Port supported property names from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
66ac0d88a3 LibWeb: Port AvailableSpace from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
6e48d9f2e6 LibWeb: Port Dump from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Shannon Booth
d400291ad9 LibWeb: Port CSSRule::serialized from DeprecatedString to String 2023-11-28 17:15:27 -05:00
Andrew Kaster
890cce6fbb headless-browser: Centralize test timeouts and up default to 30 seconds
We're seeing timeouts for WebWorker based tests in some CI runs. It's
possible that these are legitimate timeouts, so bump the default timeout
to 30sec. When porting the test runner to run on CI, Andreas had to bump
the test timeout from 5 seconds to 10, to 15. It's likely that loading
our ASAN/UBSAN binaries on slow CI machines takes a significant amount
of time. Tests that use the new WebWorker process are spawning yet
another process that needs to load LibWeb and all its dependencies.
2023-11-28 16:38:51 +01:00
Timothy Flynn
6aa334767f AK: Ensure assigned-to Strings are dereferenced if needed
If we assign to an existing non-short string, we must dereference its
StringData object to prevent leaking that data.
2023-11-28 16:38:18 +01:00
Timothy Flynn
82398e5724 Meta: Silence warnings from optional CMake packages
These can be quite verbose on the command line if the packages aren't
found. As they do not break the build, let's not spam warnings.

The OpenGL package is also now skipped on macOS, where there's no point
in looking for the package anyways.
2023-11-28 06:54:16 -05:00
Lucas CHOLLET
9090290d11 LibGfx/TIFF: Rename BitPerSample => BitsPerSample
This is the proper name used in the spec.
2023-11-28 10:53:06 +01:00
Nico Weber
b2302ed23f LibGfx: Unbreak building with Python 3.9
Unbreaks building with macOS 13 system python, and is less code too.
No behavior change.
2023-11-27 21:58:16 -05:00
Aliaksandr Kalenik
1b3223dd9e LibWeb: Rename painter() to recording_painter() in PaintContext
Using recording_painter() as a name is less misleading, indicating
the painter in stacking context traversal doesn't perform actual
painting commands.
2023-11-27 21:53:38 +01:00
Liav A
c3d28d7f5a Kernel: Switch init boot argument to "/init"
This doesn't affect system functionality, but somewhat reduces the
reliance on complicated hardcoded paths. It also allows the user to
simply link /init (which is normally a symbolic link) to another program
to run it instead of SystemServer as the default option.
2023-11-27 09:29:05 -07:00
Liav A
4a50c01c50 Kernel: Print to the log what is the first user process & its arguments 2023-11-27 09:29:05 -07:00
Liav A
9254ed4f08 Meta: Create symbolic link from /init to /bin/SystemServer
This is a preparation before we could switch the kernel init boot
argument to "/init" in a future commit.
2023-11-27 09:29:05 -07:00
Liav A
5dba1dedb7 Kernel: Don't warn when running dynamically-linked ELF without PT_INTERP
We could technically copy the dynamic loader to other path and run it
from there, so let's not assume paths.
If the user is so determined to do such thing, then a warning is quite
meaningless.
2023-11-27 09:27:34 -07:00
Liav A
a8601b4ac7 DynamicLoader: Make heuristic for running directly actually correct
When we run directly the dynamic loader, we shouldn't rely on the passed
program path to be run, but rather on whether the main program fd number
is not -1, because the kernel will set it to a non-negative number if it
exists.

To test that the heuristic is working correctly, the /usr/lib/Loader.so
file can be copied to /tmp/Loader.so and then be invoked from that path.
2023-11-27 09:27:34 -07:00
Liav A
69b97fe318 LibELF: Disallow the DynamicLinker from linking a static-pie ELF object
The dynamic loader can't reasonably run static-pie ELF. static-pie ELFs
might run executable code that invokes syscalls outside of the defined
syscall memory executable (code) region security measure we implement.

Known examples of static-pie ELF objects are ELF packers, and the actual
system-provided dynamic loader itself.
2023-11-27 09:27:34 -07:00
Aliaksandr Kalenik
0ff977bd04 LibWeb: Add fixed position stacking context support in GPU painter 2023-11-27 17:26:39 +01:00
Liav A
93e172895a Kernel: Add /sys/kernel/request_panic node to simulate a kernel panic
When writing to /sys/kernel/request_panic it will do a kernel panic.
Trying to truncate the node will result in kernel panic with a slightly
different message.
2023-11-27 09:24:52 -07:00
Lucas CHOLLET
9836a9ad0e LibGfx/TIFF: Introduce a code generator
This will allow us to generate code that handle and provide easy access
to metadata stored in TIFF's tags. The generator is a Python script, and
it output both TIFFMetadata.h and TIFFTagHandler.cpp files.

The generator will definitely need some update to support all TIFF and
EXIF tags, but that will still be easier than writing everything
ourselves.

Some small modifications are needed in TIFFLoader.cpp to make it
compatible with the new `Metadata` class.
2023-11-27 09:07:16 -07:00
Stephan Vedder
8c65cc185a Meta: Add a minimal SDL2 based videoplayer for Lagom 2023-11-27 09:04:47 -07:00
dependabot[bot]
7510fa1598 CI: Bump mymindstorm/setup-emsdk from 12 to 13
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 12 to 13.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](https://github.com/mymindstorm/setup-emsdk/compare/v12...v13)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 09:02:30 -07:00
Michiel Visser
4ab75bd138 LibTLS: Add comment to cipher suite list about Mozilla recommended order 2023-11-27 15:02:04 +01:00
Michiel Visser
dde1e8ccf5 LibTLS: Modernize the TLS cipher suite list 2023-11-27 15:02:04 +01:00
Michiel Visser
bc9cdd4394 LibCrypto+LibTLS: Switch to the generic SECPxxxr1 implementation 2023-11-27 09:43:07 +03:30
Michiel Visser
59c22c0349 Tests/LibCrypto: Add tests for SECP384r1 curve 2023-11-27 09:43:07 +03:30
Michiel Visser
8a487f2c26 LibCrypto: Add generic SECPxxxr1 elliptic curve implementation
This implementation can be used to provide the SECP256r1 and SECP384r1
elliptic curves, while only requiring a single implementation.
2023-11-27 09:43:07 +03:30
Michiel Visser
51fe8f820f AK: Fix compile error when using div_mod_internal<513, 256, true> 2023-11-27 09:43:07 +03:30
Michiel Visser
e785172290 LibTLS: Implement the extended_master_secret TLS extension 2023-11-27 09:37:25 +03:30
Michiel Visser
5ab64320b2 LibTLS: Compute the master secret in a single place
Before we were computing the master secret in the different
`build_*_pre_master_secret` methods, but this can be simplified to a
single call.
2023-11-27 09:37:25 +03:30
Michiel Visser
0db6e0449e LibCrypto: Add method to copy Crypto::Hash::Manager 2023-11-27 09:37:25 +03:30
Nico Weber
f34da6396f LibPDF: Update font size after getting font from cache
Page 1 of 0000277.pdf does:

    BT 22 0 0 22  59  28 Tm /TT2 1 Tf
        (Presented at Photonics West OPTO, February 17, 2016) Tj ET
    BT 32 0 0 32 269 426 Tm /TT1 1 Tf
        (Robert W. Boyd) Tj ET
    BT 22 0 0 22 253 357 Tm /TT2 1 Tf
        (Department of Physics and) Tj ET
    BT 22 0 0 22 105 326 Tm /TT2 1 Tf
        (Max-Planck Centre for Extreme and Quantum Photonics) Tj ET

Every line begins a text operation, then updates the font matrix,
selects a font (TT2, TT1, TT2, TT1), draws some text and ends the text
operation.

`Tm` (which sets the font matrix) contains a scale, and uses that
to update the font size of the currently-active font (cf #20084).
But in this file, we `Tm` first and `Tf` (font selection) second,
so this updates the size of the old font. So when we pull it out
of the cache again on line 3, it would still have the old size
from the `Tm` on line 2.

(The whole text scaling logic in LibPDF imho needs a rethink; the
current approach also causes issues with zero-width glyphs which
currently lead to divisions by zero. But that's for another PR.)

Fixes another regression from c8510b58a3 (which I've accidentally
referred to by 2340e834cd in another commit).
2023-11-26 19:05:13 -05:00
Aliaksandr Kalenik
17fb82d49b LibAccelGfx+LibWeb: Discard painting of commands outside of viewport 2023-11-26 21:26:26 +01:00
Aliaksandr Kalenik
c68a9b2cfe LibAccelGfx: Skip glyph atlas rebuild if all needed glyphs are present
Before this change, every repaint required a glyph atlas update, which
took 10-20% of the total painting time according to my testing on
different websites. This change improves that significantly by skipping
atlas updated when all glyphs are already present in the texture.
2023-11-26 21:26:26 +01:00
Aliaksandr Kalenik
28723d8be1 LibAccelGfx+LibWeb: Move glyph atlas into a singleton class
This is going to allow us reuse glyph texture across painters and page
repaints.
2023-11-26 21:26:26 +01:00
Aliaksandr Kalenik
4b23046a22 LibWeb: Add missing nullptr check in HTMLImageElement::bitmap()
Fixes crashing on https://discord.com/login
2023-11-26 21:26:09 +01:00
Andreas Kling
b2a1f39400 LibJS/JIT: Add fast path for JumpConditional where accumulator is Int32 2023-11-26 19:32:51 +01:00
Andreas Kling
cb46a7fd65 LibJS: Add specialized fast paths for 8/16/32-bit integer TypedArrays
By checking a few conditions up front, we can do a very specialized
direct access into the underlying byte storage for 8/16/32-bit typed
arrays. This relies on the fact that typed arrays are guaranteed to
be type-appropriately aligned within the underlying array buffer.
2023-11-26 19:32:51 +01:00
Andreas Kling
4cce181ece LibJS: Devirtualize Object::is_typed_array() 2023-11-26 19:32:51 +01:00
Andreas Kling
d154a758fa LibJS: Devirtualize TypedArrayBase::kind()
Let's put this in a member variable to avoid the virtual call.
2023-11-26 19:32:51 +01:00
Timothy Flynn
3fcb07597b LibWeb: Remove now-unneeded TypedArray OOM propagation
No longer throws after abcf71a8ca.
2023-11-26 08:23:37 -05:00