mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Assert we don't try to share against ourselves.
This commit is contained in:
parent
891bc7d174
commit
a5842165d9
1 changed files with 1 additions and 0 deletions
|
@ -751,6 +751,7 @@ impl<E: TElement> StyleSharingCache<E> {
|
|||
target: E,
|
||||
) -> Option<PrimaryStyle> {
|
||||
self.cache_mut().lookup(|candidate| {
|
||||
debug_assert_ne!(candidate.element, target);
|
||||
if !candidate.parent_style_identity().eq(inherited) {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue