Avoid the Vec reversal in DisplayList::hit_test.

This commit is contained in:
Ms2ger 2016-06-29 09:46:45 +02:00
parent 4e8ff4f9bc
commit 6b981039d0
3 changed files with 4 additions and 5 deletions

View file

@ -1160,7 +1160,7 @@ impl LayoutThread {
.as_ref()
.expect("Tried to hit test with no display list")
.hit_test(&point, &rw_data.stacking_context_scroll_offsets);
rw_data.hit_test_response = (result.get(0).cloned(), update_cursor);
rw_data.hit_test_response = (result.last().cloned(), update_cursor);
},
ReflowQueryType::NodeGeometryQuery(node) => {
let node = unsafe { ServoLayoutNode::new(&node) };