diff options
author | Martin Robinson <mrobinson@igalia.com> | 2015-10-09 17:08:35 -0700 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2015-10-20 07:29:06 -0700 |
commit | ac5525aeeb3df60a99b503fa75f919c93c50b43b (patch) | |
tree | 99f867cb70aeb0c549ade092dbd6624efe879dcd /components/compositing/compositor_layer.rs | |
parent | 90dd3cdc095d7bf54435f0fcb8a6fe134b00fc24 (diff) | |
download | servo-ac5525aeeb3df60a99b503fa75f919c93c50b43b.tar.gz servo-ac5525aeeb3df60a99b503fa75f919c93c50b43b.zip |
Integrate iframes into the display list
Instead of always promoting iframes to StackingContexts, integrate them
into the display list. This prevents stacking bugs when
non-stacking-context elements should be drawn on top of iframes.
To accomplish this, we add another step to ordering layer creation,
where LayeredItems in the DisplayList are added to layers described by
the LayerInfo structures collected at the end of the DisplayList.
Unlayered items that follow these layered items are added to
synthesized layers.
Another result of this change is that iframe layers can be positioned
directly at the location of the iframe fragment, eliminating the need
for the SubpageLayerInfo struct entirely.
Iframes are the first type of content treated this way, but this change
opens up the possibility to properly order canvas and all other layered
content that does not create a stacking context.
Fixes #7566.
Fixes #7796.
Diffstat (limited to 'components/compositing/compositor_layer.rs')
-rw-r--r-- | components/compositing/compositor_layer.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/compositing/compositor_layer.rs b/components/compositing/compositor_layer.rs index 0bcb35bd28d..0cd728385fa 100644 --- a/components/compositing/compositor_layer.rs +++ b/components/compositing/compositor_layer.rs @@ -61,9 +61,7 @@ impl CompositorData { requested_epoch: Epoch(0), painted_epoch: Epoch(0), scroll_offset: Point2D::typed(0., 0.), - subpage_info: layer_properties.subpage_layer_info.map(|subpage_layer_info| { - subpage_layer_info.pipeline_id - }), + subpage_info: layer_properties.subpage_pipeline_id, }; Rc::new(Layer::new(Rect::from_untyped(&layer_properties.rect), @@ -480,8 +478,8 @@ impl RcCompositorLayer for Rc<Layer<CompositorData>> { if let Some(layer_pipeline_id) = extra_data.subpage_info { for layer_properties in new_layers.iter() { // Keep this layer if a reference to it exists. - if let Some(ref subpage_layer_info) = layer_properties.subpage_layer_info { - if subpage_layer_info.pipeline_id == layer_pipeline_id { + if let Some(ref subpage_pipeline_id) = layer_properties.subpage_pipeline_id { + if *subpage_pipeline_id == layer_pipeline_id { return true } } |