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

need to navigate back three times to return back one page #18564

Open
metajack opened this issue Sep 19, 2017 · 17 comments
Open

need to navigate back three times to return back one page #18564

metajack opened this issue Sep 19, 2017 · 17 comments
Assignees

Comments

@metajack
Copy link
Contributor

@metajack metajack commented Sep 19, 2017

STR:

  1. Visit https://metajack.im
  2. Click the link to the LCA talk
  3. Attempt to go back to original page. It currently takes me 3 clicks of the back button. The first click does nothing, the second removes the image preview for the embed, and the third finally returns to the home page.
@metajack
Copy link
Contributor Author

@metajack metajack commented Sep 19, 2017

@metajack
Copy link
Contributor Author

@metajack metajack commented Sep 19, 2017

This was found in servoshell, not sure if it's specific to that.

@asajeffrey asajeffrey self-assigned this Sep 19, 2017
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

Interesting. This might actually be doing the Spec Compatible Thing depending on how the youtube iframe is behaving: if it's navigating itself without enabling replacement, then it's meant to add a session history entry each time. Of course this isn't what the user (or content author) might be expecting :/

@metajack
Copy link
Contributor Author

@metajack metajack commented Sep 19, 2017

Firefox and Chrome both do the thing I expect (immediate navigation to home page), but they also support the video, so maybe this is just an issue in the fallback path. However, the next navigation after I get back always crashes Servo. See #18563

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

Yes, this looks like a bug with how we're handling the session history, there should only be one entry created, since there's just the iframe's initial about:blank then the embedded video.

cc @cbrewster

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

TMI:

