Commit graph

246 commits

Author SHA1 Message Date
Ms2ger
f963ed99ac Rename variables that refer to global objects.
This clarifies whether those variables will point to a Window object or an
arbitrary global object.

Note in particular that all IDL Constructors will accept an arbitrary global
object.
2014-07-15 15:33:56 +02:00
Ms2ger
1d27e96eca Return slices from get_attribute_parts. 2014-07-14 18:39:02 +02:00
Ms2ger
91de702edb Merge pull request #2824 from jgraham/remove_attribute_str
Make Element.remove_attribute take &str instead of DOMString; r=Ms2ger
2014-07-13 20:18:36 +02:00
James Graham
130cf760ee Make Element.remove_attribute take &str instead of DOMString 2014-07-13 18:31:46 +01:00
Ms2ger
df4bb6947e Merge pull request #2771 from jviereck/fix_2230_link_DOMImplementation_to_document
Link DOMImplementation to the Document; r=Ms2ger
2014-07-13 17:20:25 +02:00
Julian Viereck
88b3998d59 Fix DOMImplementation should be linked to the Document
This fixes issues 2230.
2014-07-13 16:14:45 +02:00
Ms2ger
439bc78cab Return a Temporary from *Binding::Wrap.
Returning a JS<T> is GC-unsafe.

This commit also includes some cleanup around Node and Document reflection.
2014-07-10 16:45:41 +02:00
Ms2ger
bba9e58df1 Make some DOM members private.
I have not reviewed if this is the complete set of members that can be made
private.
2014-06-28 16:27:36 +02:00
Manish Goregaokar
f5b5b337d3 Upgrade to latest Rust. 2014-06-27 18:50:32 -06:00
Tetsuharu OHZEKI
975fee82da Remove needless mutabilities from script crate. 2014-06-22 21:22:58 +09:00
Ms2ger
c90a8529c5 Use internal mutability for Attr::value. 2014-06-22 20:39:21 +09:00
Manish Goregaokar
ee56b45a8c Use Traceable for primitive types and DOMString 2014-06-16 21:59:01 +05:30
bors-servo
7ed5041891 auto merge of #2649 : ebalint/servo/2580_JS_T_unrooted_replace, r=jdm
removed .clone() calls
modified from_rooted method parameter: T to &T
2014-06-13 14:33:03 -04:00
Ms2ger
e09ed14362 Remove Reflectable::mut_reflector. 2014-06-13 19:19:58 +02:00
Edit Balint
bda29ade09 Replace uses of JS<T>.unrooted() with JS::from_rooted #2580 2014-06-13 19:06:28 +02:00
bors-servo
897e39dcf3 auto merge of #2640 : Ms2ger/servo/derefmut, r=jdm 2014-06-11 17:19:51 -04:00
Ms2ger
34c42f6acb Use internal mutability for Document::idmap. 2014-06-11 22:39:52 +02:00
bors-servo
baa97fe6e5 auto merge of #2632 : brunoabinader/servo/document-queryselectorall, r=Ms2ger
Spec:
http://dom.spec.whatwg.org/#dom-parentnode-queryselectorall

