Commit graph

56776 commits

Author SHA1 Message Date
Kenneth Myhra
990f73708d Tests/LibWeb: Verify XHR.response is an instance of ArrayBuffer
This verifies that XHR.response is an instance of ArrayBuffer when
XHR.responseType is set to 'arraybuffer'.
2023-11-29 21:51:35 +01:00
Kenneth Myhra
68fa8f52b4 Tests/LibWeb: Verify XHR.open() throws on forbidden method
This verifies that XHR.open() throws a Security Error when 'CONNECT',
'TRACE', or 'TRACK' is passed as the method argument.
2023-11-29 21:51:35 +01:00
Kenneth Myhra
eb6a7ccc59 Tests/LibWeb: Verify XHR.open() throws on illegal token in method arg
This verifies that XHR.open() throws a Syntax Error if an illegal token
is passed to the method argument.
2023-11-29 21:51:35 +01:00
Kenneth Myhra
ff05f19c84 Tests/LibWeb: Verify XHR.send() throws when called twice
This verifies that XHR.send() throws an Invalid State Error when called
twice.
2023-11-29 21:51:35 +01:00
Kenneth Myhra
ac82585ae7 Tests/LibWeb: Verify XHR.send() throws when XHR.readyState is UNSENT
This verifies that an Invalid State Error is being thrown when
XHR.open() has not been called before calling XHR::send().
2023-11-29 21:51:35 +01:00
Aliaksandr Kalenik
7a0191cbe9 LibWeb: Clear texture allocated for stacking context painting
In OpenGL newly allocated texture has undefined initial state so we
need to clear it before stacking context painting.
2023-11-29 21:49:23 +01:00
Aliaksandr Kalenik
24da32c884 LibAccelGfx+LibWeb: Store state of all stacking contexts in GPU painter
This change ensures that the GPU painting executor follows the pattern
of the CPU executor, where the state is stored for each stacking
context, but a painter is created only for those with opacity.

Fixes crashing on apple.com because now save() and restore() are called
on correct painters.
2023-11-29 21:48:47 +01:00
Aliaksandr Kalenik
9a66f31b64 LibAccelGfx: Deallocate VAO and VBOs in fill_rect_with_linear_gradient
Fixes memory leak in fill_rect_with_linear_gradient()
2023-11-29 21:47:43 +01:00
Michiel Visser
495b0f2bcc LibTLS: Improve message when root certificate is invalid
Currently there is one root certificate which has expired, but it does
not have a common name, so we are simply printing "Certificate for  by
is invalid, ...", which is less than useful. Instead we just print the
complete subject now, and remove printing the issuer, as root
certificates are always self-signed.
2023-11-29 18:17:14 +03:30
Michiel Visser
000f0274e2 LibCrypto: Fix SECP384r1 verification when hash is SHA256
Some websites actually provide a SECP384 certificate which is signed
using a SHA256 hash. We assumed that SECP384 always used a SHA384 hash,
but this is not the case.
2023-11-29 18:17:14 +03:30
Timothy Flynn
6eadf4a778 LibWebView: Remove now-unused PropertyTableModel 2023-11-29 13:56:35 +01:00
Timothy Flynn
5fcb3dfb2c LibWebView: Remove now-unused callback to override property tables 2023-11-29 13:56:35 +01:00
Timothy Flynn
cd0f5087a7 Ladybird/AppKit: Port the Inspector to the WebView property tables 2023-11-29 13:56:35 +01:00
Timothy Flynn
b5d5e48ffc Ladybird/Qt: Port the Inspector to the WebView property tables 2023-11-29 13:56:35 +01:00
Timothy Flynn
0037fdaf11 Browser: Port the Inspector to the WebView property tables 2023-11-29 13:56:35 +01:00
Timothy Flynn
ad9dfffda7 LibWebView: Support generating property tables in the Inspector
Since all chromes currently show their own tables, this is opt-out until
they are updated to use the WebView tables.
2023-11-29 13:56:35 +01:00
Timothy Flynn
6fc189ea4a LibWebView: Generalize the generated Inspector for another tab container
The Inspector will have a split view, where the top view is that of the
exisiting DOM and accessibility trees, and the bottom view is that of
the currently inspected node's style properties. This patch generalizes
some of the generated code to support having these 2 views.
2023-11-29 13:56:35 +01:00
Timothy Flynn
2891633877 Meta: Port recent changes to the GN build
9836a9ad0e
bc9cdd4394
28723d8be1
f4a5c136c3
2023-11-29 13:56:35 +01:00
Aliaksandr Kalenik
707added91 LibAccelGfx: Premultiply linear gradient colors by alpha
With this change color blending for gradients matches CPU painter.
2023-11-29 13:53:23 +01:00
Andreas Kling
be8952b89d LibJS: Remove pointless Vector copy in FDI 2023-11-29 09:48:18 +01:00
Andreas Kling
aaa7b50f06 LibJS: Skip lexical declaration traversal in FDI if there are none 2023-11-29 09:48:18 +01:00
Andreas Kling
3b6785245f LibJS: Don't call shrink_to_fit() on same environment twice in FDI 2023-11-29 09:48:18 +01:00
Andreas Kling
3fc0333ee6 LibJS: Put Bytecode::CallFrame + register slots in a single allocation
The number of registers in a call frame never changes, so we can
allocate it at the end of the CallFrame object and save ourselves the
cost of allocating separate Vector storage for every call frame.
2023-11-29 09:48:18 +01:00
Andreas Kling
3dc5f467a8 LibJS: Always allocate ExecutionContext objects on the malloc heap
Instead of allocating these in a mixture of ways, we now always put
them on the malloc heap, and keep an intrusive linked list of them
that we can iterate for GC marking purposes.
2023-11-29 09:48:18 +01:00
Andreas Kling
845da3901d LibJS: Make ExecutionContext::function_name a GCPtr<PrimitiveString>
This required setting things up so that all function objects can plop
a PrimitiveString there instead of an AK string.

This is a step towards making ExecutionContext easier to allocate.
2023-11-29 09:48:18 +01:00
Andreas Kling
eda2a6d9f7 LibJS: Don't die when making PrimitiveString from "" DeprecatedFlyString 2023-11-29 09:48:18 +01:00
Andreas Kling
ecfcc9aef3 LibJS: Make Bytecode::Executable GC-allocated
This is a step towards making ExecutionContext easier to allocate.
2023-11-29 09:48:18 +01:00
Andreas Kling
ece961f882 LibJS: Pass call/construct argument lists as ReadonlySpan<Value>
(Instead of MarkedVector<Value>.) This is a step towards not storing
argument lists in MarkedVector<Value> at all. Note that they still end
up in MarkedVectors since that's what ExecutionContext has.
2023-11-29 09:48:18 +01:00
Aliaksandr Kalenik
9fa6628efa LibWeb: Apply stacking context transform in GPU painter 2023-11-29 09:48:10 +01:00
Lucas CHOLLET
aaf54f8cf8 AK: Allow Optional<T&> to be constructed by OptionalNone()
This is an extension of cc0b970d but for the reference-handling
specialization of Optional.

This basically allow us to write code like:
```cpp
Optional<u8&> opt;
opt = OptionalNone{};
```
2023-11-29 02:19:41 +03:30
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