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

List:       kde-bugs-dist
Subject:    [Bug 131366] Padding-bottom and padding-top not applied to inline
From:       Germain Garand <germain () ebooksfrance ! com>
Date:       2006-08-23 2:50:23
Message-ID: 20060823025023.18286.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=131366         
germain ebooksfrance com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From germain ebooksfrance com  2006-08-23 04:50 -------
SVN commit 576084 by ggarand:

introduce hasTextDescendant flag for inline boxes.
hasTextChildren is good for evaluating a root's strut immediate relevance, 
but not for top/bottom overflow and other quirky shrinking. Those need depth.

BUG: 131366



 M  +3 -3      render_line.cpp  
 M  +9 -2      render_line.h  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_line.cpp #576083:576084
 @ -441,7 +441,7  @
         else if (curr->yPos() == PositionBottom)
             curr->setYPos(y + maxHeight - curr->height());
         else {
-            if (!curr->hasTextChildren() && !strictMode)
+            if (!strictMode && !curr->hasTextDescendant())
                 childAffectsTopBottomPos = false;
             curr->setYPos(curr->yPos() + y + maxAscent - curr->baseline());
         }
 @ -499,7 +499,7  @
             setBaseline(ascent);
         }
 #endif
-        if (hasTextChildren() || strictMode) {
+        if (hasTextDescendant() || strictMode) {
             if (yPos() < topPosition)
                 topPosition = yPos();
             if (yPos() + height() > bottomPosition)
 @ -520,7 +520,7  @
     }
 
     // See if we have text children. If not, then we need to shrink ourselves to fit \
                on the line.
-    if (!hasTextChildren()) {
+    if (!hasTextDescendant()) {
         if (yPos() < topPos)
             setYPos(topPos);
         if (yPos() + height() > bottomPos)
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_line.h #576083:576084
 @ -96,6 +96,7  @
     int baseline() const { return m_baseline; }
 
     virtual bool hasTextChildren() const { return true; }
+    virtual bool hasTextDescendant() const { return true; }
 
     virtual int topOverflow() const { return yPos(); }
     virtual int bottomOverflow() const { return yPos()+height(); }
 @ -155,6 +156,7  @
         m_lastChild = 0;
         m_includeLeftEdge = m_includeRightEdge = false;
         m_hasTextChildren = false;
+        m_hasTextDescendant = false;
         m_afterPageBreak = false;
     }
 
 @ -180,8 +182,11  @
         }
         child->setFirstLineStyleBit(m_firstLine);
         child->setParent(this);
-        if (child->isInlineTextBox())
-            m_hasTextChildren = true;
+        if (!m_hasTextChildren && child->isInlineTextBox()) {
+            m_hasTextDescendant = m_hasTextChildren = true;
+            for (InlineFlowBox* p = m_parent; p && !p->hasTextDescendant(); p = \
p->parent()) +                p->m_hasTextDescendant = true;
+        }
     }
     void removeFromLine(InlineBox* child);
     virtual void paintBackgroundAndBorder(RenderObject::PaintInfo&, int _tx, int \
_ty, int xOffsetOnLine);  @ -207,6 +212,7  @
         m_includeRightEdge = includeRight;
     }
     virtual bool hasTextChildren() const { return m_hasTextChildren; }
+    bool hasTextDescendant() const { return m_hasTextDescendant; }
 
     // Helper functions used during line construction and placement.
     void determineSpacingForFlowBoxes(bool lastLine, RenderObject* endObject);
 @ -235,6 +241,7  @
     bool m_includeLeftEdge : 1;
     bool m_includeRightEdge : 1;
     bool m_hasTextChildren : 1;
+    bool m_hasTextDescendant : 1;
     bool m_afterPageBreak : 1;
 };


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

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