$ RUST_LOG=constellation,script::dom::htmliframeelement ./mach run -d https://metajack.im
DEBUG:constellation::constellation: Adding new host entry metajack.im for top-level browsing context (0,2).
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: constellation got initiate navigate request message
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (0,1)
DEBUG:constellation::constellation: Setting browsing context (0,2) to be pipeline (0,1).
WARN:constellation::browsingcontext: BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(0), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.
DEBUG:constellation::constellation: Sending log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(0), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.").
DEBUG:constellation::constellation: Adding pipeline to new browsing context.
DEBUG:constellation::constellation: Creating new browsing context (0,2)
DEBUG:constellation::constellation: Setting activity of (0,1) to be FullyActive.
DEBUG:constellation::constellation: mozbrowser location change on a regular iframe (0,2)
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: Received log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(0), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.").
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got joint session history length message from script
DEBUG:constellation::constellation: constellation got joint session history length message from script
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:constellation::constellation: Pipeline (0,1) has no parent.
DEBUG:constellation::constellation: constellation got NodeStatus message
DEBUG:constellation::constellation: constellation got URL load message from script
DEBUG:constellation::constellation: Loading https://metajack.im/2017/01/18/servo-talk-at-lca-2017/ in pipeline (0,1).
DEBUG:constellation::constellation: Creating new pipeline (0,3) in browsing context (0,2).
DEBUG:constellation::constellation: constellation got initiate navigate request message
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (0,3)
DEBUG:constellation::constellation: Setting browsing context (0,2) to be pipeline (0,3).
DEBUG:constellation::constellation: Adding pipeline to existing browsing context.
DEBUG:constellation::constellation: Setting activity of (0,1) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (0,3) to be FullyActive.
DEBUG:constellation::constellation: mozbrowser location change on a regular iframe (0,2)
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:script::dom::htmliframeelement: iframe bound to browsing context.
DEBUG:constellation::constellation: constellation got loaded `about:blank` in iframe message PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(NonZero(3)) } PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(2)) }
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (1,2)
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Setting browsing context (1,1) to be pipeline (1,2).
WARN:constellation::browsingcontext: BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(1), index: BrowsingContextIndex(NonZero(1)) } iterated after closure.
DEBUG:constellation::constellation: Sending log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(1), index: BrowsingContextIndex(NonZero(1)) } iterated after closure.").
DEBUG:constellation::constellation: Adding pipeline to new browsing context.
DEBUG:constellation::constellation: Creating new browsing context (1,1)
DEBUG:constellation::constellation: Setting activity of (1,2) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(1), index: BrowsingContextIndex(NonZero(1)) } iterated after closure.").
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got iframe URL load message PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(NonZero(3)) } Some(PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(2)) }) PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(3)) }
DEBUG:constellation::constellation: Creating new pipeline (1,3) in browsing context (1,1).
DEBUG:constellation::constellation: Adding new host entry youtube.com for top-level browsing context (0,2).
DEBUG:constellation::constellation: constellation got initiate navigate request message
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (1,3)
DEBUG:constellation::constellation: Setting browsing context (1,1) to be pipeline (1,3).
DEBUG:constellation::constellation: Adding pipeline to existing browsing context.
DEBUG:constellation::constellation: Setting activity of (1,2) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (1,3) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got NodeStatus message
DEBUG:constellation::constellation: Sending log entry Error("Error at :0:0 uncaught exception: wqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3996:169\nuqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3993:59\nB0@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3991:30\nm1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4071:150\nw1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4126:65\nz1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4138:118\n@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:7261:161\nGg/a.D<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:379:223\nGg@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:380:10\nl.da@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:375:6\nPg/<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:403:245\n").
DEBUG:constellation::constellation: Received log entry Error("Error at :0:0 uncaught exception: wqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3996:169\nuqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3993:59\nB0@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3991:30\nm1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4071:150\nw1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4126:65\nz1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4138:118\n@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:7261:161\nGg/a.D<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:379:223\nGg@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:380:10\nl.da@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:375:6\nPg/<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:403:245\n").
DEBUG:script::dom::htmliframeelement: iframe bound to browsing context.
DEBUG:constellation::constellation: constellation got loaded `about:blank` in iframe message PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(3)) } PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(3)) }
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (3,3)
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Setting browsing context (3,2) to be pipeline (3,3).
WARN:constellation::browsingcontext: BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.
DEBUG:constellation::constellation: Sending log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.").
DEBUG:constellation::constellation: Adding pipeline to new browsing context.
DEBUG:constellation::constellation: Creating new browsing context (3,2)
DEBUG:constellation::constellation: Setting activity of (3,3) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(2)) } iterated after closure.").
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got iframe URL load message PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(3)) } Some(PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(3)) }) PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(4)) }
DEBUG:constellation::constellation: Creating new pipeline (3,4) in browsing context (3,2).
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (3,4)
DEBUG:constellation::constellation: Setting browsing context (3,2) to be pipeline (3,4).
DEBUG:constellation::constellation: Adding pipeline to existing browsing context.
DEBUG:constellation::constellation: Setting activity of (3,3) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (3,4) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:script::dom::htmliframeelement: iframe bound to browsing context.
DEBUG:constellation::constellation: constellation got loaded `about:blank` in iframe message PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(NonZero(3)) } PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(6)) }
DEBUG:constellation::constellation: constellation got set final url message
DEBUG:constellation::constellation: constellation got activate document message
DEBUG:constellation::constellation: Document ready to activate (3,6)
DEBUG:constellation::constellation: Sending log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Setting browsing context (3,5) to be pipeline (3,6).
WARN:constellation::browsingcontext: BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(5)) } iterated after closure.
DEBUG:constellation::constellation: Sending log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(5)) } iterated after closure.").
DEBUG:constellation::constellation: Adding pipeline to new browsing context.
DEBUG:constellation::constellation: Creating new browsing context (3,5)
DEBUG:constellation::constellation: Setting activity of (3,6) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: Received log entry Warn("Resuming an already resumed timer.").
DEBUG:constellation::constellation: Received log entry Warn("BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(5)) } iterated after closure.").
DEBUG:constellation::constellation: constellation got head parsed message
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:script::dom::htmliframeelement: Unbinding frame (3,5).
DEBUG:constellation::constellation: constellation got remove iframe message
DEBUG:constellation::constellation: Closing browsing context (3,5).
DEBUG:constellation::constellation: Closing browsing context children (3,5).
DEBUG:constellation::constellation: Closing pipeline PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(6)) }.
DEBUG:constellation::pipeline: pipeline PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(6)) } exiting
DEBUG:constellation::constellation: Closed pipeline PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(6)) }.
DEBUG:constellation::constellation: Closed browsing context children (3,5).
DEBUG:constellation::constellation: Closed browsing context BrowsingContextId { namespace_id: PipelineNamespaceId(3), index: BrowsingContextIndex(NonZero(5)) }.
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:script::dom::htmliframeelement: Discarding browsing context for pipeline (3,6)
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got set visibility change complete message
DEBUG:constellation::constellation: Pipeline PipelineId { namespace_id: PipelineNamespaceId(3), index: PipelineIndex(NonZero(6)) } exited.
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got traverse history message from compositor
DEBUG:constellation::constellation: Setting activity of (3,4) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (3,3) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got load complete message
DEBUG:constellation::constellation: Pipeline (0,3) has no parent.
DEBUG:constellation::constellation: Sending log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: Received log entry Warn("stop_parsing not implemented, full speed ahead!").
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got traverse history message from compositor
DEBUG:constellation::constellation: Setting activity of (1,3) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (3,3) to be Active.
DEBUG:constellation::constellation: Setting activity of (1,2) to be FullyActive.
DEBUG:constellation::constellation: Sending frame tree for browsing context (0,2).
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got window resize message
DEBUG:constellation::constellation: handle_window_size_msg: 1024×740
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got iframe size message
DEBUG:constellation::constellation: constellation got a pending paint metric message
DEBUG:constellation::constellation: constellation got key event message
DEBUG:constellation::constellation: constellation got traverse history message from compositor
DEBUG:constellation::constellation: Setting activity of (0,3) to be Inactive.
DEBUG:constellation::constellation: Setting activity of (1,2) to be Active.
DEBUG:constellation::constellation: Setting activity of (0,1) to be FullyActive.
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

