[webkit-changes] cvs commit: WebCore/khtml/xml dom_docimpl.cpp dom_docimpl.h dom_nodeimpl.cpp

David harrison at opensource.apple.com
Fri Nov 18 18:36:27 PST 2005


harrison    05/11/18 18:36:27

  Modified:    .        ChangeLog
               khtml/xml dom_docimpl.cpp dom_docimpl.h dom_nodeimpl.cpp
  Log:
          Reviewed by Tim Hatcher.
  
          http://bugzilla.opendarwin.org/show_bug.cgi?id=5774
          Failed assertion `!eventDispatchForbidden()' in dom_nodeimpl.cpp:892
  
          Tests added: None, becaause it keeps some existing ones from crashing.
  
          * khtml/xml/dom_nodeimpl.cpp:
          (DOM::ContainerNodeImpl::insertBefore):
          (DOM::ContainerNodeImpl::replaceChild):
          (DOM::ContainerNodeImpl::removeChild):
          (DOM::ContainerNodeImpl::appendChild):
          (DOM::ContainerNodeImpl::addChild):
          Call enableEventDispatch() sooner, when basic dom mods are done.
  
  Revision  Changes    Path
  1.384     +17 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.383
  retrieving revision 1.384
  diff -u -r1.383 -r1.384
  --- ChangeLog	19 Nov 2005 01:26:40 -0000	1.383
  +++ ChangeLog	19 Nov 2005 02:36:21 -0000	1.384
  @@ -1,3 +1,20 @@
  +2005-11-18  David Harrison  <harrison at apple.com>
  +
  +        Reviewed by Tim Hatcher.
  +
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=5774
  +        Failed assertion `!eventDispatchForbidden()' in dom_nodeimpl.cpp:892
  +        
  +        Tests added: None, becaause it keeps some existing ones from crashing.
  +        
  +        * khtml/xml/dom_nodeimpl.cpp:
  +        (DOM::ContainerNodeImpl::insertBefore):
  +        (DOM::ContainerNodeImpl::replaceChild):
  +        (DOM::ContainerNodeImpl::removeChild):
  +        (DOM::ContainerNodeImpl::appendChild):
  +        (DOM::ContainerNodeImpl::addChild):
  +        Call enableEventDispatch() sooner, when basic dom mods are done.
  +
   2005-11-18  Vicki Murley  <vicki at apple.com>
   
           Changes by Darin, reviewed by Beth and Vicki.
  
  
  
  1.273     +0 -1      WebCore/khtml/xml/dom_docimpl.cpp
  
  Index: dom_docimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
  retrieving revision 1.272
  retrieving revision 1.273
  diff -u -r1.272 -r1.273
  --- dom_docimpl.cpp	18 Nov 2005 21:34:40 -0000	1.272
  +++ dom_docimpl.cpp	19 Nov 2005 02:36:25 -0000	1.273
  @@ -455,7 +455,6 @@
       resetVisitedLinkColor();
       resetActiveLinkColor();
   
  -    m_eventDispatchForbidden = 0;
       m_processingLoadEvent = false;
       m_startTime.restart();
       m_overMinimumLayoutThreshold = false;
  
  
  
  1.139     +0 -1      WebCore/khtml/xml/dom_docimpl.h
  
  Index: dom_docimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.h,v
  retrieving revision 1.138
  retrieving revision 1.139
  diff -u -r1.138 -r1.139
  --- dom_docimpl.h	18 Nov 2005 21:34:40 -0000	1.138
  +++ dom_docimpl.h	19 Nov 2005 02:36:25 -0000	1.139
  @@ -705,7 +705,6 @@
       KWQAccObjectCache* m_accCache;
   #endif
       
  -    int m_eventDispatchForbidden;
       QPtrList<HTMLImageLoader> m_imageLoadEventDispatchSoonList;
       QPtrList<HTMLImageLoader> m_imageLoadEventDispatchingList;
       int m_imageLoadEventTimer;
  
  
  
  1.213     +13 -25    WebCore/khtml/xml/dom_nodeimpl.cpp
  
  Index: dom_nodeimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- dom_nodeimpl.cpp	18 Nov 2005 21:34:40 -0000	1.212
  +++ dom_nodeimpl.cpp	19 Nov 2005 02:36:25 -0000	1.213
  @@ -890,7 +890,7 @@
   bool NodeImpl::dispatchSubtreeModifiedEvent(bool sendChildrenChanged)
   {
       assert(!eventDispatchForbidden());
  -    
  +
       // FIXME: Pull this whole if clause out of this function.
       if (sendChildrenChanged) {
           notifyNodeListsChildrenChanged();
  @@ -2167,12 +2167,12 @@
           child->setParent(this);
           child->setPreviousSibling(prev);
           child->setNextSibling(refChild);
  +        allowEventDispatch();
   
           // Add child to the rendering tree
           // ### should we detach() it first if it's already attached?
           if (attached() && !child->attached())
               child->attach();
  -        allowEventDispatch();
           
           // Dispatch the mutation events
           dispatchChildInsertedEvents(child,exceptioncode);
  @@ -2229,9 +2229,8 @@
           if (exceptioncode)
               return 0;
   
  -        forbidEventDispatch();
  -
           // Add child in the correct position
  +        forbidEventDispatch();
           if (prev) prev->setNextSibling(child);
           if (next) next->setPreviousSibling(child);
           if(!prev) _first = child;
  @@ -2239,12 +2238,12 @@
           child->setParent(this);
           child->setPreviousSibling(prev);
           child->setNextSibling(next);
  +        allowEventDispatch();
   
           // Add child to the rendering tree
           // ### should we detach() it first if it's already attached?
           if (attached() && !child->attached())
               child->attach();
  -        allowEventDispatch();
   
           // Dispatch the mutation events
           dispatchChildInsertedEvents(child,exceptioncode);
  @@ -2333,10 +2332,10 @@
       oldChild->setNextSibling(0);
       oldChild->setParent(0);
   
  -    getDocument()->setDocumentChanged(true);
  -
       allowEventDispatch();
   
  +    getDocument()->setDocumentChanged(true);
  +
       // Dispatch post-removal mutation events
       dispatchSubtreeModifiedEvent();
   
  @@ -2425,26 +2424,22 @@
                   return 0;
           }
   
  -        forbidEventDispatch();
  -
           // Append child to the end of the list
  +        forbidEventDispatch();
           child->setParent(this);
  -
  -        if(_last)
  -        {
  +        if (_last) {
               child->setPreviousSibling(_last);
               _last->setNextSibling(child);
               _last = child;
           } else
               _first = _last = child;
  +        allowEventDispatch();
   
           // Add child to the rendering tree
           // ### should we detach() it first if it's already attached?
           if (attached() && !child->attached())
               child->attach();
           
  -        allowEventDispatch();
  -        
           // Dispatch the mutation events
           dispatchChildInsertedEvents(child,exceptioncode);
   
  @@ -2508,27 +2503,20 @@
       if (getDocument()->isHTMLDocument() && !childAllowed(newChild))
           return 0;
   
  -    forbidEventDispatch();
  -
       // just add it...
  +    forbidEventDispatch();
       newChild->setParent(this);
  -
  -    if(_last)
  -    {
  +    if(_last) {
           newChild->setPreviousSibling(_last);
           _last->setNextSibling(newChild);
           _last = newChild;
  -    }
  -    else
  -    {
  +    } else
           _first = _last = newChild;
  -    }
  +    allowEventDispatch();
   
       if (inDocument())
           newChild->insertedIntoDocument();
       childrenChanged();
  -
  -    allowEventDispatch();
       
       if(newChild->nodeType() == Node::ELEMENT_NODE)
           return newChild;
  
  
  



More information about the webkit-changes mailing list