aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorGregory Terzian <gterzian@users.noreply.github.com>2019-09-05 16:12:52 +0800
committerGregory Terzian <gterzian@users.noreply.github.com>2019-09-22 12:46:40 +0800
commit45ec250b0a989643865880734ff898de4b15bd7d (patch)
tree361580237392c5e1aecafd722f9de3265736e702 /components/script/dom/htmliframeelement.rs
parent4fe8238b14d535f7ca94a36effda06624b73ecbe (diff)
downloadservo-45ec250b0a989643865880734ff898de4b15bd7d.tar.gz
servo-45ec250b0a989643865880734ff898de4b15bd7d.zip
improve spec compliance of discarding BCs
do not handle compositor input events when BC is being discarded prevent firing of timers for discarded BCs return null for opener is BC has been discarded bundle discard BC steps into window method return null in window.opener, if BC has already been discarded move the window closed check pre-event to script-thread
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index a3a246c4edc..f5a820458c2 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -668,15 +668,14 @@ impl VirtualMethods for HTMLIFrameElement {
// so we need to discard the browsing contexts now, rather than
// when the `PipelineExit` message arrives.
for exited_pipeline_id in exited_pipeline_ids {
+ // https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded
if let Some(exited_document) = ScriptThread::find_document(exited_pipeline_id) {
debug!(
"Discarding browsing context for pipeline {}",
exited_pipeline_id
);
- exited_document
- .window()
- .window_proxy()
- .discard_browsing_context();
+ let exited_window = exited_document.window();
+ exited_window.discard_browsing_context();
for exited_iframe in exited_document.iter_iframes() {
debug!("Discarding nested browsing context");
exited_iframe.destroy_nested_browsing_context();