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 -->
This commit is contained in:
bors-servo 2015-09-29 19:26:49 -06:00
commit a0cb657fe8
20 changed files with 602 additions and 389 deletions

View file

@ -149,6 +149,7 @@ prefs:"layout.flex.enabled" == flex_row_direction.html flex_row_direction_ref.ht
== iframe/size_attributes.html iframe/size_attributes_ref.html
prefs:"layout.writing-mode.enabled" == iframe/size_attributes_vertical_writing_mode.html iframe/size_attributes_vertical_writing_mode_ref.html
== iframe/stacking_context.html iframe/stacking_context_ref.html
== iframe/stacking_context_position_a.html iframe/stacking_context_position_ref.html
!= image_rendering_auto_a.html image_rendering_pixelated_a.html
== image_rendering_pixelated_a.html image_rendering_pixelated_ref.html

View file

@ -0,0 +1,5 @@
<body style="background:tan">
<div style="transform: translateX(0px)">
<iframe src="data:text/html,%3Cspan%3EJust%20a%20simple%20little%20iframe.%3C%2Fspan%3E"></iframe>
</div>
</body>

View file

@ -0,0 +1,5 @@
<body style="background:tan">
<div>
<iframe style="transform: translateX(0px)" src="data:text/html,%3Cspan%3EJust%20a%20simple%20little%20iframe.%3C%2Fspan%3E"></iframe>
</div>
</body>