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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:24:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d44ec82fb1f4c2bff4e25bd366127a4ccd8f6a3c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 7 16:58:15 2003 +0000

            Reviewed by Ken.
    
            - fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value
    
            * khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
            width computations use int instead of short.
            * khtml/rendering/table_layout.cpp:
            (FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
            specified fixed width value is huge.
            (FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
            (AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
            this file, rather than using 10000.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3593 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f73c81b..7b8f33e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2003-02-07  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value
+
+        * khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
+        width computations use int instead of short.
+        * khtml/rendering/table_layout.cpp:
+        (FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
+        specified fixed width value is huge.
+        (FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
+        (AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
+        this file, rather than using 10000.
+
 2003-02-06  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f73c81b..7b8f33e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2003-02-07  Darin Adler  <darin at apple.com>
+
+        Reviewed by Ken.
+
+        - fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value
+
+        * khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
+        width computations use int instead of short.
+        * khtml/rendering/table_layout.cpp:
+        (FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
+        specified fixed width value is huge.
+        (FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
+        (AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
+        this file, rather than using 10000.
+
 2003-02-06  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/khtml/rendering/table_layout.cpp b/WebCore/khtml/rendering/table_layout.cpp
index 2bfc8d2..a296e6c 100644
--- a/WebCore/khtml/rendering/table_layout.cpp
+++ b/WebCore/khtml/rendering/table_layout.cpp
@@ -234,15 +234,13 @@ void FixedTableLayout::calcMinMaxWidth()
     // unlimited.
 
     int bs = table->bordersAndSpacing();
-    table->m_minWidth = 0;
-    table->m_maxWidth = 0;
-    short tableWidth = table->style()->width().type == Fixed ? table->style()->width().value - bs : 0;
-
-    table->m_minWidth = calcWidthArray( tableWidth );
-    table->m_minWidth += bs;
+    
+    int tableWidth = table->style()->width().type == Fixed ? table->style()->width().value - bs : 0;
+    int mw = calcWidthArray( tableWidth ) + bs;
 
-    table->m_minWidth = kMax( table->m_minWidth, tableWidth );
+    table->m_minWidth = kMin(kMax( mw, tableWidth ), 0x7fff);
     table->m_maxWidth = table->m_minWidth;
+    
     if ( !tableWidth ) {
 	bool haveNonFixed = false;
 	for ( unsigned int i = 0; i < width.size(); i++ ) {
@@ -269,7 +267,7 @@ void FixedTableLayout::layout()
 #endif
 
 
-    QMemArray<short> calcWidth;
+    QMemArray<int> calcWidth;
     calcWidth.resize( nEffCols );
     calcWidth.fill( -1 );
 
@@ -557,12 +555,8 @@ void AutoTableLayout::calcMinMaxWidth()
 	maxWidth = minWidth;
     }
 
-    // Max widths can overflow. We need to bounds check them.
-    if (maxWidth > 10000)
-        maxWidth = 10000;
-    
-    table->m_maxWidth = maxWidth;
-    table->m_minWidth = minWidth;
+    table->m_maxWidth = kMin(maxWidth, 0x7fff);
+    table->m_minWidth = kMin(minWidth, 0x7fff);
 #ifdef DEBUG_LAYOUT
     qDebug("    minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth );
 #endif
diff --git a/WebCore/khtml/rendering/table_layout.h b/WebCore/khtml/rendering/table_layout.h
index 7fdae35..496279a 100644
--- a/WebCore/khtml/rendering/table_layout.h
+++ b/WebCore/khtml/rendering/table_layout.h
@@ -94,11 +94,11 @@ protected:
 		   calcWidth( 0 ) {}
 	Length width;
 	Length effWidth;
-	short minWidth;
-	short maxWidth;
-	short effMinWidth;
-	short effMaxWidth;
-	short calcWidth;
+	int minWidth;
+	int maxWidth;
+	int effMinWidth;
+	int effMaxWidth;
+	int calcWidth;
     };
 
     QMemArray<Layout> layoutStruct;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list