Add test to constellation to avoid writing reftest image if there are pending frames.

Also change when pipelines become active.

This makes the constellation activate a pipeline as the current frame
when it is ready to do initial reflow, rather than when it is ready
to paint.

This fixes a number of intermittent failures that could previously occur
if an iframe was not visible - which would mean it was never moved from
a pending frame in the constellation to an active frame.

(It happens that webrender exposes these intermittents as permanent failures).
This commit is contained in:
Glenn Watson 2015-11-25 10:26:27 +10:00
parent d11f96e270
commit b670430cb2
8 changed files with 109 additions and 118 deletions

View file

@ -97,15 +97,6 @@ pub struct NewLayoutInfo {
pub content_process_shutdown_chan: IpcSender<()>,
}
/// Used to determine if a script has any pending asynchronous activity.
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Serialize)]
pub enum ScriptState {
/// The document has been loaded.
DocumentLoaded,
/// The document is still loading.
DocumentLoading,
}
/// Messages sent from the constellation or layout to the script task.
#[derive(Deserialize, Serialize)]
pub enum ConstellationControlMsg {
@ -142,8 +133,6 @@ pub enum ConstellationControlMsg {
/// Notifies the script task that a new Web font has been loaded, and thus the page should be
/// reflowed.
WebFontLoaded(PipelineId),
/// Get the current state of the script task for a given pipeline.
GetCurrentState(IpcSender<ScriptState>, PipelineId),
/// Cause a `load` event to be dispatched at the appropriate frame element.
DispatchFrameLoadEvent {
/// The pipeline that has been marked as loaded.