mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #7287 - pcwalton:iframe-stacking-context, r=glennw
layout: Put iframes that form stacking contexts in the right place. Improves eBay. Closes #7282. r? @glennw <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7287) <!-- Reviewable:end -->
This commit is contained in:
commit
ac4ca05337
4 changed files with 35 additions and 3 deletions
|
@ -1011,9 +1011,15 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// because layout for the iframe only needs to know size, and origin is only relevant if
|
||||
// the iframe is actually going to be displayed.
|
||||
if let SpecificFragmentInfo::Iframe(ref iframe_fragment) = self.specific {
|
||||
self.finalize_position_and_size_of_iframe(&**iframe_fragment,
|
||||
stacking_relative_border_box.origin,
|
||||
layout_context)
|
||||
let stacking_relative_border_box_in_parent_coordinate_system =
|
||||
self.stacking_relative_border_box(stacking_relative_flow_origin,
|
||||
relative_containing_block_size,
|
||||
relative_containing_block_mode,
|
||||
CoordinateSystem::Parent);
|
||||
self.finalize_position_and_size_of_iframe(
|
||||
&**iframe_fragment,
|
||||
stacking_relative_border_box_in_parent_coordinate_system.origin,
|
||||
layout_context)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
== iframe/simple_inline_width_percentage.html iframe/simple_inline_width_percentage_ref.html
|
||||
== iframe/size_attributes.html iframe/size_attributes_ref.html
|
||||
experimental == iframe/size_attributes_vertical_writing_mode.html iframe/size_attributes_ref.html
|
||||
== iframe/stacking_context.html iframe/stacking_context_ref.html
|
||||
|
||||
!= image_rendering_auto_a.html image_rendering_pixelated_a.html
|
||||
== image_rendering_pixelated_a.html image_rendering_pixelated_ref.html
|
||||
|
|
13
tests/ref/iframe/stacking_context.html
Normal file
13
tests/ref/iframe/stacking_context.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
border: solid green 50px;
|
||||
transform: translateX(0px); /* form a stacking context */
|
||||
}
|
||||
</style>
|
||||
<iframe src="data:text/html,%3Cspan%3EJust%20a%20simple%20little%20iframe.%3C%2Fspan%3E">
|
12
tests/ref/iframe/stacking_context_ref.html
Normal file
12
tests/ref/iframe/stacking_context_ref.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: 100px;
|
||||
left: 100px;
|
||||
border: solid green 50px;
|
||||
}
|
||||
</style>
|
||||
<iframe src="data:text/html,%3Cspan%3EJust%20a%20simple%20little%20iframe.%3C%2Fspan%3E">
|
Loading…
Add table
Add a link
Reference in a new issue