aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
Commit message (Collapse)AuthorAgeFilesLines
* Ensure iframe load event occurs if initial about:blank is recreated with ↵Josh Matthews2024-10-021-37/+36
| | | | document.open.
* Update expectations.Josh Matthews2024-09-281-2/+5
|
* Synchronously mark iframes as having pending loads when navigating a window ↵Josh Matthews2024-09-277-13/+31
| | | | proxy with a frame element.
* clear timers when replacing a window.Josh Matthews2024-09-271-0/+1
|
* Only discard documents when no window replacement has occurred.Josh Matthews2024-09-271-2/+4
|
* Enter a realm when dispatching DOMContentLoaded.Josh Matthews2024-09-251-4/+5
|
* Store a pipeline that's being replaced in the load data.Josh Matthews2024-09-254-9/+9
|
* Reset document state notification when replacing a window.Josh Matthews2024-09-251-0/+1
|
* about:srcdoc loads are not synchronous.Josh Matthews2024-09-251-1/+1
|
* Don't suspend windows that have been replaced.Josh Matthews2024-09-251-1/+3
|
* Use existing window when navigating away from initial about:blank document.Josh Matthews2024-09-258-38/+118
|
* Fix panic when about:blank iframe is removed from the document immediately ↵Josh Matthews2024-09-251-2/+4
| | | | after being added to it.
* Formatting.Josh Matthews2024-09-251-4/+11
|
* Sync load event for about:blank iframe elements.Josh Matthews2024-09-251-1/+32
|
* Only suppress load event dispatch.Josh Matthews2024-09-251-6/+8
|
* Formatting.Josh Matthews2024-09-251-3/+1
|
* Hack: normalize all about:blank load behaviour and prevent load/pageshow ↵Josh Matthews2024-09-258-3/+21
| | | | events on the content documents.
* webgpu: destroy GPUTexture without erroring (#33534)Samson2024-09-251-14/+5
| | | | | | | | | | | | | * destroy GPUTexture without erroring (errors can be safely ignored) 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: Implement innerText/outerText (#33312)Ben2024-09-244-50/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement outerText on HtmlElement Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fixed some innerText/outerText bugs Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Unified innerText/outerText handling outside of Layout Before these 2 were treated separately and only within Layout would they end up calling the same method, now they are already unified within HTMLElement Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Address a few nits Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Added innerText support for `inline-flex` Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com> Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Shane Handley <shanehandley@fastmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Properly track `rel` keywords for `<a>`/`<area>`/`<form>` elements (#33462)Simon Wülker2024-09-234-168/+96
| | | | | | | | | | | | | | | | | | | | | | | | * Use linkrelations for all linkable elements Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Document LinkRelations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rename linkrelations.rs -> links.rs This module is supposed to include general-purpose link related stuff. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Parse all "rel" keywords Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Stop sending EmbedderMsg::WebViewOpened from WindowProxy (#33514)webbeef2024-09-221-2/+0
| | | | | This is redundant since the constellation already sends this message. Signed-off-by: webbeef <me@webbeef.org>
* Add `HTMLCanvasDataSource::Empty` that represent transparent black instead ↵Samson2024-09-222-3/+3
| | | | | | | | | | | | | | | of `HTMLCanvasDataSource::Image(None)` (#33519) * `HTMLCanvasDataSource::Empty` that represent transparent black instead of Image(None) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix warning from 3a0d27b2312c6396e85178615290ac2ec3592ce1 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* reuse ImageKey for gpucanvascontext (#33517)Samson2024-09-221-19/+9
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgl: Update IDL exposed members (#33509)Daniel Adams2024-09-2216-41/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update IDLs to expose on Workers Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update usage of Canvas/OffscreenCanvas union, add label Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix match arm Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update interfaces.worker.js Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* fix many clippy warnings (#33510)Gae242024-09-215-11/+7
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* bindings: Allow Guard to take multiple conditions, check for SecureContext ↵Daniel Adams2024-09-212-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | in ConstructorEnabled (#33508) * Update condition handling for exposing values - Let Guard take a list of conditions - Check for secure context condition when exposing constructor Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Python tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Make interfaces test run in secure context Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* chore: Update wgpu (#33506)Samson2024-09-2123-235/+97
| | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use all backends at runtime Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * clean up some adapter stuff Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * flakes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Support more `TextureFormat`s in `GPUCanvasContext.configure()` (#33504)Samson2024-09-201-16/+25
| | | | | | | | | | | | | * `descriptor` -> `configuration` to match spec Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Support more `TextureFormat`s in `GPUCanvasContext.configure()` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* dom: Append stream chunks in the correct order. (#33487)Josh Matthews2024-09-181-2/+1
| | | | | | | | | | | | | | | | | * Append stream chunks in the correct order. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Run mimesniff tests in CI. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Delete tests/wpt/meta/mimesniff/media/media-sniff.window.js.ini Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add checks for BigInt/BigUint in getRandomValues (#33485)Daniel Adams2024-09-181-1/+3
| | | Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update CustomEvent webidl interface (#33481)Simon Wülker2024-09-173-8/+14
| | | | | | | | | | The [idl interface](https://dom.spec.whatwg.org/#interface-customevent) and servo's implementation had diverged. * Extra arguments to initCustomEvent are optional (fixes `dom/events/CustomEvent.html`) * The CustomEvent constructor is infallible * "[Exposed=*]" (and the same for the "Event" interface since it's CustomEvent's parent.) Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* webxr: Implement reference space reset events (#33460)Daniel Adams2024-09-179-5/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial interface implementation Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add event handler Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update FakeXRDevice interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement reset event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Downcast bounded spaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update webxr commit Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Adjust DomRoot usage Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update manifest Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-1630-94/+81
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix rustdoc problems (#33458)Oriol Brufau2024-09-143-5/+5
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* clippy: Fix suggestions in `script`, `libservo`, and `servoshell` (#33453)Ali2024-09-1414-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | * fix clone on copy warning in servoshell Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Remove unecessary borrow in libservo Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Ignore too many arguments warning on create_constellation() Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * fix explicit auto-deref warning Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Autofix multiple clippy warnings in components/script Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> --------- Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* Improve spec conformance around request header validation (#33418)shanehandley2024-09-143-45/+91
| | | | | | | | | | | | | | | | | * fix: improve spec conformance around request header validation Signed-off-by: Shane Handley <shanehandley@fastmail.com> * account for additional test passes Signed-off-by: Shane Handley <shanehandley@fastmail.com> * fix: remove redundant .to_vec call Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Upgrade stylo to 2024-09-02 (#33370)Oriol Brufau2024-09-132-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade stylo to 2024-09-02 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D217308 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D217626 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D218488 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D219537 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Update test expectations Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Accept zero values on some `width`/`height` attributes on table elements ↵Oriol Brufau2024-09-124-4/+4
| | | | | | | | | (#33425) We were incorrectly using `AttrValue::from_nonzero_dimension` to parse some attributes, instead of `AttrValue::from_dimension`. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Add `width` and `height` presentational hints for table-related elements ↵Oriol Brufau2024-09-126-3/+63
| | | | | | | | | | | | | | | (#33405) We were only parsing the `width` attribute as a presentation hint for `<table>`, `<td>` and `<th>`. This patch also handles `<colgroup>` and `<col>`. Also, we weren't parsing `height` at all, now we do it for `<table>`, `<td>`, `<th>`, `<tr>`, `<tbody>`, `<thead>` and `<tfoot>`. One test is now crashing, but this was an existing issue: #33423 Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* chore: Fix two compiler warnings (#33421)Martin Robinson2024-09-122-3/+6
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade to html5ever 0.29 and xml5ever 0.20 (#33412)Nico Burns2024-09-122-0/+2
| | | | | | | | | | | | | * Upgrade html5ever and xml5ever Signed-off-by: Nico Burns <nico@nicoburns.com> * Upgrade stylo (minor bump for upgraded 5ever deps) Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
* Make CanGc derive Copy and Clone (#33407)Taym Haddadi2024-09-1211-50/+38
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* webxr: Update XRInputSource Gamepad handling, FakeXRInputController (#33403)Daniel Adams2024-09-126-9/+80
| | | | | | | | | | | | | | | | | | | | | * Disconnect XRInputSource gamepads on removal Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Comments, adjustments 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>
* Raf delivery: run rafs for all pipeline if tick received for any. (#33395)Gregory Terzian2024-09-111-2/+9
| | | | | | | | | | | | | * update the rendering: run rafs for all pipeline, if tick received for any Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * prioritize only one updating of the rendering per event-loop wake-up Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> --------- Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Stop using `time@0.1` in Servo (#33394)Martin Robinson2024-09-112-23/+26
| | | | | | | | This removes the last few uses of `time@0.1` in Servo. There are still dependencies from `style` and `webrender`, but they will be removed soon as well. The uses of this version of `time` are replaced with `std::time` types and `time@0.3` when negative `Duration` is necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Make Crashtests with test-wait wait (#33344)Taym Haddadi2024-09-101-1/+3
| | | | | | | | | | | | | | | | | * Make Crashtests with test-wait wait Signed-off-by: Taym <haddadi.taym@gmail.com> * use Atom::from instead of the atom macro Signed-off-by: Taym <haddadi.taym@gmail.com> * Update test result expectations Signed-off-by: Taym <haddadi.taym@gmail.com> --------- Signed-off-by: Taym <haddadi.taym@gmail.com>
* script: fixed document title being set to Some("") instead of None (#33354)Ben2024-09-101-26/+30
| | | | | | | | | | | | | | | | * Fixed document title being set to "" instead of None Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Update components/script/dom/document.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Ben <bennyschulenburg@gmx.de> --------- Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> Signed-off-by: Ben <bennyschulenburg@gmx.de> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Send less title changes to the embedder (#33287)webbeef2024-09-091-3/+28
| | | | | | | | Instead of sending a title change for each incremental parsing change, we now do it when: - the element is bound to the tree. - the parser is done with the element (in pop()). - the title content changes after the parsing, eg. using document.title . Signed-off-by: webbeef <me@webbeef.org>
* Propagate `CanGc` from `Document::new()` (#33386)Andriy Sultanov2024-09-0935-338/+607
| | | | | | | | | | | | | * Add canGc as a parameter to autogenerated trait methods Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> * Propagate CanGc from Document::new() Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> --------- Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* Initial support for `<link rel="prefetch">` (#33345)Simon Wülker2024-09-091-59/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Properly store link relations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Send fetch request for prefetch links We don't actually *do* anything with the response yet (handle errors etc) but its a first step. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fire load/error events for prefetch loads Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set prefetch destination/cors setting correctly Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix ./mach test-tidy errors Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Set correct "Accept" value for prefetch requests Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec text to individual steps Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>