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
Auto merge of #7423 - pcwalton:iframe-stacking-context-position, r=glennw
layout: Make the compositor rather than layout determine the position of each iframe.
The old code that attempted to do this during layout wasn't able to work
for multiple reasons: it couldn't know where the iframe was going to be
on the page (because of nested iframes), and at the time it was building
the display list for a fragment it couldn't know where that fragment was
going to be in page coordinates.
This patch rewrites that code so that only the size of an iframe is
determined during layout, and the position is determined by the
compositor. Layout layerizes iframes and marks the iframe layers with
the appropriate subpage ID so that the compositor can place them
correctly.
Closes#7377.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7423)
<!-- Reviewable:end -->
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
4
5
5
use azure::azure_hl;
6
-
use compositor::IOCompositor;
6
+
use compositor::{IOCompositor,RemovedPipelineInfo};
7
7
use euclid::length::Length;
8
8
use euclid::point::{Point2D,TypedPoint2D};
9
9
use euclid::rect::Rect;
@@ -12,7 +12,7 @@ use layers::color::Color;
12
12
use layers::geometry::LayerPixel;
13
13
use layers::layers::{Layer,LayerBufferSet};
14
14
use msg::compositor_msg::{Epoch,LayerId,LayerProperties,ScrollPolicy};
15
-
use msg::constellation_msg::PipelineId;
15
+
use msg::constellation_msg::{PipelineId,SubpageId};
16
16
use script_traits::CompositorEvent::{ClickEvent,MouseDownEvent,MouseMoveEvent,MouseUpEvent};
17
17
use script_traits::ConstellationControlMsg;
18
18
use std::rc::Rc;
@@ -42,6 +42,9 @@ pub struct CompositorData {
42
42
/// The scroll offset originating from this scrolling root. This allows scrolling roots
43
43
/// to track their current scroll position even while their content_offset does not change.
44
44
pubscroll_offset:TypedPoint2D<LayerPixel,f32>,
45
+
46
+
/// The pipeline ID and subpage ID of this layer, if it represents a subpage.
0 commit comments