W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] Sublties with seamless navigation

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 9 Jul 2012 23:26:25 +0000 (UTC)
To: Adam Barth <w3c@adambarth.com>
Message-ID: <Pine.LNX.4.64.1207092323450.30734@ps20323.dreamhostps.com>
Cc: whatwg <whatwg@lists.whatwg.org>, Eric Seidel <eric@webkit.org>
On Tue, 10 Apr 2012, Adam Barth wrote:
>
> Consider the following requirement for seamless iframes:
> 
> http://www.whatwg.org/specs/web-apps/current-work/#seamlessLinks
> 
> [[
> If the source browsing context is the same as the browsing context
> being navigated, and this browsing context has its seamless browsing
> context flag set, and the browsing context being navigated was not
> chosen using an explicit self-navigation override, then find the
> nearest ancestor browsing context that does not have its seamless
> browsing context flag set, and continue these steps as if that
> browsing context was the one that was going to be navigated instead.
> ]]
> 
> However, that requirement seems to be a bit too agressive.  For example, 
> setting the "src" attribute on the iframe element loads the document in 
> the iframe using the Navigate keyword.

Uh, yeah. Oops. Fixed.


> Should we be more explicit in 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-iframe-src> 
> about what the source browsing context is?

The more relevant part is:

   http://www.whatwg.org/specs/web-apps/current-work/#process-the-iframe-attributes

It seems pretty explicit, I don't know how to make it more so. :-)

I fixed it by making the navigation in that algorithm always an explicit 
self-navigation override.


> Is it always the browsing context that contains the <iframe> element, or 
> does it depend on which script is manipulating the src attribute (e.g., 
> via the DOM)?

Always the iframe's nested browsing context.


> Should setting the src attribute use an explicit self-navigation 
> override?

Yes.


> The easiest solution is probably to specify the source browsing context 
> explicitly, as we do for window.open 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-open> and 
> location.href 
> <http://www.whatwg.org/specs/web-apps/current-work/#dom-location-href>.

It's already set explicitly, but it's set to its own nested browsing 
context, which is where the problem starts.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 July 2012 23:26:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT