Commit graph

64648 commits

Author SHA1 Message Date
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
Timothy Flynn
6708251968 LibWeb: Disable css/transition-basics.html test
This is flaky in CI.
2024-10-31 13:23:26 -04:00
Timothy Flynn
d188aaf288 LibWeb: Protect animation frame callbacks from GC while they execute
Stealing the callbacks from the AnimationFrameCallbackDriver made them
no longer safe from GC. Continue to store them on the class until we
have finished their execution.
2024-10-31 15:37:47 +01:00
stelar7
f6991a2955 LibWeb: Bring performance.now() closer to spec 2024-10-31 14:10:13 +01:00
Sam Atkins
f31c18756b LibWeb: Update spec comments using "Type(Foo)" -> "is a Foo" 2024-10-31 14:01:51 +01:00
Sam Atkins
00e613c7df LibWeb/HTML: Guard showModal() with fully active check
This corresponds to this spec change:
https://github.com/whatwg/html/pull/10705

(We don't implement showPopover() yet.)
2024-10-31 14:01:15 +01:00
Sergei Azarkin
2199fde5a9 LibWeb: Support shorthands when setting style attribute
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
Better support for CSS shorthands when setting the style attribute. This
improves some tests in WPT /css/css-align/default-alignment/*shorthand.
When setting the style attribute in JS via element.style = '..' or the
setAttribute method, shorthand properties were not expanded to longhand
properties.
2024-10-31 12:23:03 +00:00
Sam Atkins
99c66f49fb LibJS: Update console spec's use of "Type()" -> "is a"
Corresponds to the change in this PR:
https://github.com/whatwg/console/pull/241
2024-10-31 08:16:19 -04:00
Gingeh
3467076dbc LibWeb+LibGfx: Keep path properties when cloning and implement fill-rule 2024-10-31 10:30:24 +00:00
Gingeh
a7e83c38ee LibWeb: Implement missing basic shapes 2024-10-31 10:30:24 +00:00
Jelle Raaijmakers
76e638b4ca LibWeb: Use right interface for custom SVG and MathML elements
The DOM spec gets overridden by both the SVG2 and MathML core specs in
that unknown elements should not inherit DOM::Element, but
SVG::SVGElement and MathML::MathMLElement respectively.
2024-10-31 09:58:59 +00:00
Jelle Raaijmakers
84fe8d675b LibWeb: Implement HTMLOrSVGElement.nonce
There are two FIXMEs remaining that depend on a functional
PolicyContainer, which we ignore for now and always behave like a CSP is
set.
2024-10-31 10:46:21 +01:00
Jelle Raaijmakers
8dcab69779 LibWeb: Remove unused includes from HTMLElement and SVGElement 2024-10-31 10:46:21 +01:00
Jelle Raaijmakers
5f84c2c3af LibWeb: Factor out HTMLOrSVGElement
This is a mixin in the IDL, so let's treat it as a mixin in our code and
let both SVGElement and MathMLElement reuse the implementations that we
wrote for HTMLElement.
2024-10-31 10:46:21 +01:00
sideshowbarker
d9124c8058 GitHub: Fix grammar error/typo in bug_report.yml issue template 2024-10-31 10:25:27 +01:00
stelar7
f9b511a7d6 LibWeb: Implement X25519.exportKey 2024-10-31 09:52:24 +01:00