Closes #851.
2014-06-11 16:05:04 -04:00
Ms2ger
23a6b6823b Use internal mutability for Document::{quirks_mode, encoding_name}. 2014-06-11 19:51:08 +02:00
Ms2ger
288e0bc877 Use internal mutability for CharacterData::data. 2014-06-11 19:51:07 +02:00
Ms2ger
d230077f9f Stop mutating Element::namespace. 2014-06-11 19:51:07 +02:00
Ms2ger
9acba1477c Use internal mutability for EventTarget. 2014-06-11 19:51:06 +02:00
Bruno de Oliveira Abinader
95dcab66b2 Implement support for ParentNode's querySelectorAll 2014-06-10 12:11:20 -04:00
Ms2ger
6308ed914c Support GlobalEventHandlers.onclick. 2014-06-08 18:50:27 +02:00
Bruno de Oliveira Abinader
249c484c24 Implement querySelector for Document 2014-06-05 16:54:26 -07:00
Bruno de Oliveira Abinader
f0aadb790d Added ParentNode.querySelector skeleton 2014-06-05 16:54:26 -07:00
Jack Moffitt
629c4c6afe Upgrade Rust. 2014-06-05 09:58:59 -06:00
Tetsuharu OHZEKI
dc0164071e Remove needless '&mut self' from DocumentMethods. 2014-06-04 00:57:23 +09:00
Tetsuharu OHZEKI
884346030c Remove needless '&mut self' from WindowMethods. 2014-06-04 00:55:23 +09:00
Ms2ger
97efd122a3 Rename BindingDeclarations to Bindings. 2014-06-02 19:48:42 +02:00
bors-servo
59cef940e8 auto merge of #2535 : saneyuki/servo/mut, r=jdm
Related #2514
2014-06-01 16:19:20 -04:00
Tetsuharu OHZEKI
3819ebb740 Remove needless '&mut self' from node.rs. 2014-06-02 04:28:04 +09:00
Tetsuharu OHZEKI
a0a0e07f71 Make Document.implementation be in a Cell. 2014-06-02 00:38:57 +09:00
Ms2ger
33e64c95d3 Include modules with only callbacks in BindingDeclarations.
This commit also includes improvements to the 'use' order in some of the
touched files.
2014-05-31 18:58:04 +02:00
Ms2ger
d896442a4a Implement Event::new_initialized and initialize the event in Event::new. 2014-05-31 10:42:21 +02:00
Josh Matthews
003e5bcd46 Port modern callback handling code from Gecko, and copy related WebIDL parser bits too. 2014-05-27 20:43:52 +02:00
Josh Matthews
2d6153772c Add stubs for inline event handler manipulation. 2014-05-27 20:43:48 +02:00
Ms2ger
d5cb4377ef Use *mut T for the T* pointers in SpiderMonkey. 2014-05-26 18:19:44 +02:00
bors-servo
c7e8e5a927 auto merge of #2374 : Manishearth/servo/customevent, r=jdm
This was previously PR'd on #2218
2014-05-23 17:28:55 -04:00
Manish Goregaokar
4c997e8934 Implement CustomEvent (#2173) 2014-05-24 02:51:22 +05:30
Tetsuharu OHZEKI
46d31632e0 Initial spec-incompliant implementation of default click action for anchor elements.
This is cherry-picked from https://github.com/mozilla/servo/pull/1688:

  * Initial spec-incompliant implementation of default click action for anchor elements.
  * Add documentation; gut the new document URL loading method
    and move it all into the new Window method.
  * Add test for default event prevention.

Original developer: Josh Matthews <josh@joshmatthews.net>
2014-05-23 23:30:09 +09:00
Ms2ger
eaedeb07cb Update Rust. 2014-05-22 16:36:40 -06:00
Tetsuharu OHZEKI
facffe0966 Move Window helper methods to a WindowHelpers trait 2014-05-14 13:14:29 +09:00
Tetsuharu OHZEKI
5f8f551c95 Add MouseEvent::new_uninitialized(). 2014-05-10 13:56:46 +09:00
Tetsuharu OHZEKI
ac288f6657 Add UIEvent::new_uninitialized(). 2014-05-10 13:55:19 +09:00
Martin Robinson
300004f3e9 Use == instead of match for tests against a single enum value
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 17:11:00 -07:00
Glenn Watson
51ef2f06ba Rename from_unrooted to from_temporary. Fixes #2332. 2014-05-07 09:25:32 +10:00
Ms2ger
0ff8610727 Reorder some comparisons to avoid allocating strings for them. 2014-05-04 10:17:06 +02:00
Ms2ger
25542e3f7e Replace most ~"string"s with "string".to_owned(). 2014-05-04 09:39:07 +02:00
Ms2ger
243814022e Replace all ~"" with "".to_owned(). 2014-05-03 22:17:45 +02:00