aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Fix GC borrow hazard in ↵chickenleaf2024-10-191-1/+1
| | | | | | | | | | | | | | | HTMLImageElement::finish_reacting_to_environment_change (#33904) * Fix GC borrow hazard in HTMLImageElement::finish_reacting_to_environment_change Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Fixed clippy error Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* replace sparkle with glow in components/script (#33911)Samson2024-10-194-6/+6
| | | | | | | | | | | | | | | | | * replace sparkle's GlType with canvas_traits's GlType Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * remove sparkle from components/servo Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * remove sparkle from script Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix GC borrow hazard in ResizeObserver::broadcast_active_resize_observations ↵tanishka2024-10-191-16/+20
| | | | | | | | | | | | | | | | | | | | | | | (#33875) * Fix GC borrow hazard in ResizeObserver Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Use borrow instead of borrow_mut Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Refactor to avoid borrow conflicts Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Copy value out of borrowed value Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Prevent moving CanGc values between threads/tasks (#33902)Josh Matthews2024-10-1810-89/+69
| | | | | | | | | | | | | * Make CanGc non-sendable, and add documentation. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update CanGc usage to fix usages that were moved between threads/tasks. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: Fix a variety of clippy warnings in `fonts`, `layout_2020` and the ↵chickenleaf2024-10-184-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM code (#33894) * fixed some clippy warnings Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Delete extra file Signed-off-by: chickenleaf <lashwinib@gmail.com> * preserved newline in compositionevent.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> * removed the newline in PrototypeList Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the trailing whitespace Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* More files with CanGc fixes (#33892)chickenleaf2024-10-1831-100/+226
| | | | | | | | | | | | | * More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Various CanGc fixes in 8 files (#33893)chickenleaf2024-10-1813-58/+77
| | | | | | | | | | | | | * Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Some CanGc fixes in components/script/dom (#33895)tanishka2024-10-185-15/+23
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Use `ROUTER::add_typed_route` instead of `ROUTER::add_route` everywhere (#33866)Simon Wülker2024-10-1818-117/+98
| | | | | | | | | | | | | * Use ROUTER::add_typed_route where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update webxr, media and ipc-channel Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* clippy: Rename `RequestId::new()` to `RequestId::next()` and fix one more ↵komuhangi2024-10-181-2/+2
| | | | | | | | | | | | | | | issue in `servo/lib.rs` (#33881) * clippy: fix clippy warnings in components/ Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> * Addressed changes from the PR Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> --------- Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* CanGc fixes in components/script/dom (#33891)tanishka2024-10-1713-25/+49
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* More CanGc fixes (#33888)chickenleaf2024-10-1725-58/+102
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Fix type mismatches in Router::add_route calls (#33882)Simon Wülker2024-10-172-4/+4
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* fix clippy warning in components/script (#33878)lwz232024-10-175-6/+5
| | | Signed-off-by: lwz23 <wenzhaoliao@ruc.edu.cn>
* CanGc fixes in components/script/dom (#33880)tanishka2024-10-1712-33/+59
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Handle multibyte characters in img srcset (#33873)evuez2024-10-171-4/+4
| | | | | | This was causing this web platform test to crash: https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html Signed-off-by: evuez <julien@mulga.net>
* net: Start reducing number of IPCs channels used for fetch with a ↵Martin Robinson2024-10-1618-424/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FetchThread` (#33863) Instead of creating a `ROUTER` for each fetch, create a fetch thread which handles all incoming and outcoming fetch requests. Now messages involving fetches carry a "request id" which indicates which fetch is being addressed by the message. This greatly reduces the number of file descriptors used by fetch. In addition, the interface for kicking off fetches is simplified when using the `Listener` with `Document`s and the `GlobalScope`. This does not fix all leaked file descriptors / mach ports, but greatly eliminates the number used. Now tests can be run without limiting procesess on modern macOS systems. Followup work: 1. There are more instances where fetch is done using the old method. Some of these require more changes in order to be converted to the `FetchThread` approach. 2. Eliminate usage of IPC channels when doing redirects. 3. Also eliminate the IPC channel used for cancel handling. 4. This change opens up the possiblity of controlling the priority of fetch requests. Fixes #29834. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Add missing XRWebGLBinding constructor spec steps (#33731)Taym Haddadi2024-10-162-3/+23
| | | | | | | | | | | | | * Add missing XRWebGLBinding constructor spec steps Signed-off-by: Taym <haddadi.taym@gmail.com> * Update test expectation Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
* clippy: Fix warnings in `components/script/dom` (#33860)tanishka2024-10-162-0/+3
| | | | | | | | | | | | | * clippy: Fix warnings in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Move allow to WRAP level Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix warnings in `components/script/dom` & `components/servo` (#33853)tanishka2024-10-162-0/+4
| | | | | | | | | | | | | | | | | | | | | | | * clippy: Fix warnings in components/script/dom & components/servo Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Move allow to the level of the named field Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Add blank lines before & after field Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * remove trailing whitespace 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>
* Some CanGc Fixes (#33865)komuhangi2024-10-162-1/+3
| | | Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* CanGc fixes in components/script/dom (#33862)tanishka2024-10-1610-19/+43
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Fix GC borrow hazard in XRInputSourceArray (#33857)chickenleaf2024-10-161-16/+11
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* clippy: fix clippy warnings in `components/script` (#33849)komuhangi2024-10-162-0/+3
| | | | | | | | | | | | | * Clippy:Fix clippy warnings in components/script Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> * Addressed changes suggested in #33849 Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com> --------- Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* clippy: Add safety documentation and clean up unsafe methods (#33748)Martin Robinson2024-10-1611-317/+377
| | | | | | | | | | | This change: 1. Adds safety documentation where it was missing. 2. Limits the scope of unsafe code in some cases to where it is actually unsafe. 3. Converts some free functions to associated functions and methods, thereby making them more likely to be called safely. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* CanGc fixes (#33852)chickenleaf2024-10-1620-63/+92
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* clippy: Fix `type_complexity` warning in `components/script/dom` (#33835)tanishka2024-10-151-16/+20
| | | | | | | | | | | | | | | | | | | | | * clippy: Fix type_complexity warning in components/script/dom/bluetoothdevice.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Fix clippy warnings due to code changes Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Move documentation comment Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Root the new struct Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Fix Clippy warning: remove unneeded late initialization of string (#33840)chickenleaf2024-10-151-10/+9
| | | | | | | | | | | | | * Fix Clippy warning: remove unneeded late initialization of string Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Fixed the comments placement Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes in components/script/dom (#33843)tanishka2024-10-159-24/+21
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes and checks in multiple files (#33836)chickenleaf2024-10-159-63/+78
| | | | | | | | | | | | | * CanGc fixes and checks in multiple files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * CanGc fixes in storageevent.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes originating from `gamepadevent.rs` & `stereopannernode.rs` (#33828)tanishka2024-10-145-14/+10
| | | | | | | | | | | | | * CanGc fixes originating from gamepadevent.rs & stereopannernode.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Revert changes within task! macro Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Fixed same_enum_variation clippy warnings in components/script/dom (#33818)komuhangi2024-10-142-24/+24
| | | Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* CanGc fixes in focusevent.rs oscillartornode.rs response.rs ↵chickenleaf2024-10-1312-28/+65
| | | | | resizeobserversize.rs animationevent.rs (#33827) Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Propagate CanGc through dommatrix, dommatrixreadonly, and testbindings (#33822)chickenleaf2024-10-138-62/+124
| | | | | | | | | | | | | | | | | | | * CanGc fixes starting from dommatrix.rs fixed conflicts Signed-off-by: L Ashwin B <lashwinib@gmail.com> ~ * cleaning up Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed cannot find value can_gc in this scope error Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Use document encoding when parsing url in href setter (#33825)Simon Wülker2024-10-132-8/+46
| | | | | | | | | | | | | | | | | * Implement encoding-parse-a-url algorithm Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Parse url with encoding when setting href on HtmlAnchorElement Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Remove some fixed fixmes (#33824)shanehandley2024-10-132-7/+4
| | | Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* clippy: Fix warnings in `components/script` & `components/script/dom` (#33821)tanishka2024-10-132-1/+2
| | | | | | | | | | | | | | | | | * clippy: Fix warnings in components/script & components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove unused variable - can_gc Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Use _can_gc instead of removing it Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes starting from blob.rs, mediastream.rs, custom_event.rs (#33820)chickenleaf2024-10-129-28/+58
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Replace CanGc::note() calls with arguments in `components/script` (#33816)tanishka2024-10-113-4/+5
| | | | | | | | | | | | | * Replace CanGc::note() calls with arguments in components/script Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Revert changes for task macro Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes starting from imagedata.rs (#33808)chickenleaf2024-10-115-24/+65
| | | | | | | | | | | | | | | | * CanGc fixes starting from imagedata.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/imagedata.rs 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>
* content: Replace uses of `downcast`+`is_some`/`is_none` with `is` (#33804)tanishka2024-10-115-8/+5
| | | | | | | | | | | | | * content: Replace uses of downcast+is_some/is_none with is Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove ! to return correct logic Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Implement DOMRect::FromRect (#33798)Simon Wülker2024-10-114-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement DOMRect::FromRect Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Silence crown errors The rect type does not contain any gc'd members, so not rooting it is perfectly fineSilence crown errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add SVGRect to the list of exposed interface globals Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT manifest Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* clippy: Fix `type_complexity` warnings in `components/script/dom` (#33790)tanishka2024-10-113-25/+38
| | | | | | | | | | | | | | | | | | | | | * clippy: Fix type_complexity warnings in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Use explicit & implicit method calls where needed Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove unwrap & pass pipeline_layout Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove unused variable - bgls Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Throw NotSupported error and update expected results for ↵chickenleaf2024-10-111-10/+2
| | | | | | | | | | | | | | | XRSession::UpdateRenderState (#33803) * Throw NotSupported error and update expected results for xrSession_updateRenderState Signed-off-by: L Ashwin B <lashwinib@gmail.com> * deleted the log file Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* clippy: Refactor `script/dom/globalscope.rs` to avoid overly complex types ↵chickenleaf2024-10-111-40/+23
| | | | | | | | | | | | | | | (#33782) * Simplified types in globalscope.rs, folded callbacks, and replaced Result with Fallible Signed-off-by: L Ashwin B <lashwinib@gmail.com> * clippy: Refactor script/dom/globalscope.rs to avoid overly complex types Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Various CanGc fixes (#33800)webbeef2024-10-1124-119/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CanGc fix for pagetransitionevent Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/node Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gamepad Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gpu Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/element Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for xhr Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/worker Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcerror Signed-off-by: webbeef <me@webbeef.org> * Address review comments Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* Implement DOMMatrix `stringifier` (#33792)Simon Wülker2024-10-112-2/+128
| | | | | | | | | | | | | * Implement DOMMatrix stringifier Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Use NaN-safe comparisons in DOMQuad::GetBounds (#33794)Simon Wülker2024-10-111-25/+52
| | | | | | | | | | | | | | | | * Use nan-safe comparison in DOMQuad::GetBounds This fixes at least the following WPT test: * css/geometry/DOMQuad-nan.html Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update DOMMatrix::is2D when modifying elements (#33796)Simon Wülker2024-10-111-0/+60
| | | | | | | | | | | | | * Invalidate DOMMatrix::is2D when modifying matrix values Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Replace some `Point2D::new(0, 0)` instances with `Point2D::zero()` (#33783)birdbrained2024-10-102-2/+2
| | | Signed-off-by: hackerbirds <120066692+hackerbirds@users.noreply.github.com>