Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement synchronous about:blank loading. #13996
Conversation
highfive
commented
Oct 31, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 31, 2016
|
@bors-servo try |
|
|
highfive
commented
Oct 31, 2016
|
|
r? @jdm |
| assert!(self.nested_browsing_context.get().is_none()); | ||
| // Synchronously create a new context and navigate it to about:blank. | ||
| let url = Url::parse("about:blank").unwrap(); | ||
| // TODO - loaddata here should have referrer info (not None, None) |
This comment has been minimized.
This comment has been minimized.
| pub fn window_for_pipeline(pipeline: PipelineId) -> Root<Window> { | ||
| SCRIPT_THREAD_ROOT.with(|root| { | ||
| let script_thread = unsafe { &*root.get().unwrap() }; | ||
| let page = script_thread.find_child_context(pipeline).unwrap(); |
This comment has been minimized.
This comment has been minimized.
| impl Runnable for IframeLoadEventSteps { | ||
| fn handler(self: Box<IframeLoadEventSteps>) { | ||
| let this = self.frame_element.root(); | ||
| this.iframe_load_event_steps(this.pipeline_id().unwrap()); |
This comment has been minimized.
This comment has been minimized.
jdm
Oct 31, 2016
Member
Perhaps the pipeline id should be stored in the runnable, to avoid problems with initiating multiple loads for an iframe?
This comment has been minimized.
This comment has been minimized.
Ms2ger
Nov 2, 2016
Author
Contributor
I have no idea why that method even takes a pipeline id; all it does is compare it to self.pipeline_id().unwrap().
This comment has been minimized.
This comment has been minimized.
jdm
Nov 24, 2016
Member
It's to determine if the load event is relevant to the current iframe contents. As written, this is redundant; we should store the pipeline that was in use when the runnable was created instead.
| fn process_the_iframe_attributes(&self, mode: ProcessingMode) { | ||
| // TODO: srcdoc | ||
|
|
||
| if mode == ProcessingMode::FirstTime && !self.upcast::<Element>().has_attribute(&atom!("src")) { |
This comment has been minimized.
This comment has been minimized.
| @@ -73,6 +83,7 @@ pub struct HTMLIFrameElement { | |||
| sandbox_allowance: Cell<Option<SandboxAllowance>>, | |||
| load_blocker: DOMRefCell<Option<LoadBlocker>>, | |||
| visibility: Cell<bool>, | |||
| nested_browsing_context: MutNullableHeap<JS<BrowsingContext>>, | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 31, 2016
Member
It's not clear to me what the purpose of this is, except for asserting that it doesn't exist in create_nested_browsing_context.
| @@ -277,7 +277,9 @@ impl LayoutThreadFactory for LayoutThread { | |||
| layout.start(); | |||
| }, reporter_name, sender, Msg::CollectReports); | |||
| } | |||
| let _ = content_process_shutdown_chan.send(()); | |||
| if let Some(content_process_shutdown_chan) = content_process_shutdown_chan { | |||
This comment has been minimized.
This comment has been minimized.
jdm
Oct 31, 2016
Member
It's not clear to me what the effect of this change is. Why is it ok to not have one for about:blank layout threads?
This comment has been minimized.
This comment has been minimized.
Ms2ger
Nov 2, 2016
Author
Contributor
We only listen on the receiver if we spawned a new script thread (or process) for the new pipeline; about:blank always lives in its parent's script thread. I could create a channel and immediately drop the receiver, but that seemed pointless.
|
|
|
@bors-servo try |
Implement synchronous about:blank loading. Based on initial work by jdm in <#8600>. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13996) <!-- Reviewable:end -->
|
|
|
I'm going to delay reviewing the newest changes until the tests pass. |
|
|
|
@bors-servo retry |
|
|
|
|
|
@bors-servo retry |
|
|
|
|
|
@bors-servo retry |
|
|
|
|
|
Another collection of intermittents, sigh:
|
|
Let's see how intermittent @bors-servo retry |
Implement synchronous about:blank loading. Based on initial work by jdm in <#8600>. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13996) <!-- Reviewable:end -->
|
|
|
@Ms2ger must have the magic touch. |
Ms2ger commentedOct 31, 2016
•
edited by larsbergstrom
Based on initial work by jdm in #8600.
This change is