Sometimes, the root pipeline title is sent before the compositor has created the root pipeline, so also request the main page title once the initial frame tree has been sent.
When an iframe is created with display:none it sets the root layer to be
zero width and height. When updating the rect of the iframe from layout
send the entire rect rather than just the new origin, which handles the case
where the iframe has been made visible and now has a non-zero rect.
Sometimes, the root pipeline title is sent before the compositor
has created the root pipeline, so also request the main page
title once the initial frame tree has been sent.
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
When the constellation change a FrameTree pipeline, it should send a
notification to the compositor, so that it can negotiate buffers from
the correct render task. This commit also migrates away from the
generalized FrameTreeUpdateMsg to ones specific to the situation at
hand. That turned out to be an unnecessary abstraction.
Instead of cloning pipelines and storing them once per layer, store
them globally in the compositor and access them via id. This trades
lots of unnecessary duplication for a HashMap lookup.
It is possible for messages for defunct pipelines to arrive in the
compositor. If the compositor believes that the pipelines are in the
process of shutting down, simply ignore the messages. We still panic in
the case that the pipeline is totally unknown.
Fixes#3733.
The term "root layer" is used in the compositor to refer to both the
pipeline root layer and the page background layer. This can be quite
confusing. Instead, call the page background layer the "base layer,"
which is always the first child of the pipeline root layer.
It is possible for a PaintTask to start exiting soon after sending new
buffers to the compositor. In that case, the compositor should return
the now unnecessary buffers to the PaintTask so that it can properly
free them.
To accomplish this, the compositor now keeps a hash map of paint task
channels per pipeline id. When a PaintTask exists, the constellation
informs the compositor that it can forget about it. Additionally, the
PaintTask should not wait for any buffers when the engine is doing a
complete shutdown. In that case, the compositor is already halted and
has simply let all buffers leak. We pipe through the shutdown type when
destroying the pipeline to make this decision.
Fixes#2641.
When finding the layer under a point, take into account clipping
rectangles defined by layers that mask to bounds. This prevents clicks
from being hijacked by masked layers.
Root layers that define the extent of iframes should always mask their
child content. This fixes a bug where root layers without an assigned
size and location do not spill over the entire scene.