aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
* net: Use `RequestId` to cancel fetches instead of creating an IPC channel ↵Martin Robinson2025-01-1123-226/+179
| | | | | | | | | | | | | | | | | | (#34883) Instead of creating an IPC channel for every fetch, allow cancelling fetches based on the `RequestId` of the original request. This requires that `RequestId`s be UUIDs so that they are unique between processes that might communicating with the resource process. In addition, the resource process loop now keeps a `HashMap` or `Weak` handles to cancellers and cleans them up. This allows for creating mutiple `FetchCanceller`s in `script` for a single fetch request, allowing integration of the media and video elements to integrate with the `Document` canceller list -- meaning these fetches also get cancelled when the `Document` unloads. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Improve painting of collapsed borders in table layout (#34933)Oriol Brufau2025-01-115-94/+177
| | | | | | | | This is still not the right approach, because we are not painting collapsed borders as a single thing. Instead, we are splitting them into two halves and paint each half on a different cell. This only looks good for solid borders. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Improve sizing of tables in collapsed-borders mode (#34932)Oriol Brufau2025-01-102-6/+38
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Implement HTMLCanvasElement.toBlob (#34938)webbeef2025-01-104-91/+205
| | | | | | | This refactors some of the code that is shared with toDataURL, and updates the webidl definition to match the current spec (using a default value for the mime type). Signed-off-by: webbeef <me@webbeef.org>
* Update wgpu and impl `WGSLLanguageFeatures` (#34928)Samson2025-01-106-4/+107
| | | | | | | | | | | | | | * Update wgpu and impl `WGSLLanguageFeatures` https://github.com/gfx-rs/wgpu/commit/dc9b2eb71807ccafb7414425f1f8f24b5691685d 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>
* layout: Don't recalculate the PaddingBorderMargin in table layout (#34931)Oriol Brufau2025-01-101-23/+15
| | | | | | | Just use the cached `TableLayout::pbm`. Also, `TableLayout::pbm` is now computed with the right writing mode, but no change in practice since we don't support vertical writing modes. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* script: Move navigation fetching to the `ScriptThread` (#34919)Martin Robinson2025-01-1016-458/+418
| | | | | | | | | | | | | | | | | | | | This allows reusing the asynchrnous fetch mechanism that we use for page resources and is likely a step toward removing the `FetchThread`. Benefits: - Reduces IPC traffic during navigation. Now instead of bouncing between the constellation and the `ScriptThread` responses are sent directly to the `ScriptThread`. - Allows cancelling loads after redirects, which was not possible before. There is the question of what to do when a redirect is cross-origin (#23037). This currently isn't handled properly as the `Constellation` sends data to the same `Pipeline` that initiated the load. This change doesn't fix this issue, but does make it more possible for the `ScriptThread` to shut down the pipeline and ask the `Constellation` to replace it with a new one. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Fix shadow root binding children to the tree (#34909)Taym Haddadi2025-01-101-3/+12
| | | | | | | | | | | | | | | | | | | | | * Fix Shadow roots bind children to the tree Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Avoid iterate over the shadow root itself Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Update test expectation Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* layout: grid-template getComputedStyle cleanup (#34926)Steven Novaryo2025-01-106-28/+28
| | | | | | | | | | | | | | | | | * Update Taffy and WPT expectations Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Rename DetailedInfo to SpecificInfo Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Run fmt Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> --------- Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
* script: Limit public exports. (#34915)Josh Matthews2025-01-10584-5008/+5407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add jpeg and webp support to canvas.toDataURL() (#34861)webbeef2025-01-091-9/+69
| | | Signed-off-by: webbeef <me@webbeef.org>
* layout: Set padding to zero on tables in collapsed-borders mode (#34908)Oriol Brufau2025-01-092-11/+17
| | | | | | | | | https://drafts.csswg.org/css2/#collapsing-borders > in this model, a table does not have padding https://drafts.csswg.org/css-tables/#collapsed-style-overrides > The padding of the table-root is ignored (as if it was set to 0px). Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Add http2 feature for hyper-util (#34920)Oriol Brufau2025-01-092-2/+2
| | | | | This fixes an error when running `./mach clippy -r -p layout_2020`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Minor tweaks for table layout (#34921)Oriol Brufau2025-01-091-3/+3
| | | | | | | - Fix a typo in a comment. - Get the writing mode of the table in a less convoluted way. - Check `is_horizontal()` instead of `!is_vertical()` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: grid template getComputedStyle resolved value (#34885)Steven Novaryo2025-01-099-10/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Store taffy detailed info into fragment Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Fix info propagation and resolved grid track query Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Fix import Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Fix tracklist matching logic and type optimization Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Run fmt Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Update wpt expectations Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Optimizing info propagation and minor qol Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> * Run fmt Signed-off-by: stevennovaryo <steven.novaryo@gmail.com> --------- Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
* webgl: shutdown webrender before acknowledging Exit message (#34917)Mukilan Thiyagarajan2025-01-091-9/+9
| | | | | Fixes #34847. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* script: Downgrade noisy debug logs. (#34914)Josh Matthews2025-01-094-7/+7
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* layout: Defer some table sizing logic to the parent formatting context (#34889)Oriol Brufau2025-01-094-40/+43
| | | | | | | | | | | | | A box is usually sized by the formatting context in which it participates. However, tables have some special sizing behaviors, and these were in conflict. Instead of letting tables attempting to re-resolve their inline table, which failed to e.g. take flex properties into account or resolve sizing keywords correctly, now tables will trust the inline size determined by the parent. They will only floor it by the min-content size, and maybe shrink the final size due to collapsed columns. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* build(deps): bump async-tungstenite from 0.28.0 to 0.28.2 (#34904)dependabot[bot]2025-01-081-1/+0
| | | | | | | | | | | | | | | Bumps [async-tungstenite](https://github.com/sdroege/async-tungstenite) from 0.28.0 to 0.28.2. - [Changelog](https://github.com/sdroege/async-tungstenite/blob/main/CHANGELOG.md) - [Commits](https://github.com/sdroege/async-tungstenite/compare/0.28.0...0.28.2) --- updated-dependencies: - dependency-name: async-tungstenite dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* script: Use `enum`s for event loop senders and receivers (#34896)Martin Robinson2025-01-0818-325/+217
| | | | | | | | | | | | | | | | | | | | | | | Previously, senders and receivers to different kinds of event loops (the main `ScriptThread`, different types of workers) used a rust `trait` mechanism to implement dynamic behavior. This led to having many unused implementations of this `trait`. This change moves to using an `enum` based approach for these senders and receivers and removes all of the dead code. In addition, to allowing for use of rust's dead code detection, it simplifies the code a great deal. All of these generic senders and receivers are moved to the `messaging.rs` file and given proper documentation. Finally, empty an `JSTraceable` implementation is made for all crossbeam `Sender<...>`s to avoid having to manually skip them everytime they are included in structs. The pre-existing empty `MallocSizeOf` implementation is used more thoroughly. Other unecessary wrappers around these senders and receivers are removed as well. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Refine the check for dependending on available space (#34907)Oriol Brufau2025-01-082-16/+11
| | | | | | | | | | | | | | When laying out a block-level box that avoids floats, if we know that its size doesn't depend on the available space, we can take a fast path and only lay it out once. If its size depends on the available space, we may have to lay it out multiple times, which can be slower. This patch improves the check for this dependency on the available space. For example, `min-width: 200px; width: 100px; max-width: stretch` was previously considered to depend on the available space because of `max-width`. However, `max-width` is irrelevant when the min size is greater than the preferred size. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Remove wrong FIXME (#34895)Oriol Brufau2025-01-081-1/+0
| | | | | | There is an early return for independent formatting contexts, so at this point we don't need to handle them. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Don't use `content_inline_size_for_table` in taffy (#34891)Oriol Brufau2025-01-081-3/+1
| | | | | | `content_inline_size_for_table` is an override for table layout. We only use taffy for grid layout, not for table layout. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Assert that GRIDMIN <= GRIDMAX (#34892)Oriol Brufau2025-01-081-5/+5
| | | | | | In the past this didn't hold, so we had to floor GRIDMAX by GRIDMIN. We must have fixed some bugs because now it's fine to just assert it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update all network-related dependencies to the latest versions (#34630)Josh Matthews2025-01-0817-946/+1116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update all network-related dependencies to the latest versions: * rustls * hyper * http * headers * tungstenite * async-tungstenite Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix panics with 1xx responses in WPT tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use reported response length when calculating available ranges. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Clean up commented fragments in blob and file handlers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Remove unreachable match arm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Cleanup. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Fix up unit tests for dependency upgrades. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update aws-lc-sys to fix Windows builds. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * net: Use ring instead of aws-lc-sys. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * embedding: Require embedder to initialize a rustls CryptoProvider. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Disable aws-lc-rs pending OhOS build fixes. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Consider shadow dom when dispatching events (#34788)Simon Wülker2025-01-075-263/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement EventTarget::get_the_parent Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec steps to Event::init_event Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rewrite Event::composedPath to be spec compliant Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Retarget EventTargets instead of Nodes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rewrite event dispatch/invocation to better match the spec Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec comments to Event struct Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Don't traverse shadow roots when calculating an events path We can't do this correctly yet, and assuming that an events composed flag is never set is correct 99% of the time. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix typo in event dispatch Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fix comment Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * allow crown error Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reduce item visibility where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Simplify code a bit Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix Step 5.10 of Event::invoke Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix renamed method calls Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Expose `NodeTraits::owner_global` / `Window::as_global_scope` (#34843)Martin Robinson2025-01-0733-258/+262
| | | | | | | | | | | Expose two new helpers and start using them as much as possible. - `NodeTraits::owner_global`: which gets the `GlobalScope` that currenty owns a `Node`. This may be different than `.global()` in the case that the `Node` was adopted by a different `Document`. - `Window::as_global_scope`: A helper to avoid having to cast so much when treating a `Window` like a `GlobalScope`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Various servodriver fixes (#34871)Josh Matthews2025-01-072-4/+1
| | | | | | | | | | | | | | | | | * servodriver: Set initial URL to data:, instead of about:blank. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Ignore failed epoch update messages. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Make servo-max-session-history.html use an iframe. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Remove obselete request parameter. (#34867)Shubham Gupta2025-01-071-3/+0
| | | | Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org> Co-authored-by: Shubham Gupta <shubham.gupta@chromium.org>
* script: Move the `FontContext` to `Window` (#34845)Martin Robinson2025-01-076-45/+61
| | | | | | | This will allow using layout's `FontContext` in `Window` letting script manage font selection and download. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* script: Unsilence all main thread `TaskQueue` errors (#34849)Martin Robinson2025-01-0748-572/+629
| | | | | | | | | | | | No longer hide errors while queueing tasks on the main thread. This requires creating two types of `TaskSource`s: one for the main thread and one that can be sent to other threads. This makes queueing a bit more efficient on the main thread and more importantly, no longer hides task queue errors. Fixes #25688. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Add shadow tree flags to Bind/UnbindContext (#34863)Simon Wülker2025-01-0710-39/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename IS_IN_DOC flag to IS_IN_A_DOCUMENT_TREE Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add BindContext::is_in_a_shadow_tree Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add UnbindContext::tree_is_in_shadow_tree Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * ./mach fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update test expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * fix build after rebasing Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Add initial support for WebGL 2 BlitFramebuffer (#26389)Josh Matthews2025-01-065-2/+140
| | | | | | Add initial support for the WebGL2 BlitFramebuffer call. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Istvan <istvan.miklos@h-lab.eu>
* Check regex syntax for pattern attribute with CheckRegexSyntax from mozjs ↵cybai (Haku)2025-01-061-2/+31
| | | | | (#28364) Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Treat % as 0 for the min-content contribution of replaced elements (#32103)Oriol Brufau2025-01-063-2/+30
| | | | | | | | | `width` and `max-width` typically treat expressions with percentages as their initial value, but for the min-content contribution of replaced elements, they should instead be treated as zero. https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update webdriver to 0.51 (#34838)webbeef2025-01-051-10/+5
| | | Signed-off-by: webbeef <me@webbeef.org>
* ReadableStream: remove the use of get_js_stream and use ↵Taym Haddadi2025-01-059-52/+43
| | | | | | | | | | | | | | | DomRoot<ReadableStream> (#34836) * Remove the use of get_js_stream and use DomRoot<ReadableStream> Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * return an error instead of Option Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* Document's current script should not be updated when executing script ↵Domenico Rizzo2025-01-041-1/+9
| | | | | | | | | | | | | | | | | | | elements inside shadow trees (#34787) * check if node is in shadow tree Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * Removed meta ini related file Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * refactored as_parent()'s calls Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* Remove readable streams from webidl/codegen (#34835)Taym Haddadi2025-01-042-39/+1
| | | Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
* script: Move `TimerListener` creation to `OneShotTimers` (#34825)Martin Robinson2025-01-042-56/+53
| | | | | | | | | | | | | | Before each `OneShotTimers` would have a `TimerListener` for its lifetime, holding the timer `TaskSource`. The issue with this is that the `TaskSource` for dedicated workers keeps the main thread object alive, so as long as the `OneShotTimers` alive (until the worker thread exists), the main thread object would never be garbage collected. This change makes the creation of the listener on-demand, avoiding the long-lived handle to the main thread object and slightly simplifying `OneShotTimers` at the expense of some more operations when scheduling a timer. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Move `TaskManager` to `GlobalScope` (#34827)Martin Robinson2025-01-0454-1522/+1066
| | | | | | | | | | | | | | | | | | | | This is a simplification of the internal `TaskQueue` API that moves the `TaskManager` to the `GlobalScope` itself. In addition, the handling of cancellers is moved to the `TaskManager` as well. This means that no arguments other than the `task` are necessary for queueing tasks, which makes the API a lot easier to use and cleaner. `TaskSource` now also keeps a copy of the canceller with it, so that they always know the proper way to cancel any tasks queued on them. There is one complication here. The event loop `sender` for dedicated workers is constantly changing as it is set to `None` when not handling messages. This is because this sender keeps a handle to the main thread's `Worker` object, preventing garbage collection while any messages are still in flight or being handled. This change allows setting the `sender` on the `TaskManager` to `None` to allow proper garbabge collection. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Ensure Element ID modifications inside disconnected shadow roots are ↵Simon Wülker2025-01-042-2/+3
| | | | | | | | | | | | | | | | | | | | | | | registered (#34834) * Add test for modifying element IDs in disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Register element ID modifications inside disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Don't crash when registering named elements in disconnected shadow roots Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix test title Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix IS_IN_SHADOW_TREE flag for descendants after Node::remove call (#34803)Simon Wülker2025-01-032-12/+34
| | | | | | | | | | | | | | | | | * Consider a UnbindContext to be tree-connected if its in a shadow root Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Properly track whether a node is in a shadow tree after removing subtree 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>
* script: Expose node helpers as `NodeTraits` and give more descriptive names ↵Martin Robinson2025-01-0366-425/+414
| | | | | | | | | | | | | (#34832) This puts a few commonly used `Node` helpers into a trait (`NodeTraits`) and gives them more descriptive names and documentation. The renames: - `document_from_node` -> `NodeTraits::owner_document` - `window_from_node` -> `NodeTraits::owner_window` - `stylesheets_owner_from_node<T:` -> `NodeTraits::stylesheet_list_owner` - `containing_shadow_root` -> `NodeTraits::containing_shadow_root` Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Elide lifetimes where possible after rustup (#34824)Martin Robinson2025-01-0357-99/+92
| | | | | | | | | The new version of rust allows us to elide some lifetimes and clippy is now complaining about this. This change elides them where possible and removes the clippy exceptions. Fixes #34804. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fix: add source browsing context to `Request` and HTTP credentials prompt ↵Jason Tsai2025-01-034-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#34808) * fix: add source browsing ctx id to request when initiate navigation Signed-off-by: Jason Tsai <git@pews.dev> * chore: clippy Signed-off-by: Jason Tsai <git@pews.dev> * Update components/net/http_loader.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jason Tsai <git@pews.dev> * chore: apply suggestions Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jason Tsai <git@pews.dev> * chore: fix naming Signed-off-by: Jason Tsai <git@pews.dev> * refactor: set request browsing ctx id on pre page load Signed-off-by: Jason Tsai <git@pews.dev> --------- Signed-off-by: Jason Tsai <git@pews.dev> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix building with feature=tracing (#34815)Simon Wülker2025-01-032-7/+126
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* webxr: create glwindow with Rc window and without rendering context (#34813)Ngo Iok Ui (Wu Yu Wei)2025-01-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create webxr glwindow with Rc window Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Remove obselte gurad type Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Update GlWindow trait method Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Update how webxr discorvery is created Now glwindow will create a hidden window. It's better to not use it unless we really want to use this port. Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Link back to upstream webxr repo Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
* Support syntax highlighting of arguments in the devtools console (#34810)Simon Wülker2025-01-024-95/+242
| | | | | | | | | | | | | | | | | | | | | | | | | * Implement Builder struct for console messages Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support integer arguments for console methods Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support floating point arguments to console methods in devtools Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix warnings Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Tidy Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* chore: Update wgpu (#34795)Samson2025-01-022-17/+22
| | | | | | | | | | | | | | | | | | | | * Update wgpu https://github.com/gfx-rs/wgpu/commit/0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93 Most notable change is https://github.com/gfx-rs/wgpu/pull/6785 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Remove silencing of wgpu logs I fixed this in upstream: https://github.com/gfx-rs/wgpu/pull/6817 Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>