Commit graph

211 commits

Author SHA1 Message Date
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
Josh Matthews
91278da9dd Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3 Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21 Remove all root collections. 2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b s/Unrooted/Temporary/g 2014-05-03 14:18:31 -04:00
Josh Matthews
109410900c Move all methods on T to JSRef<T> or JS<T> as appropriate. 2014-05-03 14:18:30 -04:00
Josh Matthews
7daa97c7e5 Remove abstract_self. 2014-05-03 14:18:30 -04:00
Josh Matthews
76783b029e Move WebIDL methods to traits implemented by JSRef types. 2014-05-03 14:18:30 -04:00
Josh Matthews
dfdda0098a Remove JS::get/get_mut to enforce sound rooting practices. 2014-05-03 14:18:30 -04:00
Josh Matthews
d7b96db33c Implement safe rooting strategy via Unrooted, Root, JSRef, and JS. 2014-05-03 14:18:30 -04:00
Josh Matthews
ffdc3f5b32 Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing. 2014-05-03 14:18:30 -04:00
Tetsuharu OHZEKI
78856c87a4 Remove the 'pub use self::BindingDeclarations::*;' export. 2014-05-01 18:49:16 +09:00
Ms2ger
55ed05f2c7 Use Vec for the remaining ~[T]s in script. 2014-04-28 23:06:26 +02:00
Ms2ger
674fd893cb Make simple NodeLists use Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
7346992981 Make Document::idmap store a Vec. 2014-04-28 23:06:25 +02:00
Lars Bergstrom
948daf2422 This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the
issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the
various API changes strewn throughout the libraries.
2014-04-27 15:46:12 -05:00
bors-servo
3fc2c11910 auto merge of #2209 : lpy/servo/issue2188, r=Ms2ger
see #2188
2014-04-23 03:19:23 -04:00
lpy
dfe5215b88 Implement Element.localName.(fixes #2188) 2014-04-23 11:00:03 +08:00
bors-servo
b35d830999 auto merge of #2192 : evilpie/servo/children, r=Ms2ger
Fixes #2186
2014-04-22 16:52:17 -04:00
Tom Schuster
4c057deaf9 Implement ParentNode.children for Document and Element
Also implement it for DocumentFragment
2014-04-22 22:19:52 +02:00
Sankha Narayan Guria
36bf23de20 Implement Element.prefix (Fixes #1737) 2014-04-22 00:27:06 +05:30
Manish Goregaokar
fa7bc7a686 Fix most defaultPrevented test failures (#2172) 2014-04-19 15:46:18 +05:30
Josh Matthews
742f73ded5 Add transparent Traceable and Untraceable types to aid proper rooting practices, and replace ad-hoc Untraceable structs with empty Encodable implementations. 2014-04-17 17:41:09 -04:00
Manish Goregaokar
9f617e9f0c Make register_named_element more efficient 2014-04-11 14:39:23 +05:30
Tetsuharu OHZEKI
25e6366efc Remove the needless comment for document.getElementById. 2014-04-09 03:20:47 +09:00
bors-servo
51ff762bc5 auto merge of #1917 : lpy/servo/issue1822, r=jdm
see #1822
2014-04-08 10:49:14 -04:00
lpy
50aea70f98 Make sure getElementById always returns the first element with the given ID in tree order.(fixes #1822) 2014-04-08 12:21:58 +08:00
Daniel Glazman
4b0da08573 Implement Document.createElementNS. 2014-04-07 10:20:10 +02:00
bors-servo
ef5567b585 auto merge of #1994 : hyunjunekim/servo/try, r=jdm
#1991
2014-04-04 20:01:47 -04:00
Ms2ger
fb09979502 Address review comments. 2014-04-04 21:30:33 +02:00
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
hyunjunekim
a344d465e8 documnet location 2014-04-04 21:18:30 +09:00
Tetsuharu OHZEKI
faea175505 Document::create_collection's callback should return a boolean instead of a node. (#2027) 2014-04-04 00:51:03 +09:00
bors-servo
0204745595 auto merge of #1952 : brunoabinader/servo/htmlcollection-live, r=Ms2ger
Closes #1662.

PS: Cached collections will be next step.
2014-03-26 11:46:47 -04:00
Bruno de Oliveira Abinader
990545c310 Implemented Node.adoptNode
Spec:
http://dom.spec.whatwg.org/#dom-document-adoptnode
2014-03-26 09:49:07 -04:00
Bruno de Oliveira Abinader
8a457a2caa Implemented Document.importNode
Spec:
http://dom.spec.whatwg.org/#dom-document-importnode
2014-03-26 09:49:07 -04:00