aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/eventtarget.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-7/+7
| | | | | | | 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 dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Change #[privatize] into #[derive(DenyPublicFields)]Anthony Ramine2017-02-151-2/+1
|
* Implement document.open and document.close (fixes #14591)Anthony Ramine2017-02-031-0/+4
|
* Inline dom::eventdispatcher into dom::eventAnthony Ramine2017-01-221-4/+3
|
* Add a permanent root to WebIDL callbacks, ensuring they are always safe to ↵Josh Matthews2017-01-131-8/+19
| | | | store.
* Privatize some items in EventTarget.Ms2ger2017-01-091-9/+9
|
* Expose CallbackObject more.Ms2ger2017-01-091-1/+1
| | | | This will make it easier to use new fields added to it.
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-5/+5
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Auto merge of #14246 - emilio:servo-url, r=SimonSapinbors-servo2016-11-171-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Urlmageddon <!-- Please describe your changes on the following line: --> Still needs a bunch of code in net to be converted in order to get more advantage of this for images and stuff, but meanwhile this should help quite a bit with #13778. Still wanted to get this in. r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14246) <!-- Reviewable:end -->
| * Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-3/+3
| |
* | script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-1/+2
|/ | | | rebase + marked the necessary new code as unsafe
* Migrate `EventTarget` event firing functions to use `Atom`s.Corey Farwell2016-11-031-6/+6
| | | | This allows us to utilize more `atom` macros.
* Remove "fire a simple event" concept, refactor event firing API.Corey Farwell2016-11-031-10/+31
| | | | | "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
|
* Issue 13363 - Step 1.2 of compiling event handlerJesse Kipp2016-10-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | When compiling event handlers, check whether scripting is enabled and early return None/null if not. https://html.spec.whatwg.org/multipage/ webappapis.html#getting-the-current-value-of-the-event-handler Issue 13363 - Fix spec for disabled scripting The original spec for this PR was bad because it depended on the DOM without scripting enabled to use Javascript to signal the test's failure, so it could never fail. Use an onerror handler on `window` where scripting is enabled, and use an invalid string of JavaScript for the handler, to detect whether or not the event handler is *really* being compiled or not. Condense tests into a single HTML file Yup, didn't even realize I could do that at the time. Remove an unnecessary test
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-3/+3
|
* Remove Reflectable::globalAnthony Ramine2016-10-061-4/+2
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-2/+1
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+2
|
* Invert conditional and return early for AddEventListener/RemoveEventListenerStephen Lester2016-10-051-26/+30
|
* Return an enum instead of a boolean from dispatch_eventAdolfo Ochagavía2016-09-261-4/+7
| | | | Fixes #13196
* Dispatch error events at the window object.Ms2ger2016-09-021-1/+2
|
* Remove the JSAutoCompartment from report_pending_exception.Ms2ger2016-08-261-1/+2
| | | | It doesn't really belong there.
* Switch to using the new rooted!/RootedGuard API for rooting.Eduard Burtescu2016-07-041-7/+7
|
* Make report_pending_exception unsafeAnthony Ramine2016-06-071-1/+3
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* dom: Add missing event handlersPiotr Stankiewicz2016-05-201-2/+42
| | | | | | | | | | Adding: * global event handlers, * window event handlers, * document and element handlers, * and support for BeforeUnloadEvent. Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
* Remove the custom PartialEq implementations on TypeId enumsAnthony Ramine2016-05-171-38/+2
| | | | https://github.com/rust-lang/rust/pull/33593 made them useless.
* Stop using JSAutoRequest.Ms2ger2016-05-131-3/+1
|