aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/eventtarget.rs
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-28/+30
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* No tracing of nop traceable fields (#29926)Samson2023-08-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* make the concept of has_listeners_for follow other implementations (#21044)Gregory Terzian2023-07-191-0/+2
| | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-2/+5
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-5/+5
|
* Support arbitrary protos when wrapping EventTarget objects.Josh Matthews2023-05-281-4/+4
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-7/+7
|
* Fix for loop over option warningsMichael Mc Donnell2022-11-101-2/+2
|
* Update mozjs to 0.14.1Sudarsan2020-08-281-2/+1
| | | | | | | This update pulls in improvements on mozjs that now removes the need to pass pointers to CompileOptionsWraper::new(), allows NewProxyObject to now accept a Singleton bool and JSClass and removes an unsafe Handle::new usage.
* Auto merge of #26792 - servo:static-mut, r=noxbors-servo2020-06-051-9/+3
|\ | | | | | | | | | | Replace `static mut` with `const`, `static`+`AtomicPtr`, or `static`+`UnsafeCell` Fixes https://github.com/servo/servo/issues/26550
| * Use `const` instead of `static mut` in script/dom/eventtarget.rsSimon Sapin2020-06-041-9/+3
| | | | | | | | There is no mutability there.
* | Auto merge of #26480 - CYBAI:missing-on, r=jdmbors-servo2020-06-041-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefix `on` for function name of inline events While checking what needs to be done for the spec-update, I've noticed the logic of checking `is window-reflecting element (e.g. body and frameset)` is already handled by the `is` casting function. However, we still failed to pass the tests because we're missing `on` prefix for inline functions. I'm not sure if this patch is good enough (or maybe at least I need to add a comment for why adding `on` prefix?). Besides, I checked [how Gecko handles](https://searchfox.org/mozilla-central/rev/8bc4e35c9bb47c1fe3131e6155d9f482e1efef9a/dom/events/EventListenerManager.cpp#1012-1022) and looks like they also just pass the atom directly. But, the [generated atom](https://searchfox.org/mozilla-central/source/__GENERATED__/xpcom/ds/nsGkAtomList.h#775) is prefixed with `on` which is correct to just pass it into the `CompileFunction`. --- <!-- 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 #26479 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Prefix `on` for function name of inline eventsCYBAI2020-05-101-1/+1
| |
* | dom: Implement current window event.Josh Matthews2020-05-131-0/+17
|/
* Use mozjs exposed function to generate SourceTextCYBAI2020-03-311-8/+3
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Update SpiderMonkeyAnthony Ramine2020-03-061-13/+12
|
* Always pass InRealm to GlobalScope::from_context to avoid getting null globalCYBAI2020-02-161-4/+4
|
* Event dispatch rewritten to resemble spec more often, activate on clicks betterPatrick Shaughnessy2020-02-121-12/+4
|
* Fix some of the remove-event-handler problemsPatrick Shaughnessy2020-01-301-3/+9
|
* Errors only pass the special bonus arguments to globalsPatrick Shaughnessy2020-01-271-21/+24
|
* rename compartment to realmKunal Mohan2020-01-241-1/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Scope chain is now constructedPatrick Shaughnessy2020-01-151-11/+37
|
* Add `FIXME` to the new comment asking wether code below it is rightSimon Sapin2019-12-111-1/+1
|
* Took out the special mouseover cancel casePatrick Shaughnessy2019-12-101-7/+6
|
* Modify *::get_cx methods to return a safe JSContext instead of a raw onemarmeladema2019-07-241-21/+16
|
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-1/+1
|
* Callbacks now uses safe JSContext instead of raw JSContextmarmeladema2019-07-241-7/+11
|
* Create a helper API for entering a DOM object's compartmentKamil Niski2019-06-291-1/+2
| | | | | | Revert some unnecessary changes Fix fmt errors
* Update to SpiderMonkey 66.Josh Matthews2019-05-101-6/+11
|
* Implement AddEventListenerOptions: onceBastien Orivel2018-12-221-1/+21
| | | | Fixes #13242
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-1/+1
|
* Reorder importsPyfisch2018-11-061-6/+6
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-30/+30
|
* Format script componentchansuke2018-09-191-177/+196
|
* implement "has event listener", plug into (before)unloadGregory Terzian2018-05-051-0/+15
|
* beforeunload and unload infrastructureGregory Terzian2018-05-051-10/+9
|
* Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393Marcin Mielniczuk2018-03-281-2/+3
|
* Make callbacks' new methods unsafeAnthony Ramine2018-01-251-20/+46
| | | | They take raw pointers to contexts and objects.
* Fix tyvar_behind_raw_pointer warningsSimon Sapin2018-01-101-2/+2
| | | | https://github.com/rust-lang/rust/issues/46906
* queue event instead of immediately fireddh2017-11-301-0/+11
| | | | | | created checks to see if parser is in use before event dispatch changed tests to expect crash and added async style test
* Implement EventTarget constructorMaxim Novikov2017-11-191-1/+13
| | | | Resolves #19283
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-4/+4
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Implement EventListenerOptions for EventTargetGuillaume Gomez2017-09-301-13/+74
| | | | For now, only "capture" is supported.