Commit graph

64813 commits

Author SHA1 Message Date
Andrew Kaster
881a270e58 LibWeb: Verify buffer type in WebIDL get buffer source copy AO 2024-11-01 10:42:24 -07:00
Andrew Kaster
ba6dcd7521 LibWeb: Refactor WebAssembly API to use spec-defined promise AOs 2024-11-01 10:42:24 -07:00
Jelle Raaijmakers
3504370281 LibWeb: Add stubbed Media Source Extensions API
Just the boilerplate :^)
2024-11-01 13:23:45 -04:00
Jelle Raaijmakers
3e3851983d LibGfx: Remove unused include from Line 2024-11-01 13:23:45 -04:00
stelar7
559fd1c0c2 LibWeb: Add FIXME for missing SubtleCrypto algorithms 2024-11-01 13:13:30 -04:00
Shannon Booth
1dc1bebd2a LibWeb: Push a temporary execution context for setTimeout
This fixes a crash seen running stream tests.
2024-11-01 13:12:01 -04:00
Aliaksandr Kalenik
4a1e109678 LibWeb: Fix ability to modify selection outside of inputs using keyboard
Fixes regression introduced in a8077f79cc
2024-11-01 13:11:10 -04:00
Aliaksandr Kalenik
7dc11050f2 LibWeb: Add internals API to dispatch doubleclick mouse event 2024-11-01 13:11:10 -04:00
Hermes Junior
1be6c12501 Documentation: Explain how to fix CMake errors in CLion
When importing the project in some CLion versions,
the build profile can be created missing configurations,
breaking code insight.
2024-11-01 16:22:40 +00:00
Sam Atkins
d0d5600f47 LibWeb/CSS: Move rule-conversion code into its own file
This is an attempt to bring the size of Parser.cpp down. No code
changes, just moves and some explicit template instantiations now that
we're using them from a different file.
2024-11-01 16:16:40 +00:00
Shannon Booth
f20822e293 LibWeb: Handle language attributes without a '-'
Where we would previously index out of bounds.
2024-11-01 16:09:12 +01:00
Aliaksandr Kalenik
e915143593 LibWeb: Fix selectionchange event dispatch on text control elements
With a8077f79cc Selection object is no
longer aware of selection state inside text controls (<textarea> and
<input>), so this change makes them responsible for dispatching
`selectionchange` if their selection state was changed.
2024-11-01 15:06:09 +01:00
Timothy Flynn
3a6b698572 Documentation: Add note about making the macOS terminal a developer tool 2024-11-01 15:04:53 +01:00
Grubre
8703ca0c7d LibWeb: Use String::to_fullwidth() when applying text-transform
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Before, we just returned the input string. Now the property is applied
using the `String::to_fullwidth()` function.

fixes:
https://wpt.fyi/results/css/css-text/text-transform/text-transform-fullwidth-001.xht
2024-11-01 07:48:17 -04:00
Grubre
a8a81342bb LibUnicode: Implement to_fullwidth() in String
The implementation uses the transliterator class from icu.
2024-11-01 07:48:17 -04:00
Grubre
5a6a7b7e5e LibWeb: Pass locale to to_lowercase() from apply_text_transform
Previously we passed `{}` which resulted in incorrect text when using
some languages like `lt`.

Fixes:
http://wpt.fyi/results/css/css-text/text-transform/text-transform-upperlower-039.html
2024-11-01 07:48:17 -04:00
Grubre
1b25fb5d40 LibWeb: Pass locale to to_uppercase() from apply_text_transform
Previously we passed the default argument which is `{}`. This resulted
in incorrect uppercasing for some languages like `tr`.

Fixes:
http://wpt.live/css/css-text/text-transform/text-transform-tailoring-002.html
2024-11-01 07:48:17 -04:00
Jelle Raaijmakers
47597d0fb8 LibIDL: Allow trailing comma in enumerations
IDL enumerations are one of the rare list types in the IDL spec that
allow for a trailing comma:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17508
2024-11-01 12:27:41 +01:00
sideshowbarker
286511c4cf Meta: Make import-wpt-test.py use html.parser, not BeautifulSoup
This change switches the Meta/import-wpt-test.py script to using the
standard html.parser module rather than BeautifulSoup.

Otherwise, without this change, when a contributor first tries to run
the script, if they don’t have BeautifulSoup installed, it will fail.

