mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove constellation round trip for subpage mapping in compositor.
This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor. (This is the first of several commits removing subpage from parts of servo).
This commit is contained in:
parent
5eb1c04e78
commit
da881947e5
11 changed files with 47 additions and 139 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use azure::azure_hl::Color;
|
||||
use constellation_msg::{Key, KeyModifiers, KeyState, PipelineId, SubpageId};
|
||||
use constellation_msg::{Key, KeyModifiers, KeyState, PipelineId};
|
||||
use euclid::{Matrix4, Point2D, Rect, Size2D};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layers::layers::{BufferRequest, LayerBufferSet};
|
||||
|
@ -169,8 +169,6 @@ pub enum ScriptToCompositorMsg {
|
|||
pub struct SubpageLayerInfo {
|
||||
/// The ID of the pipeline.
|
||||
pub pipeline_id: PipelineId,
|
||||
/// The ID of the subpage.
|
||||
pub subpage_id: SubpageId,
|
||||
/// The offset of the subpage within this layer (to account for borders).
|
||||
pub origin: Point2D<Au>,
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ pub enum Msg {
|
|||
LoadComplete(PipelineId),
|
||||
/// Dispatched after the DOM load event has fired on a document
|
||||
DOMLoad(PipelineId),
|
||||
FrameSize(PipelineId, SubpageId, Size2D<f32>),
|
||||
FrameSize(PipelineId, Size2D<f32>),
|
||||
LoadUrl(PipelineId, LoadData),
|
||||
ScriptLoadedURLInIFrame(IframeLoadInfo),
|
||||
Navigate(Option<(PipelineId, SubpageId)>, NavigationDirection),
|
||||
|
@ -291,9 +291,6 @@ pub enum Msg {
|
|||
IpcSender<Result<(IpcSender<CanvasMsg>, usize), String>>),
|
||||
/// Status message to be displayed in the chrome, eg. a link URL on mouseover.
|
||||
NodeStatus(Option<String>),
|
||||
/// Requests that the pipeline ID of the subpage identified by a (pipeline ID, subpage ID)
|
||||
/// pair be sent to the compositor via a `CreateLayerForSubpage` message.
|
||||
PrepareForSubpageLayerCreation(PipelineId, SubpageId),
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Deserialize, Serialize, Debug)]
|
||||
|
@ -463,12 +460,12 @@ thread_local!(pub static PIPELINE_NAMESPACE: Cell<Option<PipelineNamespace>> = C
|
|||
pub struct PipelineNamespaceId(pub u32);
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Hash, Debug, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct PipelineIndex(u32);
|
||||
pub struct PipelineIndex(pub u32);
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Hash, Debug, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct PipelineId {
|
||||
namespace_id: PipelineNamespaceId,
|
||||
index: PipelineIndex
|
||||
pub namespace_id: PipelineNamespaceId,
|
||||
pub index: PipelineIndex
|
||||
}
|
||||
|
||||
impl PipelineId {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue