Implement sectionRowIndex property on <tr>.

Fixes https://github.com/servo/servo/issues/10509.
This commit is contained in:
Corey Farwell 2016-04-12 22:49:32 -04:00
parent 9fb5703c6d
commit 0ee9521848
5 changed files with 29 additions and 76 deletions

View file

@ -118,13 +118,6 @@ impl HTMLTableElement {
thead.upcast::<Node>().remove_self();
}
}
/// Determine the row index for the given `HTMLTableRowElement`.
pub fn row_index(&self, row_elem: &HTMLTableRowElement) -> Option<usize> {
self.Rows()
.elements_iter()
.position(|elem| (&elem as &Element) == row_elem.upcast::<Element>())
}
}
impl HTMLTableElementMethods for HTMLTableElement {