aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/event.rs
Commit message (Collapse)AuthorAgeFilesLines
* implement historical srcElement attribute for Event interfacedrexler2019-09-051-0/+5
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-3/+8
|
* Update Event's timestampGeorge Roman2019-03-261-4/+11
|
* Simplify RootedReference and make it specifically about slicesIt's now ↵Anthony Ramine2019-03-111-1/+1
| | | | called DomSlice<T>.
* Remove most RootedReference usesAnthony Ramine2019-03-101-3/+8
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* implement historical cancelBubble attribute for Event interfaceYuki Toyoda2019-03-031-0/+12
|
* Implement historical returnValue attribute for Event interfacePatrick Ngai2019-02-281-0/+12
|
* Update bool pattern matching into if-elsePiotr Szpetkowski2019-01-301-9/+12
|
* Implement AddEventListenerOptions: onceBastien Orivel2018-12-221-1/+4
| | | | Fixes #13242
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Reorder importsPyfisch2018-11-061-1/+1
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-17/+17
|
* Format script componentchansuke2018-09-191-42/+49
|
* implement "has event listener", plug into (before)unloadGregory Terzian2018-05-051-27/+35
|
* beforeunload and unload infrastructureGregory Terzian2018-05-051-1/+8
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* 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-9/+9
| | | | | | | 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 DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Derive the Default trait for dictionaries containing GC values.Josh Matthews2017-09-251-0/+9
|
* Introduce TaskOnceAnthony Ramine2017-09-201-5/+5
| | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* Rename Task to TaskBoxAnthony Ramine2017-09-201-5/+5
|
* Move Task to its own moduleAnthony Ramine2017-09-181-1/+1
|
* Rename Runnable to TaskAnthony Ramine2017-09-161-7/+7
| | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* move name implementation as default implementation to the trait and remove ↵toidiu2017-09-031-4/+0
| | | | overrides.
* order derivable traits listsClément DAVID2017-08-231-4/+4
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Remove some convenience methods on EventAnthony Ramine2017-01-221-64/+22
| | | | They don't need to exist anymore now that dom::eventdispatcher has been removed.
* Inline dom::eventdispatcher into dom::eventAnthony Ramine2017-01-221-91/+276
|
* Change event cancellation from bool to an enumRavi Shankar2016-12-271-5/+37
|
* Remove HeapGCValueAnthony Ramine2016-12-121-3/+3
| | | | | | 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.
* remove extra clones from dom event scriptJake Goldsborough2016-11-051-2/+2
|
* Migrate `EventTarget` event firing functions to use `Atom`s.Corey Farwell2016-11-031-2/+4
| | | | This allows us to utilize more `atom` macros.
* Remove "fire a simple event" concept, refactor event firing API.Corey Farwell2016-11-031-2/+2
| | | | | "fire a simple event" concept was removed in https://github.com/whatwg/html/pull/1933.
* Update to string-cache 0.3Simon Sapin2016-11-031-1/+1
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+4
|
* Return an enum instead of a boolean from dispatch_eventAdolfo Ochagavía2016-09-261-1/+9
| | | | Fixes #13196
* Fix step 10 of eventdispatcher::dispatch_event (fixes #11609)Anthony Ramine2016-08-241-7/+16
| | | | | We consolidate steps 10-12 in a single function to expose less general-purpose mutating methods on Event.
* Add event runnablesConnor Brewster2016-07-111-2/+36
| | | | Make tasks a wrapper over runnables
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* implement and use From<bool> for enum and backAlexander Popiak2016-03-171-3/+39
| | | | | implement and use From<bool> for EventBubbles (and back direction) implement and use From<bool> for EventCancelable (and back direction)
* Implement From<DOMString> for AtomAnthony Ramine2016-02-241-2/+2
|
* Pass around event types as Atoms instead of StringsCorey Farwell2015-12-101-16/+20
| | | | | | `Event` internally stores the `type` as an `Atom`, and we're `String`s everywhere, which can cause unnecessary allocations to occur since they'll end up as `Atom`s anyways.
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.