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

content of transformed iframe is visible outside of the iframe #11358

Closed
paulrouget opened this issue May 24, 2016 · 11 comments
Closed

content of transformed iframe is visible outside of the iframe #11358

paulrouget opened this issue May 24, 2016 · 11 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 24, 2016

follow up of #11151

<style>
  body {
    background: green;
  }
  iframe  {
    width: 100vw;
    height: 100vh;
    border: 10px solid red;
    transform: scale(.5);
  }
</style>
<iframe src="data:text/html,<body style='overflow: hidden; overflow-y: auto;'><div style='background: blue; height: 2000px'>"></iframe>

screen shot 2016-05-24 at 09 20 46

@nox
Copy link
Member

@nox nox commented May 24, 2016

Interesting, on latest master on my computer it is less visible, just covering the border:
capture d ecran 2016-05-24 a 14 20 42

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 25, 2016

@nox I can't reproduce that. Can you still reproduce after the latest webrender updates?

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 25, 2016

@nox You probably didn't use webrender.

@nox
Copy link
Member

@nox nox commented May 25, 2016

Indeed I didn't use webrender. Can reproduce now.

@nox
Copy link
Member

@nox nox commented May 25, 2016

Could #11398 also be related?

@metajack
Copy link
Contributor

@metajack metajack commented May 25, 2016

Pretty sure @pcwalton is on this.

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented May 25, 2016

Yup, this was on my agenda for today.

pcwalton added a commit to pcwalton/webrender that referenced this issue May 26, 2016
transform them.

This allows our current code to support a subset of nested clips and
transforms without actually having a full-blown clip/transform stack.

Closes servo/servo#11358.
bors-servo added a commit to servo/webrender that referenced this issue May 26, 2016
Transform viewport rectangles if the current matrix can losslessly transform them.

This allows our current code to support a subset of nested clips and
transforms without actually having a full-blown clip/transform stack.

Closes servo/servo#11358.

r? @glennw
@pcwalton pcwalton reopened this May 26, 2016
@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented May 26, 2016

Reopening since we need a wrup.

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Jun 1, 2016

Fixed by #11398.

@Gozala
Copy link
Contributor

@Gozala Gozala commented Jun 7, 2016

#11398 seems to fix specific example @paulrouget posted, but issue still remains if different css transforms are used. In browser.html we use translate3d that still seems to have this issue. I have update original code example to illustrate the issue:

<style>
  body {
    background: green;
    perspective: 1000px;
    height: 100vh;
    width: 100vw;
  }

  iframe {
    width: 100%;
    height: 100%;
    border: 10px solid red;
    transform: translate3d(0px, 0px, -800px);
  }
</style>
<iframe src="data:text/html,<body style='overflow: hidden; overflow-y: auto;'><div style='background: blue; height: 2000px'>"></iframe>

I also published it to jsbin so it's easy to reproduce:

servo -w https://jsbin.com/cupoza

P.S. If you scroll iframe content it will escape top boundary as well.

@Gozala
Copy link
Contributor

@Gozala Gozala commented Jun 7, 2016

Never mind, it looks like we already have a bug #11650 on file the issue I posted above

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.

None yet
6 participants
You can’t perform that action at this time.