[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:32:34 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 2b3b6e0d20bafbefd3dd17f67b361b2f87dd066d
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Apr 6 21:03:24 2004 +0000

    	After columns have been expanded to their preferred sizes, if space is left over in the table, then
    	fixed columns should expand to fill space before percentage width columns do.  The old code had it
    	backwards.
    
            Reviewed by john
    
            * khtml/rendering/table_layout.cpp:
            (AutoTableLayout::layout):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1823102..cfdcf4b 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2004-04-06  David Hyatt  <hyatt at apple.com>
+
+	After columns have been expanded to their preferred sizes, if space is left over in the table, then
+	fixed columns should expand to fill space before percentage width columns do.  The old code had it
+	backwards.
+	
+        Reviewed by john
+
+        * khtml/rendering/table_layout.cpp:
+        (AutoTableLayout::layout):
+
 2004-04-06  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Dave
diff --git a/WebCore/khtml/rendering/table_layout.cpp b/WebCore/khtml/rendering/table_layout.cpp
index 358f1f5..75f8f01 100644
--- a/WebCore/khtml/rendering/table_layout.cpp
+++ b/WebCore/khtml/rendering/table_layout.cpp
@@ -999,41 +999,41 @@ void AutoTableLayout::layout()
     qDebug("variable satisfied: available is %d",  available );
 #endif
 
-    // spread over percent colums
-    if ( available > 0 && hasPercent && totalPercent < 100) {
-        // still have some width to spread, distribute weighted to percent columns
+    // spread over fixed columns
+    if (available > 0 && numFixed) {
+        // still have some width to spread, distribute to fixed columns
         for ( int i = 0; i < nEffCols; i++ ) {
             Length &width = layoutStruct[i].effWidth;
-            if ( width.isPercent() ) {
-                int w = available * width.value / totalPercent;
+            if ( width.isFixed() ) {
+                int w = available * layoutStruct[i].effMaxWidth / totalFixed;
                 available -= w;
-                totalPercent -= width.value;
+                totalFixed -= layoutStruct[i].effMaxWidth;
                 layoutStruct[i].calcWidth += w;
-                if (!available || !totalPercent) break;
             }
         }
     }
-
+    
 #ifdef DEBUG_LAYOUT
-    qDebug("after percent distribution: available=%d",  available );
+    qDebug("after fixed distribution: available=%d",  available );
 #endif
     
-    // spread over fixed colums
-    if ( available > 0 && numFixed) {
-        // still have some width to spread, distribute to fixed columns
+    // spread over percent colums
+    if (available > 0 && hasPercent && totalPercent < 100) {
+        // still have some width to spread, distribute weighted to percent columns
         for ( int i = 0; i < nEffCols; i++ ) {
             Length &width = layoutStruct[i].effWidth;
-            if ( width.isFixed() ) {
-                int w = available * layoutStruct[i].effMaxWidth / totalFixed;
+            if ( width.isPercent() ) {
+                int w = available * width.value / totalPercent;
                 available -= w;
-                totalFixed -= layoutStruct[i].effMaxWidth;
+                totalPercent -= width.value;
                 layoutStruct[i].calcWidth += w;
+                if (!available || !totalPercent) break;
             }
         }
     }
 
 #ifdef DEBUG_LAYOUT
-    qDebug("after fixed distribution: available=%d",  available );
+    qDebug("after percent distribution: available=%d",  available );
 #endif
 
     // spread over the rest

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list