aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
Commit message (Collapse)AuthorAgeFilesLines
* add queue with sizes conceptgterzian2024-07-151-0/+6
|
* setup source container with prototype of source dictgterzian2024-07-121-1/+1
|
* add underlying source dom struct containergterzian2024-07-111-0/+11
| | | | Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* add fulfill read request, clean-up warningsgterzian2024-07-111-1/+0
| | | | Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Add remaining WebIDLs of ReadableStream (#32605)Ngo Iok Ui (Wu Yu Wei)2024-06-273-3/+104
| | | | | | * Add Reader's WebIDL files * Add necessary methods in ReadableStream.webidl
* Add QueuingStrategy and UnderlyingSource (#32572)Ngo Iok Ui (Wu Yu Wei)2024-06-246-4/+112
| | | | | --------- Co-authored-by: Jason Tsai <jason@pews.dev>
* fix: codegen on callback (#32537)Ngo Iok Ui (Wu Yu Wei)2024-06-181-0/+3
| | | | | * Fix codegen on callback * Add test callbacks to testbinding.rs
* implement basic infra for ResizeObserver (#31108)Gregory Terzian2024-06-173-0/+48
|
* webgpu: Implement device lost (#32354)Samson2024-06-171-2/+1
| | | | | | | | | | | | | * device lost promise should be init at creation of device object * device lost impl * lock for device poll workaround for wgpu deadlocks * expect * Less lost reason reasoning in script
* Update WebIDL.py (#32495)Ngo Iok Ui (Wu Yu Wei)2024-06-151-1/+1
| | | | | | | | | | | | | | | | | * Update WebIDL.py * Update WebIDL.py * Add builtin-array.patch * Fix CodegenRust.py and Configuration.py * Fix missing downcasts * mach fmt * Update check and comment to explain why we need this check * Update Global of DissimilarOriginWindow.webidl
* Implement HTMLImageElement decode (#31269)Taym Haddadi2024-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement HTMLImageElement decode Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix Decode doc link Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Temp * Decode HTML Image Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix doc link Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Move image decode to process_image_response_for_environment_change Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update some wpt test result Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Handle multiple image decode promises Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove unnecessary promise calls Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update more wpt test result Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Undo body-size-cross-origin.https.html.ini changes Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Reject decode when src and srcset are missing Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Revert "Reject decode when src and srcset are missing" This reverts commit 1b57ab978f9fc24facafc8af97ee8851d5142533. * Drain promises vec and run update_the_image_data when element is created Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * resolve decode promise in abort_request when request is CompletelyAvailable Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update wpt test Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Move storing promise in decode task Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove the resolve logic from decode task Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Revert "Remove the resolve logic from decode task" This reverts commit eee6096d50dbe46a22a5bbfd7f15c03988ed2f4b. * reject or reject current promise before storing it Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Add comment to explain why resolve promise when state is CompletelyAvailable Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* webgpu: Move errorscopes to WGPU thread (#32304)Samson2024-05-221-9/+18
| | | | | | | | | | | | | | | | | | | | | * Prepare errorscopes logic in wgpu_thread * remove scope_id from ipc * new GPUErrors per spec * remove cotent timeline error_scope * fixup poperrorscope types * device_scope -> gpu_error and nice errors * Handle errors detection more elegantly * good expectations * new expectations * Make error_scope.errors Vec as per spec
* Rename NavigationType to NavigationTimingType (#32299)shanehandley2024-05-161-12/+12
| | | | | | | | | This was renamed in the spec: https://github.com/w3c/navigation-timing/pull/172 The NavigationType enum name is now part of the navigation history apis: https://html.spec.whatwg.org/multipage/nav-history-apis.html\#navigationtype
* Implement attributes for the `<meter>` element (#32230)shanehandley2024-05-111-12/+12
| | | | | * Implement attributes for the meter element * Remove checks for min < max before clamping
* webgpu: Update to wgpu 0.20 (#32173)Samson2024-05-081-0/+1
| | | | | | | | | | | * Update wgpu to 0.20 * good expectations * Throw TypeError in configure on unsupported format instead of panic * Expect * `into_command_buffer_id`,`into_command_encoder_id`
* Revert "script: implement AbortController (#31361)" (#32243)Samson2024-05-073-31/+0
| | | This reverts commit 7fce850cffb72a6fbcf763a40164a9b35b7fa833.
* script: implement AbortController (#31361)Smitty2024-05-043-0/+31
| | | | | | | | | | | | | | | | | | | | | * Implement AbortController Signed-off-by: syvb <me@iter.ca> * Update WPT tests Signed-off-by: syvb <me@iter.ca> * Address review comments * Fix duplicate import generation * Update WPT test expectations * Change expectation to FAIL for flaky test --------- Signed-off-by: syvb <me@iter.ca>
* script: implement autofocus IDL reflection (#32170)Nolan Lawson2024-04-293-0/+22
| | | | | * script: implement autofocus IDL reflection * test: update wpt results files
* feat: implement ARIA string reflection on Element (#32080)Nolan Lawson2024-04-272-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: implement ARIA string reflection * Update components/script/dom/element.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * fix: respond to PR comments * fix: make functions non-public * fix: use proper ARIAMixin mixin * fix: tidy issues * fix: double newline at end of file * fix: move role before aria-* to match spec order * fix: fix link to spec and format as spec does * fix: delete now-passing WPT tests * fix: remove legacy-layout test --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Update wgpu to 0.19 (#31995)Samson2024-04-261-1/+1
| | | | | | | | | | | * Update wgpu to https://github.com/gfx-rs/wgpu/commit/32e70bc1635905c508d408eb1cf22b2aa062ffe1 (0.19) * Update expect only good * reexpect * remove dbg stuff * Remove all occurrences of dx11_hub
* Implement form-associated custom elements and their ElementInternals (#31980)cathiechen2024-04-112-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * FACEs work, setFormValue test is awful so now has _mozilla backup * 1. Impl Validatable in ElementInternals instead of HTMLElement. 2. Reuse the code in Validatable trait. 3. The form associated custom element is not a customized built-in element. * add some comments * support readonly attribute and complete barred from constraint validation * Addressed the code review comments * Updated the legacy-layout results * Fixed the WPT failures in ElementInternals-validation.html * Addressed the code review comments * Review suggestions * Fixed silly mistakes and update the test result outside elementinternals * update the test results --------- Co-authored-by: Patrick Shaughnessy <pshaughn@comcast.net> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Gamepad: Remove GamepadList and fix dropped connection event on startup (#31684)Daniel Adams2024-04-081-10/+0
| | | | | | | | | | | | | | | * Replace GamepadList * Fix initial gamepad connection event from gilrs getting dropped * Fix gamepad reconnection issues, use MutNullableDom * Reduce some repetition in handle_gamepad_events * Address feedback, move some steps to navigator methods * Refactor internal navigator gamepad methods * Add note re: unused gilrs index, adjust navigator gamepad methods
* webgpu: Implement onSubmittedWorkDone (#31772)Samson2024-04-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | * Implement onSubmittedWorkDone * Use rust closures for callback & actually remove entries from hashmap. * Remove hashmap * Fix warnings * Update expectations * clean flaky crashes * re * Update components/script/dom/gpuqueue.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update webidl and implement setter for the files property of a file input ↵shanehandley2024-04-011-1/+1
| | | | | | | (#31934) The files attribute was previously readonly, but was later updated to allow mutation via input.files = ... see https://github.com/whatwg/html/issues/2861
* script: Add pre element obsolete width attribute support (#31792)Bastiaan van der Plaat2024-03-251-2/+1
|
* WebIDL: Remove `JSObject` from `Document::NamedGetter` (#31841)eri2024-03-241-1/+4
| | | | | * WebIDL: Remove `JSObject` from `Document::NamedGetter` * fix: update rustdoc comment
* Implement StaticRange (#31809)cathiechen2024-03-223-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add DOM interface for AbstractRange * Add DOM interface for StaticRange * Update WPT tests for StaticRange-constructor.html * Fix formatting * Add AbstractRange & StaticRange in interfaces.html * rebased the code and fixed the failures Signed-off-by: Cathie Chen <cathiechen@igalia.com> * update the expected result in idlharness.window.js.ini file * Addressed the code review comments * updae the test result of legacy layout --------- Signed-off-by: Cathie Chen <cathiechen@igalia.com> Co-authored-by: Nipun Garg <nipung271@gmail.com>
* Implement console.count/countReset (#31635)Smitty2024-03-171-0/+4
| | | | | | | | | | | * Implement console.count/countReset * Address review comment Signed-off-by: syvb <me@iter.ca> --------- Signed-off-by: syvb <me@iter.ca>
* Implement HTMLStyleElement.disabled attribute (#31682)Oriol Brufau2024-03-141-0/+1
| | | https://html.spec.whatwg.org/multipage/#dom-style-disabled
* Gamepad: Align closer to spec and implement missing slots (#31385)Daniel Adams2024-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement missing gamepad slots, align to spec more - Fixes TODO's from initial gamepad implementation - Adds some missing spec steps * Only handle gamepad events when pref is enabled * Return empty list in getGamepads if document not active * ./mach fmt * Update getGamepads to return an array instead of GamepadList * Add spec link for [[exposed]] slot * Remove failing test expectations for not-fully-active * A few fixes - Change should_notify to has_gesture - Add spec links and TODO to navigator - Remove unneeded clone from GamepadList::list - Move gamepadconnected event firing into has_gesture block * Use queue_with_canceller for tasks and add expects * Explicitly check for gamepad user gesture * Move user gesture check into separate function * Change contains_user_gesture to be a gamepad function * mach fmt * Change axis/button threshold constants to be private to module
* Add CSSOM support for CSS layers (#31481)Oriol Brufau2024-03-033-0/+19
| | | Instead of just crashing.
* script: Implement `<meta http-equiv="refresh">` (#31468)Smitty2024-03-011-2/+2
| | | | | * script: Implement <meta http-equiv="refresh"> * Address review comments
* webaudio: Throw when setting invalid automationRate on AudioBufferSourceNode ↵Shamir Khodzha2024-02-281-1/+1
| | | | (#26469)
* layout: Add support for table rows, columns, rowgroups and colgroups (#31341)Martin Robinson2024-02-201-2/+2
| | | | | | | | | | | | | | This adds support for table rows, columns, rowgroups and colgroups. There are few additions here: 1. The createion of fragments, which allows script queries and hit testing to work properly. These fragments are empty as all cells are still direct descendants of the table fragment. 2. Properly handling size information from tracks and track groups as well as frustrating rules about reordering rowgroups. 3. Painting a background seemlessly across track groups and groups. This is a thing that isn't done in legacy layout (nor WebKit)! Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Implement non-XR Gamepad discovery and input (#31200)Daniel Adams2024-02-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create embedder event to send to constellation * Handle gamepad message in constellation, send to script thread * Handle GamepadEvent in script thread and dispatch event to document * Add missing Clones, fix event * Add gamepad task source * Adjust GamepadIndex type, remove unused imports * Add internal getter for gamepads list * Update gamepad new methods * Handle gamepad connect and disconnect events * Proto will be none, no need for HandleObject * Initialize buttons and axes to standard mapping * Adjust update type index types * Update GamepadButton update function * Adjust Gamepad mapping comments to match spec, add update logic * Amend comment * Update button and axis inputs on Updated event * Add GilRs as gamepad backend in servoshell * Add spec links, queue gamepad updates on task source * ./mach fmt * Fix comment length * Split out button init, update spec comments * Move gamepad event handling from document to global * Map and normalize axes/button values * Use std::time for gamepad timestamp * Adjust gamepad handling in event loop * Move button press/touch check into map+normalize function - Small change but is more in line with spec * ./mach fmt * Update comment spec links and warning messages * Doc comments -> regular comments * Add window event handlers for gamepad connect/disconnect * Adjust gamepad disconnect behavior * Add missing TODO's, adjust gamepad/gamepadbutton list methods and formatting * Update button handling from gilrs, add comments * Enable gamepad pref during WPT tests and update expectations * Update WPT expectations in meta-legacy-layout
* WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings (#31317)Taym Haddadi2024-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * introduce new_initialized_heap_typed_array function Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove unsed unsafe_code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use doc comments for ImageData Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use get_internal instead of acquire_data Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Handle JS errors in ImageData GetData and new_initialized_heap_typed_array Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix wrong assert that causes CRASH in test Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Early return for error Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Address review comments Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Support the parsing of image/svg+xml elements (#31318)Keith Yeung2024-02-141-2/+2
| | | | | * Support the parsing of image/svg+xml elements * Update WPT test expectations
* script: implement navigator.hardwareConcurrency (#31268)Smitty2024-02-072-0/+7
| | | Signed-off-by: syvb <me@iter.ca>
* Make console methods take `any` instead of `string` (#31241)Smitty2024-02-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make console methods use `any` for the message Match the Console spec by allowing any value to be passed to console methods, instead of just values that can be converted to a string. Signed-off-by: syvb <me@iter.ca> * Add test for console logging a Symbol Signed-off-by: syvb <me@iter.ca> * Implement object stringification for logs Signed-off-by: syvb <me@iter.ca> * Address review comments Signed-off-by: syvb <me@iter.ca> * Make time/timeEnd accept DOMString to match spec * Update WPT results for layout 2013 --------- Signed-off-by: syvb <me@iter.ca>
* canvas2d: Implement `.reset()` (#31258)Smitty2024-02-051-0/+1
| | | | | | | | | | | * Implement Canvas2D reset * Update WPT tests * Apply suggestions from code review --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Implement Event.composedPath (#31123)Taym Haddadi2024-01-231-0/+1
| | | | | | | | | | | | | | | | | | | * Implement Event.composedPath * Implement Event.composedPath Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use documentation comments for EventMethods Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update wpt test expectations Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Update WebGPU CTS (#30954)Samson2023-12-281-2/+3
| | | | | | | | | | | * Update WebGPU CTS to https://github.com/gpuweb/cts/commit/ae15a59832989c22982acaeaccdf5d379afced62 * Add internal to GPUErrorFilter to make more test work * No crash in CreateRenderBundleEncoder * getCompilationInfo * Update expectations
* Make CSSConditionRule's conditionText readonly (#30768)Oriol Brufau2023-11-231-1/+1
| | | | | | | As per https://github.com/w3c/csswg-drafts/issues/6819 This will be needed for https://phabricator.services.mozilla.com/D179060 The test was created by Mozilla, but was not correctly synced into WPT.
* Remove Servo `window.trap()` extension (#30743)Martin Robinson2023-11-171-2/+0
| | | | | This Servo-specific extension is unused by any code in the repository and removing it allows us to remove use of nightly only reliance on rust intrinsics. This is a step toward supporting stable rust.
* Clean up and merge some canvas-related WebIDLs (#30606)Ennui Langeweile2023-10-265-75/+37
| | | | | | | * Clean up and merge some canvas-related WebIDLs * Apply `./mach fmt` * WebIDL has `test-tidy` support???
* Support Namespace const in webidl (#30492)Samson2023-10-041-0/+6
| | | | | * Add TestNS with const * Implement namespace const in codegen
* Codegen support multiple interfaces in single webidl file & WebGPU single ↵Samson2023-09-3041-1325/+1171
| | | | | | | | | webidl (#30448) * Codegen support multiple interfaces in single webidl file * Merge GPU*.webidl into WebGPU.webidl * Update gpu files to use WebGPUBinding module file
* Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)Samson2023-09-144-4/+10
| | | | | | | * GPUSupportedFeatures * New supported limits * Update expectations
* Impl Setlike and Maplike (#30237)Samson2023-09-062-0/+34
| | | | | | | | | | | | | | | | | | | * MallocSizeOf for Index{Set, Map} * like as iterable in WebIDL * Codegen magic for like interfaces * TestBinding for like * Test for Setlike and Maplike test bindings * Some fixes * Switch to any.js * nit * Keep order
* Upgrade whole webgpu stack (#29795)Samson2023-08-2034-312/+519
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow noidl files in script/dom/webidls * Upgrade wgpu to 0.16 and refresh whole webgpu implementation * Update WebGPU test expectations * misc * MutNullableDom -> DomRefCell<Option<Dom for GPUTexture * Direct use of GPUTextureDescriptor * Remove config from GPUCanvasContext * misc * finally blue color * gpubuffer "handle" error * GPU object have non-null label * gpu limits and info * use buffer_size * fix warnings * Cleanup * device destroy * fallback adapter * mach update-webgpu write webgpu commit hash in file * Mising deps in CI for webgpu tests * Updated expectations * Fixups * early reject * DomRefCell<Option<Dom -> MutNullableDom for GPUTexture