[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:27:45 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 950eb8401ab904531703c407350d0510a6e668b8
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 27 01:37:26 2004 +0000
Fix for 3528839, wide table cut off because of shorts being used instead of ints.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
(RenderTableCell::setWidth):
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::calcWidthArray):
(FixedTableLayout::calcMinMaxWidth):
(AutoTableLayout::calcMinMaxWidth):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index af62974..e8e7a3d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2004-02-26 David Hyatt <hyatt at apple.com>
+
+ Fix for 3528839, wide table cut off because of shorts being used instead of ints.
+
+ Reviewed by darin
+
+ * khtml/rendering/render_table.cpp:
+ (RenderTableSection::layoutRows):
+ (RenderTableCell::setWidth):
+ * khtml/rendering/table_layout.cpp:
+ (FixedTableLayout::calcWidthArray):
+ (FixedTableLayout::calcMinMaxWidth):
+ (AutoTableLayout::calcMinMaxWidth):
+
2004-02-26 Chris Blumenberg <cblu at apple.com>
Fixed a few problems I found with reconstructed source while on my way to implementing "Mail Page".
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 2f271fc..9d6e83a 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -1227,7 +1227,7 @@ int RenderTableSection::layoutRows( int toAdd )
int rh = rowPos[1]-rowPos[0];
for ( int r = 0; r < totalRows; r++ ) {
if ( totalPercent > 0 && grid[r].height.type == Percent ) {
- int toAdd = QMIN(dh, (totalHeight * grid[r].height.value / 100)-rh);
+ int toAdd = kMin(dh, (totalHeight * grid[r].height.value / 100)-rh);
// If toAdd is negative, then we don't want to shrink the row (this bug
// affected Outlook Web Access).
toAdd = QMAX(0, toAdd);
@@ -1672,7 +1672,6 @@ void RenderTableCell::calcWidth()
void RenderTableCell::setWidth( int width )
{
- assert(width <= SHRT_MAX);
if ( width != m_width ) {
m_width = width;
m_widthChanged = true;
diff --git a/WebCore/khtml/rendering/table_layout.cpp b/WebCore/khtml/rendering/table_layout.cpp
index c73c98a..358f1f5 100644
--- a/WebCore/khtml/rendering/table_layout.cpp
+++ b/WebCore/khtml/rendering/table_layout.cpp
@@ -117,10 +117,9 @@ int FixedTableLayout::calcWidthArray( int tableWidth )
if ( w.isVariable() )
w = grpWidth;
int effWidth = 0;
- if ( w.type == Fixed && w.value > 0 ) {
+ if ( w.type == Fixed && w.value > 0 )
effWidth = w.value;
- effWidth = QMIN( effWidth, 32760 );
- }
+
#ifdef DEBUG_LAYOUT
qDebug(" col element: effCol=%d, span=%d: %d w=%d type=%d",
cCol, span, effWidth, w.value, w.type);
@@ -184,10 +183,9 @@ int FixedTableLayout::calcWidthArray( int tableWidth )
Length w = cell->style()->width();
int span = cell->colSpan();
int effWidth = 0;
- if ( (w.type == Fixed || w.type == Percent) && w.value > 0 ) {
+ if ( (w.type == Fixed || w.type == Percent) && w.value > 0 )
effWidth = w.value;
- effWidth = QMIN( effWidth, 32760 );
- }
+
#ifdef DEBUG_LAYOUT
qDebug(" table cell: effCol=%d, span=%d: %d", cCol, span, effWidth);
#endif
@@ -242,7 +240,7 @@ void FixedTableLayout::calcMinMaxWidth()
int tableWidth = table->style()->width().type == Fixed ? table->style()->width().value - bs : 0;
int mw = calcWidthArray( tableWidth ) + bs;
- table->m_minWidth = kMin(kMax( mw, tableWidth ), 0x7fff);
+ table->m_minWidth = kMax( mw, tableWidth );
table->m_maxWidth = table->m_minWidth;
if ( !tableWidth ) {
@@ -254,7 +252,7 @@ void FixedTableLayout::calcMinMaxWidth()
}
}
if ( haveNonFixed )
- table->m_maxWidth = 0x7fff;
+ table->m_maxWidth = INT_MAX;
}
#ifdef DEBUG_LAYOUT
qDebug("FixedTableLayout::calcMinMaxWidth: minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth );
@@ -615,8 +613,8 @@ void AutoTableLayout::calcMinMaxWidth()
maxWidth = minWidth;
}
- table->m_maxWidth = kMin(maxWidth, 0x7fff);
- table->m_minWidth = kMin(minWidth, 0x7fff);
+ table->m_maxWidth = maxWidth;
+ table->m_minWidth = minWidth;
#ifdef DEBUG_LAYOUT
qDebug(" minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth );
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list