Closed
      
        Bug 617525
      
      
        Opened 14 years ago
          Closed 14 years ago
      
        
    
  
MozAfterPaint events are delivered differently for in-process and out-of-process frame scripts  
    Categories
(Core :: IPC, defect)
        Core
          
        
        
      
        
    
        IPC
          
        
        
      
        
    Tracking
()
        RESOLVED
        FIXED
        
    
  
People
(Reporter: cjones, Assigned: cjones)
References
Details
Attachments
(2 files)
| 
        
        
         1.36 KB,
          patch         
       | 
      Details | Diff | Splinter Review | |
| 
        
        
         896 bytes,
          patch         
       | 
      
           roc
 :
              
              review+
          cjones
 :
              
              feedback+
          roc
 :
              
              approval2.0+
           | 
      Details | Diff | Splinter Review | 
I saw tests fail in bug 615386 because the in-process message-manager was delivering MozAfterPaint events differently than out-of-process (out-of-process was actually passing the test, in-process failing it).
Tentatively marking as a blocker of bug 615386, but not a hard blocker.  I can work around this, but I'd rather not (obviously).
Test coming up.
(smaug, please let me know if this is the preferred component for mm bugs.)
| Assignee | ||
          Comment 1•14 years ago
           
         | 
      ||
STR
 (1) Apply patch, rebuild
 (2) Run
$ firefox -no-remote -chrome chrome://global/content/test-ipcbrowser.xul 2>&1 | grep '\[content\]'
 (3) Edit layout/ipc/test-ipcbrowser.xul so that the <browser> has remote="false"
 (4) Rebuild
 (5) Repeat step (2)
The results I see are
remote="true"
[content] Saw MozAfterPaint for subdocument (data:text/html,<font%20color=red>old%20innermost)
[content] Saw MozAfterPaint for subdocument (http://people.mozilla.com/~cjones/subdoc-inner.html)
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
[content] Saw MozAfterPaint for subdocument (data:text/html,<body%20onload='function%20w(md,%20t)%20{%20%20%20%20t.p(0);%20%20%20%20md.write(t.replacementForMiddleFrame);%20%20%20%20t.p(3);%20%20%20%20t.p(md.documentElement.innerHTML);%20%20%20%20md.close();%20%20%20%20t.p(4);}w(parent.document,%20top);'><font%20color=blue>new%20innermost)
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
remote="false"
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
[content] Saw MozAfterPaint for subdocument (data:text/html,<body%20onload='function%20w(md,%20t)%20{%20%20%20%20t.p(0);%20%20%20%20md.write(t.replacementForMiddleFrame);%20%20%20%20t.p(3);%20%20%20%20t.p(md.documentElement.innerHTML);%20%20%20%20md.close();%20%20%20%20t.p(4);}w(parent.document,%20top);'><font%20color=blue>new%20innermost)
I expect the events delivered to be the same for remote=true and =false.
I can work around this in reftests by attaching my MozAfterPaint listener to the top-level window.
| Assignee | ||
          Comment 2•14 years ago
           
         | 
      ||
Also FTR, the test page linked from test-ipcbrowser.xul, http://people.mozilla.com/~cjones/subdoc.html, is just a slightly modified version of layout/reftests/bugs/212563-2.html.
| Assignee | ||
          Comment 3•14 years ago
           
         | 
      ||
Another data point:
With remote="false" and this change to test-ipcbrowser-content.js,
//addEventListener("MozAfterPaint", logMozAfterPaint, false);
const CI = Components.interfaces;
var gTopWindow = docShell.QueryInterface(CI.nsIDocShellTreeItem)
                 .parent.QueryInterface(CI.nsIInterfaceRequestor)
                 .getInterface(CI.nsIDOMWindow);
gTopWindow.addEventListener("MozAfterPaint", logMozAfterPaint, false);
I see the event log
[content] Saw MozAfterPaint for subdocument (undefined)
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
[content] Saw MozAfterPaint for subdocument (data:text/html,<body%20onload='function%20w(md,%20t)%20{%20%20%20%20t.p(0);%20%20%20%20md.write(t.replacementForMiddleFrame);%20%20%20%20t.p(3);%20%20%20%20t.p(md.documentElement.innerHTML);%20%20%20%20md.close();%20%20%20%20t.p(4);}w(parent.document,%20top);'><font%20color=blue>new%20innermost)
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
[content] Saw MozAfterPaint for subdocument (undefined)
which is different than either of the other two.  *scratches head*
          Comment 4•14 years ago
           
         | 
      ||
This is still untested.
| Assignee | ||
          Comment 5•14 years ago
           
         | 
      ||
For remote=false, this patch gives a fourth, different result.
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
[content] Saw MozAfterPaint for subdocument (data:text/html,<body%20onload='function%20w(md,%20t)%20{%20%20%20%20t.p(0);%20%20%20%20md.write(t.replacementForMiddleFrame);%20%20%20%20t.p(3);%20%20%20%20t.p(md.documentElement.innerHTML);%20%20%20%20md.close();%20%20%20%20t.p(4);}w(parent.document,%20top);'><font%20color=blue>new%20innermost)
[content] Saw MozAfterPaint for document (http://people.mozilla.com/~cjones/subdoc.html)
This includes the MozAfterPaints important to this reftest (the ones to "document"), so ought to work.  Will give a full rundown when other work settles.
| Assignee | ||
          Updated•14 years ago
           
         | 
      
Summary: Event deliver semantics differ between in-process and out-of-process message manager (just for MozAfterPaint?) → MozAfterPaint events are delivered differently for in-process and out-of-process frame scripts
          Updated•14 years ago
           
         | 
      
        Attachment #496119 -
        Flags: review?(jones.chris.g)
| Assignee | ||
          Comment 6•14 years ago
           
         | 
      ||
I'm really not the right guy to review this change, but I can feedback+ that it seems to fix the reftest issue I saw.
smaug, would roc perhaps be better?
          Updated•14 years ago
           
         | 
      
        Attachment #496119 -
        Flags: review?(roc)
        Attachment #496119 -
        Flags: review?(jones.chris.g)
        Attachment #496119 -
        Flags: feedback?(jones.chris.g)
| Assignee | ||
          Updated•14 years ago
           
         | 
      
        Attachment #496119 -
        Flags: feedback?(jones.chris.g) → feedback+
        Attachment #496119 -
        Flags: review?(roc) → review+
| Assignee | ||
          Updated•14 years ago
           
         | 
      
        Attachment #496119 -
        Flags: approval2.0?
        Attachment #496119 -
        Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
          Updated•14 years ago
           
         | 
      
Assignee: nobody → jones.chris.g
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•