surrogate issues

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

surrogate issues

Post by al_9x »

NS 2.1, new profile, defaults NS settings
  1. !@* and @* match empty about:blank iframes (<iframe></iframe>) in Fx 3.6.16 and not in Fx 4.0.0. Just to be clear these are not frames whose document.URL is not yet returning the right url, but real about:blank frames. In 2.0.9.9 they didn't. I am guessing the 4.0.0 & 2.0.9.9 behavior is correct, maybe even more efficient, excluding about:blank early in the processing
  2. @* is invoked twice on a normal iframe (Fx 3.6.16, 4.0.0 is ok):

    surrogate:

    Code: Select all

    dump('@ surrogate - '+window.name+' : '+document.URL+'\n');
    
    page:

    Code: Select all

    <html>
    <head>
    <script>
    function evHandler(e)
    {
    	dump(e.type + '\n');
    }
    function writeFrame()
    {
    	var w = document.getElementById('frame1').contentWindow;
    	w.document.open();
    	//w.addEventListener('load', evHandler, false);
    	//w.addEventListener('DOMContentLoaded', evHandler, false);
    	w.document.write('doc.written');
    	w.document.close();
    }
    function changeSource()
    {
    	document.getElementById('frame1').src = 'empty.htm';
    }
    </script>
    </head>
    <body>
    <button onclick="writeFrame();">write frame</button>
    <button onclick="changeSource();">change src</button><br>
    <iframe id="frame1" name="frame1"></iframe><br>
    <iframe id="frame2" name="frame2" src="empty.htm"></iframe>
    </body>
    </html>
    
    dump (also illustrates the first issue), f5 produces 1 dump for frame1, ctrl-f5 produces 2, and both produce 2 for frame2

    Code: Select all

    @ surrogate -  : http://localhost/tests/iframe/docwritten.htm
    @ surrogate - frame1 : about:blank
    @ surrogate - frame2 : about:blank
    @ surrogate - frame1 : about:blank
    @ surrogate - frame2 : http://localhost/tests/iframe/empty.htm
    
    Also, check the error console, there's an ABE LOCAL rule match for both the parent and the iframe, it doesn't stop the loading but why the message?
  3. doc.written iframe does not invoke either @* or @!* in Fx 3.6.16, but does in Fx 4.0.0
Last edited by al_9x on Sun Mar 27, 2011 6:44 am, edited 2 times in total.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: surrogate issues

Post by al_9x »

al_9x wrote:Also, check the error console, there's an ABE LOCAL rule match for both the parent and the iframe, it doesn't stop the loading but why the message?
This is fixed in 2.1.0.1rc1.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: surrogate issues

Post by Giorgio Maone »

al_9x wrote:!@* and @* match empty about:blank iframes (<iframe></iframe>) in Fx 3.6.16 and not in Fx 4.0.0. Just to be clear these are not frames whose document.URL is not yet returning the right url, but real about:blank frames. In 2.0.9.9 they didn't. I am guessing the 4.0.0 & 2.0.9.9 behavior is correct, maybe even more efficient, excluding about:blank early in the processing
Yes, likely, but not a top priority since Fx 4.0 has the desired behavior. As you've seen Script Surrogates are not easy to handle without side effect, so if it's not (utterly) broken I wouldn't touch it.
al_9x wrote:@* is invoked twice on a normal iframe (Fx 3.6.16, 4.0.0 is ok):
This is likely a variant of the issue above, and it depends on the fact surrogates are triggered by a different (and earlier) event in Fx 3.6 (which intercepts about:blank before the actual load) while Fx 4 exposes a new event, which comes a bit later and for regular content documents only.
al_9x wrote: Also, check the error console, there's an ABE LOCAL rule match for both the parent and the iframe, it doesn't stop the loading but why the message?

Code: Select all

doc.written iframe does not invoke either @* or @!* in Fx 3.6.16, but does in Fx 4.0.0
This does deserve more investigation.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Post Reply