Hmm I see three DEBUG:script::dom::htmliframeelement: iframe bound to browsing context. where I'd expect that there's just one. The second one is created right after:

DEBUG:constellation::constellation: Received log entry Error("Error at :0:0 uncaught exception: wqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3996:169\nuqa@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3993:59\nB0@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:3991:30\nm1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4071:150\nw1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4126:65\nz1@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:4138:118\n@https://www.youtube.com/yts/jsbin/player-vfliXTNRk/en_US/base.js:7261:161\nGg/a.D<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:379:223\nGg@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:380:10\nl.da@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:375:6\nPg/<@https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js:403:245\n").

It could be that youtube's JS has a fallback path where it creates extra iframes, which is causing the excess session history entries?

@metajack
Copy link
Contributor Author

@metajack metajack commented Sep 19, 2017

@cpearce Is there a way to disable gecko's media stack so that YouTube embeds would behave more like current Servo to test the fallback path?

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

Looking at the JS in FF's debugger, there are some suspicious document.createElement("IFRAME") in https://www.youtube.com/yts/jsbin/www-embed-player-vfl-uq_Tp/www-embed-player.js. In particular:

var a=document.createElement("IFRAME");
a.style.display="none";
a.src="";
document.documentElement.appendChild(a);

In Servo's impl of iframes this may well create more session history entries than FF does, since the iframe is being attached with src="". Since the src is set, https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes says that we should navigate to about:blank. This causes Servo to create a new session history for the new about:blank page. Existing browsers may well just recycle the existing about:blank in this case.

We may be hitting whatwg/html#490 here.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 19, 2017

@jdm: this may be more concrete evidence of web content providers (in this case youtube!) relying on a particular semantics of initial about:blank handling.

@cbrewster
Copy link
Member

@cbrewster cbrewster commented Sep 20, 2017

I believe this is #14720

@cbrewster
Copy link
Member

@cbrewster cbrewster commented Sep 20, 2017

@asajeffrey in your snippet from the embedded player, the src is set prior to the iframe being appended to the document.

The iframe will have about:blank in the history (as will all iframes right now, that is due to #14720). I am not certain why there are two more entries rather than just one; however, I don't think that is due to a.src="";.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 20, 2017

@cbrewster the reason why the src attribute matters is that if it wasn't set then the clause from https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes would apply:

Otherwise, if the element has no src attribute specified, and the user agent is processing the iframe's attributes for the "first time"

Queue a task to run the iframe load event steps.

The task source for this task is the DOM manipulation task source.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 20, 2017

Hmm:

self.navigate_or_reload_child_browsing_context(Some(load_data), NavigationType::Regular, false);

Shouldn't that be:

self.navigate_or_reload_child_browsing_context(Some(load_data), NavigationType::Regular, true);
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 20, 2017

Ah, replacing false by true in that line fixes the problem. I wonder if it breaks anything?

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Sep 20, 2017

IRC chat: http://logs.glob.uno/?c=mozilla%23servo&s=20+Sep+2017&e=20+Sep+2017#c755990

TL;DR: we should be OK doing: asajeffrey@5fa2dfe:

let replace = mode == ProcessingMode::FirstTime;
self.navigate_or_reload_child_browsing_context(Some(load_data), NavigationType::Regular, replace);
bors-servo added a commit that referenced this issue Sep 21, 2017
…about-blank, r=<try>

Script iframe intial load replaces about blank

<!-- Please describe your changes on the following line: -->

When navigating from the initial about:blank, do it with replacement enabled.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18564
- [X] These changes do not require tests because the existing tests do the job

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18587)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Sep 21, 2017
…about-blank, r=<try>

Script iframe intial load replaces about blank

<!-- Please describe your changes on the following line: -->

When navigating from the initial about:blank, do it with replacement enabled.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18564
- [X] These changes do not require tests because the existing tests do the job

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18587)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Sep 21, 2017
…about-blank, r=<try>

Script iframe intial load replaces about blank

<!-- Please describe your changes on the following line: -->

When navigating from the initial about:blank, do it with replacement enabled.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18564
- [X] These changes do not require tests because the existing tests do the job

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18587)
<!-- Reviewable:end -->
@atouchet
Copy link
Contributor

@atouchet atouchet commented Jul 1, 2020

I am not able to reproduce this issue in the latest nightly build using Alt + left arrow to go back.

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.

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