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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2007-01-07 18:19:55
Message-ID: 1168193995.131035.7712.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 620910 by carewolf:

Give up trying to make a nice break, when a table makes one impossible.
BUG: 120651


 M  +9 -8      bidi.cpp  
 M  +1 -1      render_table.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/bidi.cpp #620909:620910
@@ -1579,13 +1579,14 @@
             kdDebug( 6040 ) << "Widows: " << widows << endl;
             // Check if we have enough orphans after respecting widows count
             int newOrphans = orphans - (style()->widows() - widows);
-            if (newOrphans < style()->orphans() && parent()->canClear(this,PageBreakHarder))
-            {
-                // Relayout to remove incorrect page-break
-                setNeedsPageClear(true);
-                setContainsPageBreak(false);
-                layoutInlineChildren(relayoutChildren, -1);
-                return;
+            if (newOrphans < style()->orphans()) {
+                if (parent()->canClear(this,PageBreakHarder)) {
+                    // Relayout to remove incorrect page-break
+                    setNeedsPageClear(true);
+                    setContainsPageBreak(false);
+                    layoutInlineChildren(relayoutChildren, -1);
+                    return;
+                }
             } else {
                 // Set hint and try again
                 layoutInlineChildren(relayoutChildren, newOrphans+1);
@@ -1903,7 +1904,7 @@
 #endif
                 if (ignoringSpaces) {
                     // We need to stop ignoring spaces, if we encounter a non-space or
-                    // a run that doesn't collapse spaces
+                    // a run that doesn't collapse spaces.
                     if (!currentCharacterIsSpace || preserveWS) {
                         // Stop ignoring spaces and begin at this
                         // new point.
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.cpp #620909:620910
@@ -1825,7 +1825,7 @@
                 RenderTableCell *cell = cellAt(r, c);
                 if (!cell || cell == (RenderTableCell *)-1 )
                     continue;
-                if ( r < totalRows - 1 && cell == cellAt(r+1, c) )
+                if ( r > 0 && cell == cellAt(r-1, c) )
                     continue;
 
                 if ( ( rindx = r-cell->rowSpan()+1 ) < 0 )
[prev in list] [next in list] [prev in thread] [next in thread] 

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