mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Check for empty when determining what selectors to use for revalidation.
This commit is contained in:
parent
065f50014f
commit
6515f78f6d
3 changed files with 38 additions and 29 deletions
|
@ -154,9 +154,7 @@ fn element_matches_candidate<E: TElement>(element: &E,
|
|||
miss!(PresHints)
|
||||
}
|
||||
|
||||
if !match_same_sibling_affecting_rules(element,
|
||||
candidate_element,
|
||||
shared_context) {
|
||||
if !revalidate(element, candidate_element, shared_context) {
|
||||
miss!(SiblingRules)
|
||||
}
|
||||
|
||||
|
@ -212,10 +210,10 @@ fn match_same_style_affecting_attributes_rules<E: TElement>(element: &E,
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn match_same_sibling_affecting_rules<E: TElement>(element: &E,
|
||||
candidate: &E,
|
||||
ctx: &SharedStyleContext) -> bool {
|
||||
ctx.stylist.match_same_sibling_affecting_rules(element, candidate)
|
||||
fn revalidate<E: TElement>(element: &E,
|
||||
candidate: &E,
|
||||
ctx: &SharedStyleContext) -> bool {
|
||||
ctx.stylist.revalidate_entry_for_cache(element, candidate)
|
||||
}
|
||||
|
||||
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue