[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.0/kdelibs/khtml/rendering
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2008-04-22 14:16:27
Message-ID: 1208873787.409551.12671.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 799848 by ggarand:

automatically merged revision 799834:
likewise, make sure we always use the padding edge when calculating
the width of a positioned object's containing block. (10.1.4)

BUG: 137606

 M  +7 -7      render_box.cpp  


--- branches/KDE/4.0/kdelibs/khtml/rendering/render_box.cpp #799847:799848
@@ -804,7 +804,11 @@
         //captions are not affected by table border or padding
         return cb->width();
     }
-    if (usesLineWidth())
+    if (isPositioned())
+        // cf. 10.1.4.2 - use padding edge
+        // ### FIXME: still wrong for inline CBs - 10.1.4.1
+        return cb->contentWidth() + cb->paddingLeft() + cb->paddingRight();
+    else if (usesLineWidth())
         return cb->lineWidth(m_y);
     else
         return cb->contentWidth();
@@ -1464,9 +1468,7 @@
     // relative positioned inline.
     const RenderObject* containerBlock = container();
 
-    // FIXME: This is incorrect for cases where the container block is a relatively
-    // positioned inline.
-    const int containerWidth = containingBlockWidth() + \
containerBlock->paddingLeft() + containerBlock->paddingRight(); +    const int \
containerWidth = containingBlockWidth();  
     // To match WinIE, in quirks mode use the parent's 'direction' property
     // instead of the the container block's.
@@ -1982,9 +1984,7 @@
     // We don't use containingBlock(), since we may be positioned by an enclosing \
relpositioned inline.  const RenderObject* containerBlock = container();
 
-    // FIXME: This is incorrect for cases where the container block is a relatively
-    // positioned inline.
-    const int containerWidth = containingBlockWidth() + \
containerBlock->paddingLeft() + containerBlock->paddingRight(); +    const int \
containerWidth = containingBlockWidth();  
     // To match WinIE, in quirks mode use the parent's 'direction' property
     // instead of the the container block's.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic