Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden iframes sometimes don't get recomposited properly #6849

Closed
jdm opened this issue Jul 30, 2015 · 6 comments
Closed

Hidden iframes sometimes don't get recomposited properly #6849

jdm opened this issue Jul 30, 2015 · 6 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Jul 30, 2015

iframe1.html

<iframe src="iframe2.html"></iframe>
<script>
var iframe = document.getElementsByTagName('iframe')[0];
iframe.onload = function() {
  iframe.style.display = "none";
}
</script>

iframe2.html
Iframe content

The iframe border disappears, but the content sticks around consistently for me.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 30, 2015

Blocks #6677

@jdm
Copy link
Member Author

@jdm jdm commented Jul 30, 2015

@glennw @mrobinson As far as I've been able to trace this, we correctly remove the compositor layer when we set a construction result of None. The constellation code correctly sees the pipeline in the current frame in the resulting FrameRect message, and sends the compositor a SetLayerRect message. The compositor finds the layer and updates the bounds, but send_buffer_requests_for_all_layers ends up with an empty layers_and_requests vector and returns without requesting new data from the pipelines.

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Aug 12, 2015

I think this is a regression from servo/rust-layers#182. Layers can either mask their children or not and iframe containers always mask their children. Now, it seems that the property is only respected for layers that create a new RenderContext3D.

@glennw
Copy link
Member

@glennw glennw commented Aug 12, 2015

In theory, iframe root layers should always create a new RenderContext3D, which should handle that situation correctly. But perhaps there's a bug and iframe root layers don't result in a RenderContext3D being created?

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Aug 14, 2015

Okay. After some investigation I have a fix lined up for rust-layers (servo/rust-layers#201). Once that lands I'll do a PR for servo with a test.

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Sep 1, 2015

An update on this one. I think the rust-layers PR fixes the bug, but I'm having a bit of trouble writing a non-flaky reference test for this issue. It is very sensitive to timing. :/

mrobinson added a commit to mrobinson/servo that referenced this issue Sep 2, 2015
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 servo#6849.
bors-servo pushed a commit that referenced this issue Sep 2, 2015
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 -->
josiahdaniels added a commit to josiahdaniels/servo that referenced this issue Sep 28, 2015
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 servo#6849.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.