Commit graph

27611 commits

Author SHA1 Message Date
Josh Matthews
1070f7ac12
Fix invalid rooting for PropertyDescriptor (#34018)
* Clean up unnecessary uses of RootedGuard.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Update mozjs.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-28 19:03:24 +00:00
Wulan Seruniati Salim
d3e0efbc21
Cleanup: Remove reference to closed issue 7193 (#34039)
Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
2024-10-28 17:28:31 +00:00
Josh Matthews
216296840a
Replace uses of SCRIPT_THREAD_ROOT with accessor helpers. (#34036)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-28 16:28:24 +00:00
Josh Matthews
1d6ede7b48
Remove GC hazard when compiling inline event listeners. (#33965)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-28 16:27:42 +00:00
Samson
a01d66df53
webgpu: Move supported context format to content timeline (#34028)
* Move supported context format to content timeline

https://github.com/gpuweb/gpuweb/pull/4911
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-10-28 09:15:46 +00:00
eri
10aa485c0c
Devtools: Don't display iframes in the tab list (#34032)
Signed-off-by: eri <epazos@igalia.com>
2024-10-27 23:33:01 +00:00
chickenleaf
53911f4e5a
GC hazard fix in customelementregistry.rs (#34019)
* GC hazard fix in customelement.registry.rs

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* removed redundant borrow

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-26 16:18:00 +00:00
chickenleaf
82c9d41330
GC hazard fix in document.rs (#34020)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-26 13:22:10 +00:00
Oriol Brufau
faeb31d6c6
Implement keyword sizes for intrinsic contributions (#33854)
Correctly handle keyword sizes when computing the min-content or
max-content contribution of a box.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-26 09:15:19 +00:00
Oriol Brufau
dfe1c95aa6
Avoid crash in replaced layout, and fix behavior for non-auto aspect-ratio (#34006)
Also, it was assuming that the aspect ratio would work with the content
box dimensions, but that isn't the case for `aspect-ratio: <ratio>` with
`box-sizing: border-box`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-25 17:13:07 +00:00
Simon Wülker
600ba602b7
Limit HtmlOptionsCollection.length setter to 100k elements (#34009)
This is a first step towards fixing a TIMEOUT in
"html/select/options-length-too-large.html"

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2024-10-25 14:38:59 +00:00
tanishka
fd6c100489
CanGc fixes in messageport.rs & workerglobalscope.rs (#34003)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-25 13:53:53 +00:00
chickenleaf
7ad8822d94
cangc fixes in several files + event.rs + rtcpeerconnection.rs (#34002)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-25 12:44:15 +00:00
Martin Robinson
3b5dc069ae
dom: Stub out the IntersectionObserver interface (#33989)
This is the first step toward implementing the IntersectionObserver
interface. It adds stubs which are exposed when a preference is turned
on. This is enough to get some sites with `IntersectionObserver` to
start working.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-10-25 09:26:47 +00:00
Oriol Brufau
f05f1b3690
Implement transition-behavior (#33991)
Bump Stylo to https://github.com/servo/stylo/pull/84

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-24 20:34:10 +00:00
Martin Robinson
52db185568
layout: Avoid layout sometimes when stretching (#33967)
This is the second flexbox caching change. It seeks to detect when a
relayout can be avoided in the case of a stretching flex item. This
heuristic can be combined, because currently we still do relayout
sometimes when we do not need to.

For instance currently we always relayout when a flex child is itself a
column flex. This only needs to happen when the grandchildren themselves
grow or shrink. That optimization is perhaps a lower priority as
`flex-grow: 0 / flex-shrink: 1` is the default behavior for flex.

Since this change means we more consistenly zero out the percentage part
of `calc` expressions when they have circular dependencies, this causes one
test to start failing (`/css/css-values/calc-min-height-block-1.html`).
This is related to w3c/csswg-drafts#10969, which is pending on further
discussion in the working group.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-10-24 17:44:30 +00:00
Oriol Brufau
9ad59d1459
Consistent resolution of cyclic percentages in min sizing properties (#33988)
The spec says that cyclic percentages in min sizing properties should
be resolved against zero when computing intrinsic contributions.
We were already doing that in the inline axis, but we were treating
the entire expression as `auto` in the block axis.

With this patch we will follow the spec in both axes. But note that
browsers don't follo the spec in either axis, so we may have to revisit
(see https://github.com/w3c/csswg-drafts/issues/10969).

calc-min-height-block-1.html now fails because it tests what browsers
do instead of what the spec says.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-24 12:03:32 +00:00
Ville Lindholm
202cb53d5b
add allow(non_camel_case_types) to generated pref structs (#33987)
Signed-off-by: Ville Lindholm <ville@lindholm.dev>
2024-10-24 09:36:13 +00:00
tanishka
ea875f0a51
CanGc fixes from EventTarget::fire_event (#33985)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-23 22:48:19 +00:00
chickenleaf
bb4932026c
cangc fixes in node.rs (#33984)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-23 22:44:50 +00:00
Wulan Seruniati Salim
3ed778150f
Replace CanGC note calls with arguments passed by callers (#33978)
Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
Co-authored-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com>
2024-10-23 22:19:20 +00:00
chickenleaf
076b37e6aa
Resolved potential GC borrow hazards in ModuleTree::append_handler, ModuleTree::append_dynamic_module_handler, and ModuleTree::fetch_module_descendants' (#33942)
* GC borrow hazard ModuleTree fix

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* Prevent `stretch` from producing a negative size (#33951)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* reverted debug_assert back to assert

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* added can_gc arguments to the function calls

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-10-23 11:51:49 +00:00
chickenleaf
324f42abd7
Use borrow() to fix GC hazard in stream_chunk (#33976)
* Use borrow() to fix GC hazard in stream_chunk

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* added the corrections

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-23 11:51:15 +00:00
Josh Matthews
12e6ec25aa
Propagate CanGc when interacting with readable streams. (#33975)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-23 11:49:59 +00:00
Martin Robinson
f553bda7eb
clippy: Fix warning in fonts/platform/macos/font_list.rs (#33971)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2024-10-23 07:55:43 +00:00
Josh Matthews
6fdd5ce4cb
Ensure compiled script module object remains rooted while it's being passed around. (#33938)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-23 01:30:47 +00:00
tanishka
7fbd2a521e
CanGc fixes from eventtarget.rs (#33973)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-22 22:43:52 +00:00
Daniel Adams
7b392db02f
crypto: Add support for AES-CTR operations (#33963)
* Add support for AES-CTR operations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* clippy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Consolidate encrypt/decrypt for AES-CTR

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-10-22 22:32:41 +00:00
Oriol Brufau
1c26c0335e
Implement keyword sizes on absolute/fixed positioned elements (#33950)
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-22 18:50:12 +00:00
tanishka
78d48ae2fb
Fix GC borrow hazard in XRSession::UpdateTargetFrameRate (#33929)
* Fix GC borrow hazard in XRSession::UpdateTargetFrameRate

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Limit borrow scope

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-22 17:01:42 +00:00
Martin Robinson
01c9ecfe01
layout: Cache content block size contributions (#33964)
This is the first part of caching intermediary layout during flexbox
layout. A later change will try to reuse these layouts, when possible,
for actual item layout and re-layout due to stretching.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-10-22 14:43:53 +00:00
tanishka
7015e0fb5f
CanGc fixes in errorevent.rs (#33960)
* CanGc fixes in errorevent.rs

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Allow too_many_arguments to avoid lint error

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-22 10:08:55 +00:00
Josh Matthews
575e885529
Mark promise creation methods with CanGc (#33928)
* Add CanGc annotations to promise constructor.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Propagate CanGc arguments for Promise::new_in_current_realm.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix out-of-order entries.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Propagate CanGc from Promise::new.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Suppress clippy warning.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-22 09:35:20 +00:00
Oriol Brufau
8824c90716
Prevent stretch from producing a negative size (#33951)
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-22 08:04:15 +00:00
chickenleaf
ebfea9b352
CanGc fixes in several files (#33958)
* few cangc fixes

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* few cangc fixes

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-21 21:32:22 +00:00
chickenleaf
aeed5ca3b4
Replaced mem::replace with mem::take for old_min_size (#33959)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-21 19:30:57 +00:00
tanishka
571cba4a81
CI: Fail the lint job when cargo-clippy reports some warnings (#33941)
* Fail the lint job when cargo-clippy reports some warnings

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Remove todo comment

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* clippy: use Option::take instead of mem::replace

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-10-21 15:18:32 +00:00
Josh Matthews
dc03d1f3e2
Mark CompileFunction as a potential GC operation. (#33937)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2024-10-21 12:29:50 +00:00
chickenleaf
9acb25521e
CanGc changes from fontfaceset.rs (#33920)
* CanGc changes from fontfaceset.rs

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* Update components/script/dom/bindings/codegen/Bindings.conf

Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: chickenleaf <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Signed-off-by: chickenleaf <lashwinib@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2024-10-21 12:28:56 +00:00
tanishka
66695d2f7e
clippy: Fix warnings in subtlecrypto.rs (#33943)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-21 10:43:47 +00:00
Oriol Brufau
2319764a1e
Refactor positioned layout (#33922)
This unifies the size resolution into AbsoluteAxisSolver, since it needs
to know the size in order to resolve auto margins correctly anyways.
This will allow adding support for sizing keywords in a follow-up patch.

Also, this avoids doing multiple layouts due to min and max constraints,
improving performance.

Additionally, tables may end up having a custom size, different than
what we would expect by just looking at the sizing properties. This
patch ensures that we resolve margins correctly with the final size,
resulting in 2 tests now passing.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-21 10:41:42 +00:00
DK Liao
fee927475b
Remove some unused preferences (#33939)
Signed-off-by: DK Liao <dklassic@gmail.com>
2024-10-21 08:24:27 +00:00
Daniel Adams
45267c9f28
crypto: Implement encrypt/decrypt for AES-CBC + JWK support (#33795)
* Add support for raw importKey with AES-CBC

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Support JWK import/export, importKey for AES-CBC

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Implement encrypt/decrypt for AES-CBC

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update Cargo.lock

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Pass MutableHandleObject as arg instead of returning raw pointer

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Swap order of checks in generate_key_aes_cbc

- Fixes WPT tests that expect to error on algorithm first before usages

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Avoid potential GC hazard with array_buffer_ptr

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update expectations for discards context

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2024-10-21 07:32:19 +00:00
Noble Chinonso
397c5adf79
clippy: fix explicit lifetime warning in components\layout_2020\style_ext.rs:320:20 (#33936)
Signed-off-by: Noble <nobleuwuja@gmail.com>
2024-10-21 07:03:55 +00:00
Noble Chinonso
c550a70f5c
clippy: fix using clone() warning in components\layout_2020\display_list\mod.rs:1365:25 (#33935)
Signed-off-by: Noble <nobleuwuja@gmail.com>
2024-10-21 05:54:22 +00:00
tanishka
4d11b2dc84
CanGc fixes from constantsourcenode.rs & window.rs (#33931)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-20 19:54:02 +00:00
Oriol Brufau
c75f6627ba
Upgrade Stylo to 2024-10-04 (#33767)
* Upgrade Stylo to 2024-10-04

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D220285

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://bugzilla.mozilla.org/show_bug.cgi?id=1918093

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D222817

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D222856

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D222532

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D222533

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D222534

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D223878

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-10-20 19:53:38 +00:00
tanishka
65c866285f
Multiple CanGc fixes in components/script/dom (#33924)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-20 16:07:15 +00:00
Wulan Seruniati Salim
a14b65f30b
Replace CanGc::note() with arguments passed by callers (#33917)
Signed-off-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com>

remove not necessary comment

Co-authored-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com>
2024-10-20 08:24:36 +00:00
tanishka
a57b6a3f79
CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
2024-10-20 08:05:11 +00:00