mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #7503 - mrobinson:iframe-issue, r=glennw
Upgrade to the latest rust-layers This should fix a bug where hidden iframes are not properly clipped away from the compositor scene. This commit adds a test for this behavior. Fixes #6849. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7503) <!-- Reviewable:end -->
This commit is contained in:
commit
ba2cb77c26
7 changed files with 46 additions and 31 deletions
|
@ -125,6 +125,7 @@ prefs:"layout.flex.enabled" == flex_row_direction.html flex_row_direction_ref.ht
|
|||
== hide_after_create.html hide_after_create_ref.html
|
||||
|
||||
== iframe/bg_color.html iframe/bg_color_ref.html
|
||||
== iframe/hide_after_load.html iframe/hide_after_load_ref.html
|
||||
== iframe/hide_and_show.html iframe/hide_and_show_ref.html
|
||||
== iframe/hide_layers1.html iframe/hide_layers_ref.html
|
||||
== iframe/hide_layers2.html iframe/hide_layers_ref.html
|
||||
|
|
18
tests/ref/iframe/hide_after_load.html
Normal file
18
tests/ref/iframe/hide_after_load.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<body style="background: green;">
|
||||
<iframe style="border: 0" src="hide_after_load_inner_frame.html"></iframe>
|
||||
<script type="text/javascript">
|
||||
var iframe = document.getElementsByTagName('iframe')[0];
|
||||
iframe.onload = function() {
|
||||
iframe.style.display = "none";
|
||||
|
||||
// We do this in a timeout, so that the compositor has a chance
|
||||
// to update the layer tree.
|
||||
setTimeout(function() {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
}, 0);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
6
tests/ref/iframe/hide_after_load_inner_frame.html
Normal file
6
tests/ref/iframe/hide_after_load_inner_frame.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body style="background: red;">
|
||||
hidden content
|
||||
</body>
|
||||
</html>
|
4
tests/ref/iframe/hide_after_load_ref.html
Normal file
4
tests/ref/iframe/hide_after_load_ref.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body style="background: green;"> </body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue