aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/focusevent.rs
Commit message (Collapse)AuthorAgeFilesLines
* dom: Set "composed" flag on construction for some event types (#36239)Andrei Volykhin2025-03-311-1/+4
| | | | | | | | | | | | | | | | | | | | "Composed" flag (https://dom.spec.whatwg.org/#composed-flag) should be properly set on event construction phase from optional "EventInit" dictionary (https://dom.spec.whatwg.org/#dom-eventinit-composed). The limited set of event types (Custom/Error/Focus/Mouse) will be affected by this CL (used in WPT tests). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are WPT shadow-dom tests which have new issues related to event "relatedTarget" property tests/wpt/tests/shadow-dom/event-composed-path-with-related-target.html tests/wpt/tests/shadow-dom/event-with-related-target.html Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* CanGc fixes from constantsourcenode.rs & window.rs (#33931)tanishka2024-10-201-0/+1
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)tanishka2024-10-201-1/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes in focusevent.rs oscillartornode.rs response.rs ↵chickenleaf2024-10-131-2/+2
| | | | | resizeobserversize.rs animationevent.rs (#33827) Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-4/+4
| | | | | | | | | | | | | | | | | * Add all constructors, special operations, and static methods to generated DOM interface traits. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move all constructors and static methods defined in bare impl blocks inside FooMethods trait impls. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add missing doc links. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-3/+9
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: Allow `too_many_arguments` for existing functions (#31974)eri2024-04-021-0/+1
| | | | | * Allow `too_many_arguments` for existing functions * fix: Surround ASCII with code block in rustdoc
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-3/+5
| | | | | * strict imports formatting * Reformat all imports
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-1/+4
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-4/+33
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-5/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-2/+2
|
* Remove most RootedReference usesAnthony Ramine2019-03-101-3/+3
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-12/+12
|
* Format script componentchansuke2018-09-191-24/+35
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Make FocusEvent::new_uninitialized take a &WindowAnthony Ramine2017-01-211-4/+3
|
* Remove HeapGCValueAnthony Ramine2016-12-121-2/+2
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Make WebIDL constructors take a more specific global if possible (fixes #14071)Rohan Prinja2016-11-301-2/+2
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+2
|
* Introduce GlobalScope::as_windowAnthony Ramine2016-10-061-1/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+3
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Implement the focusevent argument to Document::createEventSunyDays2016-04-271-0/+6
|
* implement and use From<bool> for enum and backAlexander Popiak2016-03-171-12/+4
| | | | | implement and use From<bool> for EventBubbles (and back direction) implement and use From<bool> for EventCancelable (and back direction)
* Implement focus and blur eventsPaul Rouget2016-02-181-0/+84