[Bug 13144] designMode needs to persist when an iframe is navigated

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13144

--- Comment #1 from Aryeh Gregor <Simetrical+w3cbug@gmail.com> 2011-07-05 14:49:16 UTC ---
Testcase:

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1058

This sets designMode to "on" on an iframe's document, then navigates the iframe
to a bunch of different pages.  In IE9, Firefox 6.0a2, and Chrome 14 dev,
designMode remains on across all the navigations, including cross-domain and to
and from about:blank.  In Opera 11.50, it apparently switches to off when the
document is navigated to a different domain, which is of course wrong because
it doesn't match the other browsers.

As I read the current spec, new Document objects have their designMode off, and
navigating a page creates a new Document object.  This does not seem to be
correct.  The navigation algorithm probably needs to set designMode on the new
document to on if the old document was in an iframe and had designMode on.

This does only apply to iframes.  I couldn't test easily with Live DOM Viewer,
but I created two pages like

  <!doctype html><script>
  document.designMode = "on";
  location = "/tmp/test2.html";
  </script>

and

  <!doctype html><script>alert(document.designMode)</script>

and Firefox 6.0a2, Chrome 14 dev, and Opera 11.50 all alert "off".  (IE9
doesn't perform the navigation, since it immediately stops executing script
when designMode is turned on.)

I didn't test with XML or any other funky cases, but presumably for consistency
we'd want the same behavior for HTML over HTTP as everything else.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 5 July 2011 14:49:17 UTC