Pull decls from Gecko for link preshints

Based on a link's active state and the visited handling mode, pull in link,
vlink, and alink preshint declaration blocks from Gecko as needed.

MozReview-Commit-ID: A6udMYbzQnK
This commit is contained in:
J. Ryan Stinnett 2017-06-01 13:37:54 -05:00
parent fa158a78b6
commit 56b44d2709
5 changed files with 59 additions and 10 deletions

View file

@ -14,7 +14,7 @@ use dom::{TElement, SendElement};
use matching::{ChildCascadeRequirement, MatchMethods};
use properties::ComputedValues;
use selectors::bloom::BloomFilter;
use selectors::matching::{ElementSelectorFlags, StyleRelations};
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode, StyleRelations};
use smallvec::SmallVec;
use std::mem;
use std::ops::Deref;
@ -66,7 +66,10 @@ impl ValidationData {
{
if self.pres_hints.is_none() {
let mut pres_hints = SmallVec::new();
element.synthesize_presentational_hints_for_legacy_attributes(&mut pres_hints);
element.synthesize_presentational_hints_for_legacy_attributes(
VisitedHandlingMode::AllLinksUnvisited,
&mut pres_hints
);
self.pres_hints = Some(pres_hints);
}
&*self.pres_hints.as_ref().unwrap()