mirror of
https://github.com/servo/servo.git
synced 2025-06-16 20:34:30 +00:00
style: Remove redundant style sharing check.
We check that a few lines before calling test_candidate.
This commit is contained in:
parent
fce44a2e13
commit
0bcd36838d
1 changed files with 2 additions and 7 deletions
|
@ -648,6 +648,8 @@ impl<E: TElement> StyleSharingCache<E> {
|
|||
nth_index_cache: &mut NthIndexCache,
|
||||
selector_flags_map: &mut SelectorFlagsMap<E>
|
||||
) -> Option<ResolvedElementStyles> {
|
||||
debug_assert!(!target.is_native_anonymous());
|
||||
|
||||
// Check that we have the same parent, or at least that the parents
|
||||
// share styles and permit sharing across their children. The latter
|
||||
// check allows us to share style between cousins if the parents
|
||||
|
@ -657,13 +659,6 @@ impl<E: TElement> StyleSharingCache<E> {
|
|||
return None;
|
||||
}
|
||||
|
||||
if target.is_native_anonymous() {
|
||||
debug_assert!(!candidate.element.is_native_anonymous(),
|
||||
"Why inserting NAC into the cache?");
|
||||
trace!("Miss: Native Anonymous Content");
|
||||
return None;
|
||||
}
|
||||
|
||||
// Note that in the XBL case, we should be able to assert that the
|
||||
// scopes are different, since two elements with different XBL bindings
|
||||
// need to necessarily have different style (and thus children of them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue