[webkit-changes] cvs commit: WebCore/khtml/rendering
table_layout.cpp
Timothy
thatcher at opensource.apple.com
Sun Dec 4 13:02:59 PST 2005
thatcher 05/12/04 13:02:59
Modified: . Tag: Safari-1-3-branch ChangeLog
khtml/rendering Tag: Safari-1-3-branch table_layout.cpp
Log:
Merged fix from TOT to Safari-1-3-branch
2005-12-02 Darin Adler <darin at apple.com>
Reviewed by Beth
Fix for <rdar://problem/4358898> TOT/GLENDALE REGRESSION: Table
layout issue occurs at http://www.pixar.com/shorts/index.html and
http://www.mitzpettel.com.
This fix rolls a line from the fix for <rdar://problem/3871165>
text box in nested table disappears when you click on it (3452)
(Safari PSOFT: US EDU PS8: Lead List searches). This line causes
the above regressions. To fix the original problem, we realized
that TableLayout::calcEffectiveWidth() essentially ignored setting
the minimum and maximum widths of cells of width 0 (thereby ignoring
cells in colspans).
* khtml/rendering/render_table.cpp:
(RenderTableSection::addCell): Roll out from the original fix.
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::calcEffectiveWidth): Set effMinWidth and effMaxWidth
of a cell even when maxw or maxWidth is 0.
Revision Changes Path
No revision
No revision
1.335.2.46 +26 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.335.2.45
retrieving revision 1.335.2.46
diff -u -r1.335.2.45 -r1.335.2.46
--- ChangeLog 3 Dec 2005 00:00:31 -0000 1.335.2.45
+++ ChangeLog 4 Dec 2005 21:02:56 -0000 1.335.2.46
@@ -1,3 +1,29 @@
+2005-12-04 Timothy Hatcher <timothy at apple.com>
+
+ Merged fix from TOT to Safari-1-3-branch
+
+ 2005-12-02 Darin Adler <darin at apple.com>
+
+ Reviewed by Beth
+
+ Fix for <rdar://problem/4358898> TOT/GLENDALE REGRESSION: Table
+ layout issue occurs at http://www.pixar.com/shorts/index.html and
+ http://www.mitzpettel.com.
+
+ This fix rolls a line from the fix for <rdar://problem/3871165>
+ text box in nested table disappears when you click on it (3452)
+ (Safari PSOFT: US EDU PS8: Lead List searches). This line causes
+ the above regressions. To fix the original problem, we realized
+ that TableLayout::calcEffectiveWidth() essentially ignored setting
+ the minimum and maximum widths of cells of width 0 (thereby ignoring
+ cells in colspans).
+
+ * khtml/rendering/render_table.cpp:
+ (RenderTableSection::addCell): Roll out from the original fix.
+ * khtml/rendering/table_layout.cpp:
+ (AutoTableLayout::calcEffectiveWidth): Set effMinWidth and effMaxWidth
+ of a cell even when maxw or maxWidth is 0.
+
2005-12-02 Timothy Hatcher <timothy at apple.com>
Merged fix from TOT to Safari-1-3-branch
No revision
No revision
1.22.6.2 +6 -6 WebCore/khtml/rendering/table_layout.cpp
Index: table_layout.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/table_layout.cpp,v
retrieving revision 1.22.6.1
retrieving revision 1.22.6.2
diff -u -r1.22.6.1 -r1.22.6.2
--- table_layout.cpp 17 Nov 2005 22:36:38 -0000 1.22.6.1
+++ table_layout.cpp 4 Dec 2005 21:02:59 -0000 1.22.6.2
@@ -20,7 +20,7 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
- * $Id: table_layout.cpp,v 1.22.6.1 2005/11/17 22:36:38 thatcher Exp $
+ * $Id: table_layout.cpp,v 1.22.6.2 2005/12/04 21:02:59 thatcher Exp $
*/
#include "table_layout.h"
#include "render_table.h"
@@ -756,7 +756,7 @@
int minw = minWidth;
// Give min to variable first, to fixed second, and to others third.
- for ( unsigned int pos = col; maxw > 0 && pos < lastCol; pos++ ) {
+ for ( unsigned int pos = col; maxw >= 0 && pos < lastCol; pos++ ) {
if ( layoutStruct[pos].width.type == Fixed && haveVariable && fixedWidth <= cMinWidth ) {
int w = QMAX( layoutStruct[pos].effMinWidth, layoutStruct[pos].width.value );
fixedWidth -= layoutStruct[pos].width.value;
@@ -770,9 +770,9 @@
}
}
- for ( unsigned int pos = col; maxw > 0 && pos < lastCol && minw < cMinWidth; pos++ ) {
+ for ( unsigned int pos = col; maxw >= 0 && pos < lastCol && minw < cMinWidth; pos++ ) {
if ( !(layoutStruct[pos].width.type == Fixed && haveVariable && fixedWidth <= cMinWidth) ) {
- int w = QMAX( layoutStruct[pos].effMinWidth, cMinWidth * layoutStruct[pos].effMaxWidth / maxw );
+ int w = QMAX( layoutStruct[pos].effMinWidth, maxw ? (cMinWidth * layoutStruct[pos].effMaxWidth / maxw) : cMinWidth );
w = QMIN(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
#ifdef DEBUG_LAYOUT
@@ -791,8 +791,8 @@
#ifdef DEBUG_LAYOUT
qDebug("extending maxWidth of cols %d-%d to %dpx", col, lastCol-1, cMaxWidth );
#endif
- for ( unsigned int pos = col; maxWidth > 0 && pos < lastCol; pos++ ) {
- int w = QMAX( layoutStruct[pos].effMaxWidth, cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth );
+ for ( unsigned int pos = col; maxWidth >= 0 && pos < lastCol; pos++ ) {
+ int w = QMAX( layoutStruct[pos].effMaxWidth, maxWidth ? (cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth) : cMaxWidth );
#ifdef DEBUG_LAYOUT
qDebug(" col %d: max=%d, effMax=%d, new=%d", pos, layoutStruct[pos].effMaxWidth, layoutStruct[pos].effMaxWidth, w );
#endif
More information about the webkit-changes
mailing list