Implement an nth-index cache.

MozReview-Commit-ID: Ee0um3QXkxl
This commit is contained in:
Bobby Holley 2017-09-20 13:13:24 -07:00
parent 29517d553e
commit 438740b912
13 changed files with 164 additions and 40 deletions

View file

@ -2500,6 +2500,10 @@ impl VirtualMethods for Element {
impl<'a> ::selectors::Element for Root<Element> {
type Impl = SelectorImpl;
fn opaque(&self) -> ::selectors::OpaqueElement {
::selectors::OpaqueElement::new(self.reflector().get_jsobject().get())
}
fn parent_element(&self) -> Option<Root<Element>> {
self.upcast::<Node>().GetParentElement()
}