[webkit-changes] cvs commit: WebCore/kwq KWQPageState.mm

Adele adele at opensource.apple.com
Tue Jul 12 15:38:02 PDT 2005


adele       05/07/12 15:38:01

  Modified:    .        Tag: Safari-1-3-branch ChangeLog
               khtml    Tag: Safari-1-3-branch khtml_part.cpp
               khtml/xml Tag: Safari-1-3-branch dom_docimpl.cpp
               kwq      Tag: Safari-1-3-branch KWQPageState.mm
  Log:
          Merged fix from TOT to Safari-1-3-branch
          <rdar://problem/4164989>
  
      2005-05-24  Maciej Stachowiak  <mjs at apple.com>
  
          Reviewed by John.
  
  	- fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed
  
          Test cases added:
          * layout-tests/fast/events/onunload-expected.txt: Added.
          * layout-tests/fast/events/onunload.html: Added.
  
          * khtml/xml/dom_docimpl.cpp:
          (DocumentImpl::detach): Don't remove all event handlers from the document here...
          * khtml/khtml_part.cpp:
          (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only
  	if the document is not in the back/forward cache...
          * kwq/KWQPageState.mm:
          (-[KWQPageState finalize]): ...and take care of the back/forward cache case here.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4108.4.34 +23 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4108.4.33
  retrieving revision 1.4108.4.34
  diff -u -r1.4108.4.33 -r1.4108.4.34
  --- ChangeLog	12 Jul 2005 22:27:17 -0000	1.4108.4.33
  +++ ChangeLog	12 Jul 2005 22:37:47 -0000	1.4108.4.34
  @@ -1,6 +1,29 @@
   2005-07-12  Adele Peterson  <adele at apple.com>
   
           Merged fix from TOT to Safari-1-3-branch
  +        <rdar://problem/4164989>
  +
  +    2005-05-24  Maciej Stachowiak  <mjs at apple.com>
  +
  +        Reviewed by John.
  +
  +	- fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed
  +
  +        Test cases added: 
  +        * layout-tests/fast/events/onunload-expected.txt: Added.
  +        * layout-tests/fast/events/onunload.html: Added.
  +
  +        * khtml/xml/dom_docimpl.cpp:
  +        (DocumentImpl::detach): Don't remove all event handlers from the document here...
  +        * khtml/khtml_part.cpp:
  +        (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only
  +	if the document is not in the back/forward cache...
  +        * kwq/KWQPageState.mm:
  +        (-[KWQPageState finalize]): ...and take care of the back/forward cache case here.
  +
  +2005-07-12  Adele Peterson  <adele at apple.com>
  +
  +        Merged fix from TOT to Safari-1-3-branch
           <rdar://problem/4164978>
   
       2005-06-24  Darin Adler  <darin at apple.com>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.311.6.3 +3 -0      WebCore/khtml/khtml_part.cpp
  
  Index: khtml_part.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/khtml_part.cpp,v
  retrieving revision 1.311.6.2
  retrieving revision 1.311.6.3
  diff -u -r1.311.6.2 -r1.311.6.3
  --- khtml_part.cpp	1 Jul 2005 21:12:36 -0000	1.311.6.2
  +++ khtml_part.cpp	12 Jul 2005 22:37:59 -0000	1.311.6.3
  @@ -604,6 +604,9 @@
         d->m_bUnloadEventEmitted = true;
       }
     }
  +
  +  if (d->m_doc && !d->m_doc->inPageCache())
  +    d->m_doc->removeAllEventListenersFromAllNodes();
       
     d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
     d->m_bLoadingMainResource = false;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.211.4.5 +0 -4      WebCore/khtml/xml/dom_docimpl.cpp
  
  Index: dom_docimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
  retrieving revision 1.211.4.4
  retrieving revision 1.211.4.5
  diff -u -r1.211.4.4 -r1.211.4.5
  --- dom_docimpl.cpp	12 Jul 2005 21:18:09 -0000	1.211.4.4
  +++ dom_docimpl.cpp	12 Jul 2005 22:38:00 -0000	1.211.4.5
  @@ -1263,10 +1263,6 @@
       // objects to remove themselves from the lists.
       m_imageLoadEventDispatchSoonList.clear();
       m_imageLoadEventDispatchingList.clear();
  -    
  -    
  -    // FIXME: UNLOAD_EVENT will not dispatch due to deleting event listeners prior to closeURL(). 
  -    removeAllEventListenersFromAllNodes();
   
       NodeBaseImpl::detach();
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.17.6.1  +2 -0      WebCore/kwq/KWQPageState.mm
  
  Index: KWQPageState.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQPageState.mm,v
  retrieving revision 1.17
  retrieving revision 1.17.6.1
  diff -u -r1.17 -r1.17.6.1
  --- KWQPageState.mm	4 Mar 2005 23:59:10 -0000	1.17
  +++ KWQPageState.mm	12 Jul 2005 22:38:01 -0000	1.17.6.1
  @@ -134,6 +134,7 @@
           document->setInPageCache(NO);
           if (detached) {
               document->detach();
  +            document->removeAllEventListenersFromAllNodes();
           }
           document->deref();
           
  @@ -169,6 +170,7 @@
           document->setInPageCache(NO);
           if (detached) {
               document->detach();
  +            document->removeAllEventListenersFromAllNodes();
           }
           document->deref();
           
  
  
  



More information about the webkit-changes mailing list