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>
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.
The assert() function is no longer exposed, as it was unused and not very
useful.
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.
Under the hood, this requires treating the I Tried pipeline as a new load instead of a replacement, since the failure-handling code interacts poorly with the rest of the replacement code when we get a series of staggered failures over time from the various pipeline components.
A js::rust::Compartment is little more than a glorified pointer to the
reflector of a window, so there's no good reason to use it. Instead, this
commit passes a JS<Window> directly when it's necessary.
This also means that we now have to use JS_DefineFunctions rather than
Compartment::define_functions; I believe the former is clearer to the reader
than the extra indirection involved in the latter calling through three
reopsitories.
This commit also simplifies ScriptTask::load to reuse the 'cx' local that is
in scope already, rather than refetching it through js_info.
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
* add servo_util::task::{spawn_named,spawn_with_named} functions
* add name param for spawn_listener and spawn_conversation functions
this should resolve#1169
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.
Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.