Don't match native anonymous content to user/author rules.

This commit is contained in:
Cameron McCormack 2016-11-24 10:18:20 +08:00
parent 210b1be1d0
commit 22b62e0913
5 changed files with 83 additions and 60 deletions

View file

@ -106,6 +106,7 @@ pub enum CacheMiss {
LocalName,
Namespace,
Link,
UserAndAuthorRules,
State,
IdAttr,
StyleAttr,
@ -143,6 +144,10 @@ fn element_matches_candidate<E: TElement>(element: &E,
miss!(Link)
}
if element.matches_user_and_author_rules() != candidate_element.matches_user_and_author_rules() {
miss!(UserAndAuthorRules)
}
if element.get_state() != candidate_element.get_state() {
miss!(State)
}