mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
d11f96e270
commit
b670430cb2
8 changed files with 109 additions and 118 deletions
|
@ -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.
|
||||
|
|
|
@ -6,7 +6,7 @@ use canvas_traits::CanvasMsg;
|
|||
use euclid::point::Point2D;
|
||||
use euclid::size::Size2D;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::{AnimationState, IframeLoadInfo, NavigationDirection};
|
||||
use msg::constellation_msg::{AnimationState, DocumentState, IframeLoadInfo, NavigationDirection};
|
||||
use msg::constellation_msg::{Failure, MozBrowserEvent, PipelineId};
|
||||
use msg::constellation_msg::{LoadData, SubpageId};
|
||||
use msg::constellation_msg::{MouseButton, MouseEventType};
|
||||
|
@ -66,4 +66,8 @@ pub enum ScriptMsg {
|
|||
SetCursor(Cursor),
|
||||
/// Notifies the constellation that the viewport has been constrained in some manner
|
||||
ViewportConstrained(PipelineId, ViewportConstraints),
|
||||
/// Mark a new document as active
|
||||
ActivateDocument(PipelineId),
|
||||
/// Set the document state for a pipeline (used by screenshot / reftests)
|
||||
SetDocumentState(PipelineId, DocumentState),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue