You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many ScriptMsg already require a PipelineId field.
Many of these messages are sent to the constellation to be then sent to the embedder via the compositor (status, favicon, loadcomplete, loadstate, etc). And as of now, the decision to send the message to the embedder (which usually is either the pipeline the top level one or not) is done in on of these 3 places: in /script/, in compositor.rs, or in constellation.rs.
I think the logic of forwarding the event or not should all happen in constellation.rs. The constellation has more context than /script/, and we eventually want to get rid of the compositor step (#15934).
For the constellation to make the correct decision of forwarding the event, it needs the PipelineId.
I'm looking for a way to easily attach the PipelineId to all the ScriptMsg.
I was thinking about change the ScriptMsg type to:
Activity
paulrouget commentedon Jun 7, 2017
I want also thinking about creating a struct
CompositorChannel:… and instead of calling
constellation_chan.clone()we would useconstellation_chan.clone_with_new_pipeline(pipeline_id).asajeffrey commentedon Jun 7, 2017
Do you mean:
If so, apart from the naming, this seems sensible. I used a similar trick in worklets:
servo/components/script/dom/worklet.rs
Line 657 in 0934df7
paulrouget commentedon Jun 8, 2017
oops, yes, it's what I meant.
Thanks.
Auto merge of #17425 - paulrouget:attach-pipeline-2, r=asajeffrey
Auto merge of #17425 - paulrouget:attach-pipeline-2, r=asajeffrey
paulrouget commentedon Aug 15, 2017
Fixed by #17425