Make nested browsing context navigations check the loaded status of the active document of the nested browsing context.

This commit is contained in:
Josh Matthews 2019-03-07 18:59:57 -05:00
parent edfd15c36f
commit c2ce7d72a1
8 changed files with 99 additions and 5 deletions

View file

@ -37,6 +37,7 @@ impl JointSessionHistory {
}
pub fn push_diff(&mut self, diff: SessionHistoryDiff) -> Vec<SessionHistoryDiff> {
debug!("pushing a past entry; removing future");
self.past.push(diff);
mem::replace(&mut self.future, vec![])
}
@ -85,6 +86,7 @@ impl JointSessionHistory {
}
pub fn remove_entries_for_browsing_context(&mut self, context_id: BrowsingContextId) {
debug!("removing entries for context {}", context_id);
self.past.retain(|diff| match diff {
SessionHistoryDiff::BrowsingContextDiff {
browsing_context_id,