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

@ -959,7 +959,10 @@ impl Stylist {
if pseudo_element.is_none() && !only_default_rules {
// Step 2: Presentational hints.
let length_before_preshints = applicable_declarations.len();
element.synthesize_presentational_hints_for_legacy_attributes(applicable_declarations);
element.synthesize_presentational_hints_for_legacy_attributes(
context.visited_handling,
applicable_declarations
);
if applicable_declarations.len() != length_before_preshints {
if cfg!(debug_assertions) {
for declaration in &applicable_declarations[length_before_preshints..] {