[webkit-changes] cvs commit: WebCore/khtml/rendering render_container.h render_container.cpp render_flow.cpp

David hyatt at opensource.apple.com
Sun Oct 16 23:20:04 PDT 2005


hyatt       05/10/16 23:20:03

  Modified:    .        ChangeLog
               khtml/rendering render_container.h render_container.cpp
                        render_flow.cpp
  Log:
  	Clean up the deletion of anonymous boxes in the render tree.
  	Renamed methods to make it more clear and also added comments.
  
          Reviewed by bdakin
  
          * khtml/rendering/render_container.cpp:
          (RenderContainer::destroy):
          (RenderContainer::destroyLeftoverAnonymousChildren):
          * khtml/rendering/render_container.h:
          * khtml/rendering/render_flow.cpp:
          (RenderFlow::destroy):
  
  Revision  Changes    Path
  1.245     +14 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.244
  retrieving revision 1.245
  diff -u -r1.244 -r1.245
  --- ChangeLog	16 Oct 2005 03:36:01 -0000	1.244
  +++ ChangeLog	17 Oct 2005 06:19:59 -0000	1.245
  @@ -1,3 +1,17 @@
  +2005-10-16  David Hyatt  <hyatt at apple.com>
  +
  +	Clean up the deletion of anonymous boxes in the render tree.
  +	Renamed methods to make it more clear and also added comments.
  +	
  +        Reviewed by bdakin
  +
  +        * khtml/rendering/render_container.cpp:
  +        (RenderContainer::destroy):
  +        (RenderContainer::destroyLeftoverAnonymousChildren):
  +        * khtml/rendering/render_container.h:
  +        * khtml/rendering/render_flow.cpp:
  +        (RenderFlow::destroy):
  +
   2005-10-15  Maciej Stachowiak  <mjs at apple.com>
   
   	Backed out the following changes, since they are in a range that
  
  
  
  1.20      +1 -1      WebCore/khtml/rendering/render_container.h
  
  Index: render_container.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_container.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- render_container.h	13 Oct 2005 00:35:47 -0000	1.19
  +++ render_container.h	17 Oct 2005 06:20:02 -0000	1.20
  @@ -49,7 +49,7 @@
       virtual void removeChild(RenderObject *oldChild);
   
       virtual void destroy();
  -    void destroyChildren();
  +    void destroyLeftoverAnonymousChildren();
       
       virtual RenderObject* removeChildNode(RenderObject* child);
       virtual void appendChildNode(RenderObject* child);
  
  
  
  1.75      +3 -8      WebCore/khtml/rendering/render_container.cpp
  
  Index: render_container.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_container.cpp,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- render_container.cpp	13 Oct 2005 00:35:47 -0000	1.74
  +++ render_container.cpp	17 Oct 2005 06:20:02 -0000	1.75
  @@ -59,20 +59,15 @@
   
   void RenderContainer::destroy()
   {
  -    if (m_first)
  -        destroyChildren();
  -    
  +    destroyLeftoverAnonymousChildren();
       RenderBox::destroy();
   }
   
  -void RenderContainer::destroyChildren()
  +void RenderContainer::destroyLeftoverAnonymousChildren()
   {
  -    if (continuation())
  -        continuation()->destroy();
  -    
       while (m_first) {
           if (m_first->isListMarker())
  -            m_first->remove();
  +            m_first->remove();  // List markers are owned by their enclosing list and so don't get destroyed by this container.
           else
               m_first->destroy();
       }
  
  
  
  1.169     +7 -1      WebCore/khtml/rendering/render_flow.cpp
  
  Index: render_flow.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_flow.cpp,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -u -r1.168 -r1.169
  --- render_flow.cpp	13 Oct 2005 00:35:47 -0000	1.168
  +++ render_flow.cpp	17 Oct 2005 06:20:03 -0000	1.169
  @@ -183,7 +183,13 @@
   
   void RenderFlow::destroy()
   {
  -    RenderContainer::destroyChildren();
  +    // Detach our continuation first.
  +    if (m_continuation)
  +        m_continuation->destroy();
  +    
  +    // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
  +    // properly dirty line boxes that they are removed from.  Effects that do :before/:after only on hover could crash otherwise.
  +    RenderContainer::destroyLeftoverAnonymousChildren();
       
       if (!documentBeingDestroyed()) {
           if (m_firstLineBox) {
  
  
  



More information about the webkit-changes mailing list