aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-08-27 16:29:57 -0700
committerPatrick Walton <pcwalton@mimiga.net>2015-09-29 09:47:28 -0700
commitc72d0c2ed04f6c5f9fa22a3f576e1df5878f941d (patch)
treebff0f539155a1850bfc919a08cbaa4fc74725e1d /components/layout/construct.rs
parented0d70e2347648f7a0e7166fed8fb42b99b99fbc (diff)
downloadservo-c72d0c2ed04f6c5f9fa22a3f576e1df5878f941d.tar.gz
servo-c72d0c2ed04f6c5f9fa22a3f576e1df5878f941d.zip
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 both the sizes and positions of iframes are determined by the compositor. Layout layerizes all iframes and marks the iframe layers with the appropriate pipeline and subpage IDs so that the compositor can place them correctly. This approach is similar in spirit to Gecko's `RefLayer` infrastructure. The logic that determines when it is time to take the screenshot for reftests has been significantly revamped to deal with this change in delegation of responsibility. Additionally, this code removes the infrastructure that sends layout data back to the layout task to be destroyed, since it is now all thread-safe and can be destroyed on the script task. The failing tests now fail because of a pre-existing bug related to intrinsic heights and borders on inline replaced elements. They happened to pass before because we never rendered the iframes at all, which meant they never had a chance to draw the red border the tests expect to not render! Closes #7377.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index b7eb8a4ef84..2421a797b43 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -285,15 +285,6 @@ impl<'a> FlowConstructor<'a> {
fn set_flow_construction_result(&self,
node: &ThreadSafeLayoutNode,
result: ConstructionResult) {
- if let ConstructionResult::None = result {
- let mut layout_data_ref = node.mutate_layout_data();
- let layout_data = layout_data_ref.as_mut().expect("no layout data");
- layout_data.remove_compositor_layers(self.layout_context
- .shared
- .constellation_chan
- .clone());
- }
-
node.set_flow_construction_result(result);
}