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

Setting iframe src right after appending it to the DOM doesn't work #7826

Closed
paulrouget opened this issue Oct 2, 2015 · 4 comments
Closed

Setting iframe src right after appending it to the DOM doesn't work #7826

paulrouget opened this issue Oct 2, 2015 · 4 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Oct 2, 2015

In this example, f1 doesn't work, f2 works.

<style>
  iframe {
    display: block;
    height: 200px;
  }
</style>

<body>
</body>

<script>

  var f1 = document.createElement('iframe');
  document.body.appendChild(f1);
  f1.src = 'http://google.com/?q=f1';

  var f2 = document.createElement('iframe');
  f2.src = 'http://google.com/?q=f2';
  document.body.appendChild(f2);

</script>
@nox
Copy link
Member

@nox nox commented Oct 2, 2015

With only the code for f1, logging says:

± RUST_LOG=compositing::constellation=debug ./mach run --dev foo.html
DEBUG:compositing::constellation: constellation got init load URL message
DEBUG:compositing::constellation: constellation got window resize message
DEBUG:compositing::constellation: handle_resized_window_msg: 800×600 800×600
DEBUG:compositing::constellation: constellation got head parsed message
DEBUG:compositing::constellation: constellation got iframe URL load message PipelineId(0) None SubpageId(0)
DEBUG:compositing::constellation: Constellation: loading cross-origin iframe, parent url Url { scheme: "file", scheme_data: Relative(RelativeSchemeData { username: "", password: None, host: Domain(""), port: None, default_port: None, path: ["Users", "nox", "src", "servo", "foo.html"] }), query: None, fragment: None }, iframe url Url { scheme: "about", scheme_data: NonRelative("blank"), query: None, fragment: None }
DEBUG:compositing::constellation: constellation got iframe URL load message PipelineId(0) Some(SubpageId(0)) SubpageId(1)
DEBUG:compositing::constellation: Constellation: loading cross-origin iframe, parent url Url { scheme: "file", scheme_data: Relative(RelativeSchemeData { username: "", password: None, host: Domain(""), port: None, default_port: None, path: ["Users", "nox", "src", "servo", "foo.html"] }), query: None, fragment: None }, iframe url Url { scheme: "http", scheme_data: Relative(RelativeSchemeData { username: "", password: None, host: Domain("google.fr"), port: None, default_port: Some(80), path: [""] }), query: None, fragment: None }
DEBUG:compositing::constellation: constellation got frame rect message
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(0) ready to send paint msg
DEBUG:compositing::constellation: constellation got load complete message
DEBUG:compositing::constellation: constellation got dom load message
DEBUG:compositing::constellation: constellation got window resize message
DEBUG:compositing::constellation: handle_resized_window_msg: 800×600 800×600
DEBUG:compositing::constellation: constellation got get-pipeline-title message
DEBUG:compositing::constellation: constellation got frame rect message
DEBUG:compositing::constellation: constellation got head parsed message
DEBUG:compositing::constellation: constellation got load complete message
DEBUG:compositing::constellation: frame not found for pipeline id PipelineId(1)
DEBUG:compositing::constellation: constellation got dom load message
DEBUG:compositing::constellation: constellation got new favicon message
DEBUG:compositing::constellation: constellation got head parsed message
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got painter ready message
DEBUG:compositing::constellation: Painter PipelineId(2) ready to send paint msg
DEBUG:compositing::constellation: constellation got load complete message
DEBUG:compositing::constellation: frame not found for pipeline id PipelineId(2)
DEBUG:compositing::constellation: constellation got dom load message
DEBUG:compositing::constellation: constellation exiting
@nox
Copy link
Member

@nox nox commented Oct 2, 2015

So the bug isn't in the DOM part, AFAICT.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Nov 16, 2015

With only the code for f1, logging says:
[…]
So the bug isn't in the DOM part, AFAICT.

Maybe it's related to #8081

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

Both iframes load now.

@nox nox closed this Sep 30, 2017
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
2 participants
You can’t perform that action at this time.