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

Beth bdakin at opensource.apple.com
Wed Oct 12 17:35:49 PDT 2005


bdakin      05/10/12 17:35:48

  Modified:    .        ChangeLog
               .        ChangeLog
               khtml/rendering render_container.cpp render_container.h
                        render_flow.cpp
  Added:       fast/dynamic genContentDestroyChildren-expected.checksum
                        genContentDestroyChildren-expected.png
                        genContentDestroyChildren-expected.txt
                        genContentDestroyChildren.html
  Log:
  
  
  Revision  Changes    Path
  1.32      +10 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ChangeLog	12 Oct 2005 20:58:19 -0000	1.31
  +++ ChangeLog	13 Oct 2005 00:35:39 -0000	1.32
  @@ -1,3 +1,13 @@
  +2005-10-12  Beth Dakin  <bdakin at apple.com>
  +
  +        Added a layout test for <rdar://problem/4112378> CSS :hover:after crash 
  +	- khtml::inlineWidth. The fix is in WebCore.
  +
  +        * fast/dynamic/genContentDestroyChildren-expected.checksum: Added.
  +        * fast/dynamic/genContentDestroyChildren-expected.png: Added.
  +        * fast/dynamic/genContentDestroyChildren-expected.txt: Added.
  +        * fast/dynamic/genContentDestroyChildren.html: Added.
  +
   2005-10-12  Darin Adler  <darin at apple.com>
   
           - removed some old results for tests that are no longer present
  
  
  
  1.1                  LayoutTests/fast/dynamic/genContentDestroyChildren-expected.checksum
  
  Index: genContentDestroyChildren-expected.checksum
  ===================================================================
  15cac89da4bae09cd72c117d1ad92bca
  
  
  1.1                  LayoutTests/fast/dynamic/genContentDestroyChildren-expected.png
  
  	<<Binary file>>
  
  
  1.1                  LayoutTests/fast/dynamic/genContentDestroyChildren-expected.txt
  
  Index: genContentDestroyChildren-expected.txt
  ===================================================================
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x600
    RenderBlock {HTML} at (0,0) size 800x600
      RenderBody {BODY} at (8,8) size 784x584
        RenderBlock {DIV} at (0,0) size 784x128
          RenderInline {A} at (0,0) size 128x14
            RenderImage {IMG} at (0,0) size 128x128
            RenderBR {BR} at (0,0) size 0x0
          RenderText {TEXT} at (0,0) size 0x0
  
  
  
  1.1                  LayoutTests/fast/dynamic/genContentDestroyChildren.html
  
  Index: genContentDestroyChildren.html
  ===================================================================
  <html>
  	<head>
  		<style>
                          .haveContent:after { content: "foo"; }
  		</style>
  	</head>
  	<body>
  		<div>
  			<a id="foo" class="haveContent"><img src="file:///System/Library/CoreServices/loginwindow.app/Contents/Resources/loginwindow.png" alt=""/><br/></a>
  		</div>
                  
                 <script>
                          document.body.offsetWidth;
                          document.getElementById('foo').className='';
                          document.body.offsetWidth;
                  </script>
  	</body>
  </html>
  
  
  
  1.236     +21 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.235
  retrieving revision 1.236
  diff -u -r1.235 -r1.236
  --- ChangeLog	12 Oct 2005 06:55:36 -0000	1.235
  +++ ChangeLog	13 Oct 2005 00:35:40 -0000	1.236
  @@ -1,3 +1,24 @@
  +2005-10-12  Beth Dakin  <bdakin at apple.com>
  +
  +        Reviewed by Hyatt
  +
  +	Fix for <rdar://problem/4112378> CSS :hover:after crash - khtml::inlineWidth
  +	RenderFlows needed to destroy all of their children within RenderFlow. This
  +	used to happen only in RenderFlow's parent class, RenderContainer. But for
  +	some children to be completely destroyed, the parent flow still needs to be
  +	around. Specifically in the case when there is generated content and a line
  +	break, which maintained a stray reference to the destroyed RenderObject through 
  +	the lineBreakObj() of a RootInlineBox. 
  +
  +        * khtml/rendering/render_container.cpp: 
  +        (RenderContainer::destroy): Took the destruction of children out of destroy(),
  +				moved to new function, and only call function when m_first
  +				is still around.
  +        (RenderContainer::destroyChildren): New function for destruction of children.
  +        * khtml/rendering/render_container.h:
  +        * khtml/rendering/render_flow.cpp:
  +        (RenderFlow::destroy): Call RenderContainer::destroyChildren() at the beginning.
  +
   2005-10-11  Darin Adler  <darin at apple.com>
   
           Reviewed by Eric.
  
  
  
  1.74      +8 -2      WebCore/khtml/rendering/render_container.cpp
  
  Index: render_container.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_container.cpp,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- render_container.cpp	6 Oct 2005 21:48:09 -0000	1.73
  +++ render_container.cpp	13 Oct 2005 00:35:47 -0000	1.74
  @@ -59,6 +59,14 @@
   
   void RenderContainer::destroy()
   {
  +    if (m_first)
  +        destroyChildren();
  +    
  +    RenderBox::destroy();
  +}
  +
  +void RenderContainer::destroyChildren()
  +{
       if (continuation())
           continuation()->destroy();
       
  @@ -68,8 +76,6 @@
           else
               m_first->destroy();
       }
  -
  -    RenderBox::destroy();
   }
   
   bool RenderContainer::canHaveChildren() const
  
  
  
  1.19      +1 -0      WebCore/khtml/rendering/render_container.h
  
  Index: render_container.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_container.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- render_container.h	6 Oct 2005 00:53:56 -0000	1.18
  +++ render_container.h	13 Oct 2005 00:35:47 -0000	1.19
  @@ -49,6 +49,7 @@
       virtual void removeChild(RenderObject *oldChild);
   
       virtual void destroy();
  +    void destroyChildren();
       
       virtual RenderObject* removeChildNode(RenderObject* child);
       virtual void appendChildNode(RenderObject* child);
  
  
  
  1.168     +2 -0      WebCore/khtml/rendering/render_flow.cpp
  
  Index: render_flow.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_flow.cpp,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- render_flow.cpp	6 Oct 2005 00:53:56 -0000	1.167
  +++ render_flow.cpp	13 Oct 2005 00:35:47 -0000	1.168
  @@ -183,6 +183,8 @@
   
   void RenderFlow::destroy()
   {
  +    RenderContainer::destroyChildren();
  +    
       if (!documentBeingDestroyed()) {
           if (m_firstLineBox) {
               // We can't wait for RenderContainer::destroy to clear the selection,
  
  
  



More information about the webkit-changes mailing list