style: Use precomputation for the -servo-details-content pseudo-element

This commit is contained in:
Emilio Cobos Álvarez 2016-04-23 01:58:51 +02:00
parent b6402a81d0
commit 3563ecb770
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 42 additions and 32 deletions

View file

@ -159,15 +159,14 @@ impl SelectorImpl for ServoSelectorImpl {
impl SelectorImplExt for ServoSelectorImpl {
type ComputedValues = ServoComputedValues;
// TODO: Making details-summary not eagerly cascaded shouldn't be difficult
#[inline]
fn is_eagerly_cascaded_pseudo_element(pseudo: &PseudoElement) -> bool {
match *pseudo {
PseudoElement::Before |
PseudoElement::After |
PseudoElement::Selection |
PseudoElement::DetailsContent |
PseudoElement::DetailsSummary => true,
PseudoElement::DetailsContent => false,
}
}