From 3090505fd484c661a30a3526c8f5ccb53a48fba9 Mon Sep 17 00:00:00 2001 From: yvt Date: Mon, 2 Aug 2021 00:27:50 +0900 Subject: refactor(script): `navigate_or_reload_child_browsing_context` should only handle cases involving navigation The initial document creation does not involve navigation, and it would cause a confusion if this was done by a function which has `navigation` in its name. This commit renames `navigate_or_reload_child_browsing_ context` to `start_new_pipeline`, and introduces a new function which has the original name and is dedicated to handle navigation. --- components/script/script_thread.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'components/script/script_thread.rs') diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index c1161674fc2..506cd5d6bf2 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -45,7 +45,7 @@ use crate::dom::element::Element; use crate::dom::event::{Event, EventBubbles, EventCancelable}; use crate::dom::globalscope::GlobalScope; use crate::dom::htmlanchorelement::HTMLAnchorElement; -use crate::dom::htmliframeelement::{HTMLIFrameElement, NavigationType}; +use crate::dom::htmliframeelement::HTMLIFrameElement; use crate::dom::identityhub::Identities; use crate::dom::mutationobserver::MutationObserver; use crate::dom::node::{window_from_node, Node, ShadowIncluding}; @@ -3705,11 +3705,7 @@ impl ScriptThread { .borrow() .find_iframe(parent_pipeline_id, browsing_context_id); if let Some(iframe) = iframe { - iframe.navigate_or_reload_child_browsing_context( - load_data, - NavigationType::Regular, - replace, - ); + iframe.navigate_or_reload_child_browsing_context(load_data, replace); } } -- cgit v1.2.3