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

List:       kde-commits
Subject:    KDE/kdelibs/khtml/rendering
From:       Germain Garand <germain () ebooksfrance ! org>
Date:       2009-03-14 4:35:40
Message-ID: 1237005340.250443.15022.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 939172 by ggarand:

merge two Apple one liners resulting from spec clarification on www-style
(text-bottom alignment, behaviour of borders of inline flows when
interrupted by block-level elements)


 M  +3 -4      render_line.cpp  
 M  +3 -2      render_object.cpp  


--- trunk/KDE/kdelibs/khtml/rendering/render_line.cpp #939171:939172
@@ -438,14 +438,13 @@
 
     RenderFlow* flow = static_cast<RenderFlow*>(object());
 
-    if (!flow->firstChild())
-        includeLeftEdge = includeRightEdge = true; // Empty inlines never split across lines.
-    else if (parent()) { // The root inline box never has borders/margins/padding.
+    // The root inline box never has borders/margins/padding.
+    if (parent()) {
         bool ltr = flow->style()->direction() == LTR;
 
         // Check to see if all initial lines are unconstructed.  If so, then
         // we know the inline began on this line.
-        if (!flow->firstLineBox()->isConstructed()) {
+        if (!flow->firstLineBox()->isConstructed() && !object()->isInlineContinuation()) {
             if (ltr && flow->firstLineBox() == this)
                 includeLeftEdge = true;
             else if (!ltr && flow->lastLineBox() == this)
--- trunk/KDE/kdelibs/khtml/rendering/render_object.cpp #939171:939172
@@ -2593,8 +2593,9 @@
                 vpos += -b.height()/2 - lineHeight( firstLine )/2 + baselinePosition( firstLine );
             } else if ( va == TEXT_BOTTOM ) {
                 vpos += QFontMetrics(f).descent() + QFontMetrics(f).leading()/2;
-                if ( !isReplaced() )
-                    vpos -= fontMetrics(firstLine).descent();
+                if ( !isReplaced() ) {
+                    vpos -= (lineHeight(firstLine) - baselinePosition(firstLine));
+                }
             } else if ( va == BASELINE_MIDDLE )
                 vpos += - lineHeight( firstLine )/2 + baselinePosition( firstLine );
         }
[prev in list] [next in list] [prev in thread] [next in thread] 

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