auto merge of #2482 : Ms2ger/servo/rev_iter, r=jdm

This commit is contained in:
bors-servo 2014-05-23 19:22:31 -04:00
commit 2545647ceb
2 changed files with 3 additions and 3 deletions

View file

@ -854,7 +854,7 @@ impl LayoutTask {
for item in iterator {
match *item {
ClipDisplayItemClass(ref cc) => {
mouse_over_test(x, y, cc.children.list.rev_iter(), result);
mouse_over_test(x, y, cc.children.list.iter().rev(), result);
}
_ => {
let bounds = item.bounds();
@ -881,7 +881,7 @@ impl LayoutTask {
Some(ref display_list) => {
mouse_over_test(x,
y,
display_list.list.rev_iter(),
display_list.list.iter().rev(),
&mut mouse_over_list);
}
};

View file

@ -43,7 +43,7 @@ pub fn dispatch_event<'a, 'b>(target: &JSRef<'a, EventTarget>,
//FIXME: The "callback this value" should be currentTarget
/* capturing */
for cur_target in chain.as_slice().rev_iter() {
for cur_target in chain.as_slice().iter().rev() {
let stopped = match cur_target.get_listeners_for(type_, Capturing) {
Some(listeners) => {
event.current_target.assign(Some(cur_target.deref().clone()));