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

@ -76,7 +76,7 @@ use properties::animated_properties::TransitionProperty;
use properties::style_structs::Font;
use rule_tree::CascadeLevel as ServoCascadeLevel;
use selector_parser::{AttrValue, ElementExt, PseudoClassStringArg};
use selectors::Element;
use selectors::{Element, OpaqueElement};
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity, NamespaceConstraint};
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext};
use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode};
@ -1682,6 +1682,10 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> {
impl<'le> ::selectors::Element for GeckoElement<'le> {
type Impl = SelectorImpl;
fn opaque(&self) -> OpaqueElement {
OpaqueElement::new(self.0)
}
fn parent_element(&self) -> Option<Self> {
// FIXME(emilio): This will need to jump across if the parent node is a
// shadow root to get the shadow host.