mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Remove entries for removed iframes
Notify history changed after a navigation Add history drop test
This commit is contained in:
parent
ae117be752
commit
787ec4b209
5 changed files with 64 additions and 4 deletions
|
@ -42,6 +42,15 @@ impl JointSessionHistory {
|
|||
diff.replace(&old_reloader, &new_reloader);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_entries_for_browsing_context(&mut self, context_id: BrowsingContextId) {
|
||||
self.past.retain(|&SessionHistoryDiff::BrowsingContextDiff { browsing_context_id, .. }| {
|
||||
browsing_context_id != context_id
|
||||
});
|
||||
self.future.retain(|&SessionHistoryDiff::BrowsingContextDiff { browsing_context_id, .. }| {
|
||||
browsing_context_id != context_id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a pending change in a session history, that will be applied
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue