aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/task_source/history_traversal.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Update crossbeam-channel to 0.3Bastien Orivel2018-11-181-1/+1
|
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* Implement TaskSource for HistoryTraversalAgustin Chiappe Berrini2018-11-131-5/+25
| | | | | And remove the method in window that returns it, because it isn't used so far.
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-1/+1
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-2/+2
|
* Format script componentchansuke2018-09-191-1/+3
|
* Replace mpsc with crossbeam/servo channel, update ipc-channelSimon Sapin2018-09-121-1/+1
| | | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* refactors entities from script_thread into script_runtimeRahul Sharma2016-04-061-1/+2
|
* change changes effecting verbosityfaineance2016-03-271-2/+1
|
* use self.0 instead of destructing single item tuple structsfaineance2016-03-271-3/+2
|
* Add task_source directoryKeith Yeung2016-03-101-0/+21
Use DOMManipulationTaskSource whenever possible