Note that this patch also includes an unrelated small change that
switches to using os.path.normpath — rather than Path.absolute() — to
“normalize” the destination names of the downloaded test files.
2024-11-01 12:27:24 +01:00
Andreas Kling
56e1c0e7ee LibWeb: Check for active document in descendant_navigables()
This is not in the spec, but I did see a null pointer dereference here
while browsing the web, and it seems completely harmless for this
function to skip over navigables without an active document.
2024-11-01 12:25:52 +01:00
Shannon Booth
aa585c4182 LibWeb: Avoid potential infinite recursion in Document::update_layout 2024-11-01 12:25:17 +01:00
Shannon Booth
15c15116dd LibWeb: Ensure fully active document before appending to an iframe 2024-11-01 12:25:17 +01:00
Shannon Booth
bfc28bd621 LibWeb: Avoid possible infinite recursion in Document::is_fully_active 2024-11-01 12:25:17 +01:00
Jelle Raaijmakers
c7773d0312 Meta: Update my email address everywhere 2024-11-01 12:14:53 +01:00
Timothy Flynn
ddf3add6a7 LibJS: Remove Array::create_from overload that accepts a plain vector
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
There's no need to have overloads for both a span and a vector.
2024-11-01 00:35:54 +01:00
Timothy Flynn
663a5e97ca LibJS: Add an Array::create_from overload to accept a plain array
This is just a wrapper to easily construct an Array from a span. This
avoids creating a Vector of values that are possiby Objects. One such
case is in ArrayIteratorPrototype::next.
2024-11-01 00:35:54 +01:00
Timothy Flynn
108b4e7c15 LibJS: Do not store iterated values in a plain vector 2024-11-01 00:35:54 +01:00
Timothy Flynn
9949173fce LibJS: Do not store console table columns and rows in a plain vector
These values may contain Object types.
2024-11-01 00:35:54 +01:00
Timothy Flynn
cd2a34deb7 LibWeb: Do not store message port objects in a plain vector 2024-11-01 00:35:54 +01:00
Timothy Flynn
c479ca97b6 LibWeb: Do not store supported performance entry types in a plain vector
These are not protected from GC.
2024-11-01 00:35:54 +01:00
Timothy Flynn
d5c3a0e53a LibWeb: Do not store resize observer sizes in a plain vector 2024-11-01 00:35:54 +01:00
Timothy Flynn
04648d93d4 LibWeb: Do not store resize observer entries in a plain vector
This is not safe from GC. Unfortunately we cannot add a test to capture
the issue, as the allocation which may trigger GC is internal and not
observable from JS.
2024-11-01 00:35:54 +01:00
Timothy Flynn
be1d400369 LibWebView: Add a browser flag to collect garbage after each allocation 2024-11-01 00:35:54 +01:00
stelar7
171af8de33 LibWeb: Implement AES-GCM.generateKey 2024-10-31 23:33:56 +01:00
stelar7
196d99352a LibWeb: Stub out AES-GCM.decrypt 2024-10-31 23:33:56 +01:00
stelar7
2672acf9c4 LibWeb: Stub out AES-GCM.encrypt 2024-10-31 23:33:56 +01:00
stelar7
3dd80d2a6e LibWeb: Implement AES-GCM.exportKey 2024-10-31 23:33:56 +01:00
stelar7
e53b3f5fb1 LibWeb: Implement AES-GCM.importKey 2024-10-31 23:33:56 +01:00
stelar7
80d37a6def LibWeb: Implement AES-GCM.getKeyLength 2024-10-31 23:33:56 +01:00
Jonne Ransijn
a733e2a31c LibWeb: Fix use-after-move in URLSearchParams::update
This was previously still valid since the `Optional<String>` move
constructor copied its input, but since the move is now destructive,
the code no longer works.
2024-10-31 23:26:22 +01:00
Jonne Ransijn
2457118024 AK: Add template specializations for Optional<{,Fly}String>
Slice the size of `Optional<{,Fly}String>` in half by introducing
`UINTPTR_MAX` as an invalid bit pattern for these values.
2024-10-31 23:26:22 +01:00
Jonne Ransijn
fcdf3014f1 AK: Move "conditional xtor" pattern into a macro
`Optional` and `Variant` both use essentially the same pattern of only
declaring a copy constructor/move constructor/destructor and copy/move
assignment operator if all of their template parameters have one.

Let's move these into a macro to avoid code duplication and to give a
name to the thing we are trying to accomplish.
2024-10-31 23:26:22 +01:00
Jonne Ransijn
a70ed6a2ad AK: Add OptionalBase class to reduce code duplication
Using CRTP and `static_cast`s because "deducing this" is
still not fully supported yet.
2024-10-31 23:26:22 +01:00
Sam Atkins
f80fca2dee LibWeb/HTML: Update legacy color parsing steps to match spec
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-10-31 19:23:23 +00:00
Aliaksandr Kalenik
46db0febf7 LibUnicode+LibWeb: Move should_continue_beyond_word helper in Segmenter 2024-10-31 19:04:07 +00:00
Aliaksandr Kalenik
fb23fd328b LibWeb: Simplify empty string allocation in handle_delete() 2024-10-31 19:04:07 +00:00
Aliaksandr Kalenik
bdaac6ce48 LibWeb: Bring back FIXME about using UTF-16 length in handle_insert()
It was accidentally removed in a8077f79cc
2024-10-31 19:04:07 +00:00
Aliaksandr Kalenik
54d7314bd9 LibWeb: Remove unnecessary double cast in PaintableFragment 2024-10-31 19:04:07 +00:00
Aliaksandr Kalenik
835181e9d8 LibWeb: Move constructor and visit_edges in .cpp for EditingHostManager 2024-10-31 19:04:07 +00:00
Aliaksandr Kalenik
3ac7ba7f58 LibWeb: Fix alphabetical sorting in LibWeb/Forward.h 2024-10-31 19:04:07 +00:00