Eduard Burtescu
0db1faf876
Switch to using the new rooted!/RootedGuard API for rooting.
2016-07-04 20:59:01 +03:00
Anthony Ramine
27620320f3
Make report_pending_exception unsafe
2016-06-07 00:26:49 +02:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Piotr Stankiewicz
d1af39c114
dom: Add missing event handlers
...
Adding:
* global event handlers,
* window event handlers,
* document and element handlers,
* and support for BeforeUnloadEvent.
Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
2016-05-20 18:25:13 +01:00
Anthony Ramine
60aaac5175
Remove the custom PartialEq implementations on TypeId enums
...
https://github.com/rust-lang/rust/pull/33593 made them useless.
2016-05-17 15:30:14 +02:00
Ms2ger
735480c184
Stop using JSAutoRequest.
2016-05-13 15:34:38 +02:00
Simon Sapin
7932ab6ac2
Upgrade to rust-url 1.0 and hyper 0.9
2016-04-23 20:27:58 +02:00
Arpad Borsos
c880c97b1b
rename deprecated utf16_units to encode_utf16
2016-03-07 16:14:04 +01:00
Anthony Ramine
4d2587d6c3
Rename various bindings in event dispatching
2016-02-29 10:42:06 +01:00
Anthony Ramine
fc2cf31d5a
Return a Vec from EventTarget::get_listeners_for
2016-02-29 10:42:02 +01:00
Anthony Ramine
590316a468
Merge EventTarget::{get_listeners, get_listeners_for}
2016-02-29 10:41:57 +01:00
João Oliveira
b60d668908
use return value of invoking event handlers to cancel the event
2016-02-26 10:17:57 -05:00
Anthony Ramine
0adfb08089
Implement From<DOMString> for Atom
2016-02-24 17:52:17 +01:00
Anthony Ramine
25ae4ed093
Use atom!("error") in EventTarget::get_compiled_event_handler
2016-02-24 17:52:14 +01:00
bors-servo
0209d42b7b
Auto merge of #9701 - Ms2ger:listener-is-some, r=KiChjang
...
Use if-let in set_inline_event_listener.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9701 )
<!-- Reviewable:end -->
2016-02-19 21:34:22 +05:30
Josh Matthews
2796a4dfa8
Compile raw inline event handlers lazily. Resolves #8489 .
2016-02-11 15:44:52 +01:00
Ms2ger
1b50023a08
Use if-let in set_inline_event_listener.
2016-02-11 15:14:19 +01:00
Ms2ger
5317af1e19
Remove the global argument to EventTarget::{fire_event, fire_simple_event}.
2016-02-08 19:21:56 +01:00
Alexander Lopatin
2be49404be
Fix #9508 : Beautify our union enums constructors
2016-02-07 02:55:21 +03:00
bors-servo
87aaa5ffe0
Auto merge of #9523 - ruud-v-a:hasher, r=Wafflespeanut
...
Upgrade to new Hasher API
This fixes #9494 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9523 )
<!-- Reviewable:end -->
2016-02-05 07:32:13 +05:30
Anthony Ramine
cb5cd8d881
Say farewell to in-tree HeapSizeOf
2016-02-04 22:03:32 +01:00
Ruud van Asseldonk
95be0b9a25
Upgrade to new Hasher API
2016-02-03 20:06:39 +01:00
Chad Kimes
ce6075825d
Add global default method for Reflectable trait
2016-01-11 20:23:47 -05:00
Keith Yeung
c3f73b36e1
Fix documentation links for EventTarget
2016-01-09 06:33:36 -05:00
Brandon Fairchild
fb0304cfdb
Rename fire_simple_event_params to fire_event
...
Fixes #9180 .
2016-01-07 13:49:49 -05:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01:00
Arthur Skobara
d38771e270
Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params
2015-12-22 13:47:57 +06:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
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.
2015-11-25 10:13:21 -06:00
Josh Matthews
2340583e56
Differentiate between error and non-error event handlers per the spec.
2015-11-12 16:21:24 -05:00
rohan.prinja
6e774ea6eb
merge from master
2015-11-03 19:01:23 +09:00
David Zbarsky
0070adb71f
Use an Atom for Event.type
2015-11-01 09:42:11 -08:00
rohan.prinja
51df8e310b
rearrange imports to be in alphabetical order
2015-10-30 20:28:59 +09:00
rohan.prinja
9fd823e449
replace InheritTypes imports with inheritance imports
2015-10-30 20:26:30 +09:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Adam Szopa
88991013ab
Remove explicit lifetimes which can be elided.
2015-10-21 01:27:48 +02:00
Michael Wu
e733a7c46a
Support the updated spidermonkey bindings
2015-10-14 15:30:52 -04:00
Anthony Ramine
aab2c40389
Generate the TypeId enums in codegen
2015-10-14 18:45:35 +02:00
Anthony Urena
ba86131cd5
Refactor Error enum usage to consistently be qualified
2015-10-06 05:43:52 -04:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Anthony Ramine
c25085f68a
Introduce [Abstract] to mark non-leaf interfaces
...
Some interfaces like Node, CharacterData and HTMLTableCellElement are never
instantiated directly, only their descendant interfaces are. Those are marked
with [Abstract] to set their type_id to None instead of having dummy values
in the TypeId enums.
2015-09-13 19:46:28 +02:00
Michael Wu
941f7dc04b
Move EventTargetTypeId/NodeTypeId to DOMClass
2015-09-12 01:09:46 +02:00
Manish Goregaokar
54c036cd66
Elide most 'a lifetimes
2015-09-04 08:55:51 +05:30
Corey Farwell
5ccb0d43ef
Merge adjacent identical impl
sections
...
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Manish Goregaokar
b33c5427bc
Remove doublepointer in VirtualMethods, and from_borrowed_ref
...
Most of the heavy lifting done by:
```
$ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}'
$ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}"
```
2015-08-27 02:14:48 +05:30
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
bors-servo
ff6a70fad3
Auto merge of #7241 - Wafflespeanut:event_handler, r=Ms2ger
...
Matching over event listeners and handlers; r=Ms2ger
... for #7065
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7241 )
<!-- Reviewable:end -->
2015-08-18 06:49:26 -06:00