aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* add CanGc as argument to methods in HTMLInputElement, HTMLLinkElement (#36504)Yerkebulan Tulibergenov13 days1-15/+12
| | | | | | | | add CanGc as argument to methods in HTMLInputElement, HTMLLinkElement Testing: These changes do not require tests because they are a refactor. Addresses part of https://github.com/servo/servo/issues/34573. Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* textinput: position the caret at the end when selecting input (#36478)webbeef2025-04-111-6/+12
| | | | | | | | | | | When clicking on a text input element, we currently position the caret at the very beginning, even if there is already text present. That makes is annoying when you want to add text, and doesn't match what other browsers do. Instead, this change positions the caret at the end of the current text. Testing: Not covered by any wpt tests (rightly so I think). Signed-off-by: webbeef <me@webbeef.org>
* Fix radio group validity update when removing or selecting an input (#36252)elomscansio2025-04-061-33/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes an issue where radio inputs in the same group failed to correctly update their `validity.valueMissing` state when: - A **checked radio button was removed** from the DOM. - A **different radio button was selected** by user interaction. This behavior caused mismatches with how browsers like Firefox handle radio group validation. --- ### Changes in This PR #### Radio group revalidation on DOM removal - Updated `unbind_from_tree()` to revalidate other radio buttons in the same group when a checked input is removed. - Uses `UnbindContext::parent` as the DOM root to ensure the correct context is used during traversal. #### New helper: `find_related_radios()` - Encapsulates logic for finding other inputs in the same group. - Used during both removal and attribute changes for consistency. #### Validation on `checked`/`value` updates - Introduced `update_related_validity_states()` to revalidate all group members when a radio's `checked` or `value` is changed. #### Web Platform Test (WPT) coverage - Created a new WPT file: `radio-group-valueMissing.html`. - Tests follow recommended `test()` pattern: - **Precondition**: Assert initial `valueMissing`. - **Action**: Remove or select a radio. - **Postcondition**: Assert expected `valueMissing`. #### Manifest updated - The WPT manifest now includes the new test. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #36110 <!-- Either: --> - [X] There are tests for these changes Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
* dom: Firing "click" event as synthetic pointer event (#36274)Andrei Volykhin2025-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to specification https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-click-event "Firing a click event at target means firing a synthetic pointer event named click at target" So need to replace synthetic mouse event with "click" type to pointer event. https://w3c.github.io/pointerevents/#the-click-auxclick-and-contextmenu-events https://www.w3.org/TR/uievents/#event-type-click Firing "click" event could be triggered from script or by UA: - element.click() (https://html.spec.whatwg.org/multipage/interaction.html#dom-click) - form implicit submission (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission) - keyboard activation (space) --- - [x] ./mach build -d does not report any errors - [x] ./mach test-tidy does not report any errors - [x] There are tests for these changes tests/wpt/tests/shadow-dom/event-composed.html tests/wpt/tests/uievents/interface/click-event.htm Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
* script: Use `RegExpFlag_UnicodeSets` when validating regular expressions in ↵MDCODE2472025-04-011-3/+3
| | | | | | | | | | | | | | | `HTMLInputElement` (#36236) Changed `RegExpFlag_Unicode` to `RegExpFlag_UnicodeSets` in all instances. Testing: Ran `./mach test-wpt tests/wpt/tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html` and all tests passed successfully. Fixes: #36075 --------- Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com>
* resolve issue #36074 new_js_regex and matches_js_regex need a CanGc argument ↵Kunga Derick Abongho2025-03-291-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#36111) * new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * edit Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> --------- Signed-off-by: dericko681 <abonghoderick@gmail.com>
* fix: prevent missing value error for radio button inputs without a name (#36197)Barigbue Nbira2025-03-281-0/+3
| | | Signed-off-by: Barigbue <barigbuenbira@gmail.com>
* Start implementing the `URLPattern` API (#36144)Simon Wülker2025-03-271-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start working on a basic URLPattern implementation This is API part of Interop 2025, so we should definitely support it! This change implements the basic workflow for parsing and compiling URL patterns. Parts of it are stubbed out and will be implemented later. For now the API is preference-gated behind "dom_urlpattern_enabled". Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Preference-gate the URLPattern API Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix full wildcard value (Should be ".*" not "*") Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* fix: radio input element don't trigger validity state (#36103)Jerens Lensun2025-03-231-2/+4
| | | Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
* Use explicit reborrows with mozjs::MutableHandle (#35892)Greg Morenz2025-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | * Explicitly reborrow MutableHandles Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Unify jsapi_wrappers Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Format mozjs changes Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> * Update mozjs version Signed-off-by: Greg Morenz <greg-morenz@droid.cafe> --------- Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Fix form validation for readonly inputs and update WPT expectations (#36090)elomscansio2025-03-221-19/+1
| | | | | | | | | | | | | | | | | | | The HTML specification states that an input element with the `readonly` attribute must be barred from constraint validation. Our implementation previously included an extra check (`does_readonly_apply()`) to verify if `readonly` applies to the input type, which is unnecessary. This caused three test failures in: tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini - Removed `does_readonly_apply()` as it is not required for validation. - Removed `tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini` since the test now passes. To update the Web Platform Test expectations, see: https://book.servo.org/hacking/testing.html#updating-web-platform-test-expectations Fixes servo/servo#36076 Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
* Use new stylo crate renames (#35898)Nico Burns2025-03-121-2/+2
| | | Signed-off-by: Nico Burns <nico@nicoburns.com>
* feat: display file chosen for input file (#35789)DK Liao2025-03-101-3/+26
| | | Signed-off-by: DK Liao <dklassic@gmail.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-13/+9
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update to rust 1.85 (#35628)Simon Wülker2025-02-241-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Update to rust 1.85 This is needed for cargo-deny Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Upgrade crown Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Clippy fixes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Re-upgrade cargo-deny to 0.18 Keeping it locked to 0.18 just in case they update their required rustc version again Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* refactor: propagate CanGc arguments through callers (#35591)Auguste Baum2025-02-231-0/+1
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-4/+4
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* feat: support pre-edit text display for IME (#35535)DK Liao2025-02-191-2/+6
| | | | | | | | | | | | | * feat: support pre-edit text display for IME Signed-off-by: DK Liao <dklassic@gmail.com> * enable ime by show_ime Signed-off-by: DK Liao <dklassic@gmail.com> --------- Signed-off-by: DK Liao <dklassic@gmail.com>
* deps: Upgrade to `webrender@0.66` (#35325)Martin Robinson2025-02-071-1/+1
| | | | | | | | | In addition to some small API changes, this downstream version of WebRender no longer depends on a very old version of time. This is the last step toward removing the dependency on `time0.1`. The review for this commit should also include: https://github.com/servo/webrender/commit/9f552bebab81a73e62068c42d94be2f9c0586ce4 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* servoshell: Migrate to egui-file-dialog from tinyfiledialogs (#34823)chickenleaf2025-02-041-3/+10
| | | | | | This is the first step toward completely replacing tinyfiledialogs with an egui-based solution. Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Move various reflector types and traits to script_bindings (#35279)Josh Matthews2025-02-041-1/+1
| | | | | | | | | | | | | * script: Move Reflector to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Include `WebViewId` into EmbedderMsg variants where possible (#35211)Delan Azabani2025-01-301-6/+12
| | | | | | | | | | | | | | | | | `EmbedderMsg` was previously paired with an implicit `Option<WebViewId>`, even though almost all variants were either always `Some` or always `None`, depending on whether there was a `WebView involved. This patch adds the `WebViewId` to as many `EmbedderMsg` variants as possible, so we can call their associated `WebView` delegate methods without needing to check and unwrap the `Option`. In many cases, this required more changes to plumb through the `WebViewId`. Notably, all `Request`s now explicitly need a `WebView` or not, in order to ensure that it is passed when appropriate. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-2/+2
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Implement Clipboard Event Api (#33576)Gae242025-01-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement ClipboardEvent interface Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * draft implementation of clipboard events Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * handle received clipboard events inside html elemtents Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * use rustdoc style Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * fix compilation errors due to rebase Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * update arboard crate Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * improve paste events Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * code cleanup revert arboard crate's update, handle text only Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * restrict visibility of some methods to script crate Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * propagate CanGc argument Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * simplify handle_clipboard_msg Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * remove code duplication Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * fix potential borrow hazard Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * add clipboard_event pref, restore unit test code Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * retrict visibility of some document's methods Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * check if clipboardevent is trusted Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * enable clipboardevent Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * fix compilation for egl ports Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Remove incorrect TODO comment in htmlinputelement.rs (#34970)Simon Wülker2025-01-131-1/+46
| | | | | | | | | | | | | | | | | | | | | | | * Add doc comments to InputType Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add doc comment to HtmlInputElement::checked_changed Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove incorrect TODO comment The comment indicated that we should fire a change event at a radio input when changed the checkedness. This is incorrect, as events should only be fired as part of the input element's activation behaviour. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* script: Expose `NodeTraits::owner_global` / `Window::as_global_scope` (#34843)Martin Robinson2025-01-071-3/+3
| | | | | | | | | | | 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>
* 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>
* script: Move `TaskManager` to `GlobalScope` (#34827)Martin Robinson2025-01-041-3/+1
| | | | | | | | | | | | | | | | | | | | 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>
* script: Expose node helpers as `NodeTraits` and give more descriptive names ↵Martin Robinson2025-01-031-11/+10
| | | | | | | | | | | | | (#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-031-1/+1
| | | | | | | | | 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>
* Differentiate between missing/invalid value in `make_enumerated_getter!` ↵Simon Wülker2024-11-281-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#34412) * Create spec-compliant version of create_enumerated_getter Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Use new make_enumerated_getter! macro everywhere Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Remove old make_enumerated_getter macro Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Return lowercased value from make_enumerated_getter macro 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>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. 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>
* fix: allow form submission for input [type=image] (#34203)shanehandley2024-11-141-23/+51
| | | | | | | | | | | | | * fix: allow form submission for input [type=image] Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fix comments and use existing can_gc where available Signed-off-by: Shane Handley <shanehandley@fastmail.com> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Cleanup: Remove reference to closed issue 7193 (#34039)Wulan Seruniati Salim2024-10-281-1/+1
| | | Signed-off-by: Wulan Seruniati Salim <wulanseruniati@gmail.com>
* cangc fixes in node.rs (#33984)chickenleaf2024-10-231-20/+28
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes from eventtarget.rs (#33973)tanishka2024-10-221-7/+7
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes in several files (#33958)chickenleaf2024-10-211-6/+6
| | | | | | | | | | | | | * 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>
* CanGc changes from fontfaceset.rs (#33920)chickenleaf2024-10-211-1/+5
| | | | | | | | | | | | | | | | * 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>
* Multiple CanGc fixes in components/script/dom (#33924)tanishka2024-10-201-2/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)tanishka2024-10-201-3/+3
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes in components/script/dom (#33880)tanishka2024-10-171-4/+9
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-161-1/+1
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Use `time@0.3` for input elements and do conversion in a &str trait ↵Martin Robinson2024-09-091-151/+127
| | | | | | | | | | | | | | | | | (#33355) This changes converts all input element parsing and normalization to use `time` instead of `chrono`. `time` is used by our dependencies, so it makes sense to work toward removing the Servo dependency on chrono. In addition, parsing and normalization also moves to a trait on &str to prepare for the possibility of all script parsers moving to a separate crate that can have unit tests written against it. Code duplication is eliminated when possible and more conversion is done using integer types. These two things together mean we pass more tests now. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fix(clippy): Clippy suggestions in components/script/dom/* (#33072)Jose Monagas2024-08-151-3/+3
| | | | Signed-off-by: Jose T. Monagas <josetmonagas@proton.me> Co-authored-by: Jose T. Monagas <josetmonagas@proton.me>
* Upgrade stylo to 2024-07-16 (#32812)Martin Robinson2024-07-241-1/+1
| | | | | | | | | | | | | | * Upgrade stylo to 2024-07-16 Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Use the new `dom` crate from stylo Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* [clippy] Rename enum FormSubmitter and its elements (#32791)Danila Matveev2024-07-171-5/+5
| | | | | | | | | | | | | * [clippy] Renames enum FormSubmitter and its elements Signed-off-by: Danila Matveev <usurname.r@gmail.com> * fmt Signed-off-by: Danila Matveev <usurname.r@gmail.com> --------- Signed-off-by: Danila Matveev <usurname.r@gmail.com>
* clippy: Fix a bunch of warnings in `script` (#32680)Martin Robinson2024-07-041-9/+10
| | | This is just a portion of the errors that are remaining to be fixed.
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* fix: Implement additional logic in ↵shanehandley2024-05-131-1/+7
| | | | DOMString::set_best_representation_of_the_floating_point_number in order to correct some failing tests related to -0 values. (#32272)