[webkit-changes] cvs commit: WebCore/khtml/rendering render_table.cpp table_layout.cpp

Beth bdakin at opensource.apple.com
Fri Dec 2 18:29:00 PST 2005


bdakin      05/12/02 18:28:59

  Modified:    .        ChangeLog
               khtml/rendering render_table.cpp table_layout.cpp
  Log:
  Bug #:
  
  Revision  Changes    Path
  1.462     +22 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.461
  retrieving revision 1.462
  diff -u -r1.461 -r1.462
  --- ChangeLog	3 Dec 2005 01:44:14 -0000	1.461
  +++ ChangeLog	3 Dec 2005 02:28:54 -0000	1.462
  @@ -1,3 +1,25 @@
  +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  Eric Seidel  <eseidel at apple.com>
   
           Reviewed by Tim H.
  
  
  
  1.143     +1 -1      WebCore/khtml/rendering/render_table.cpp
  
  Index: render_table.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_table.cpp,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- render_table.cpp	30 Nov 2005 02:51:57 -0000	1.142
  +++ render_table.cpp	3 Dec 2005 02:28:59 -0000	1.143
  @@ -880,7 +880,7 @@
       // <TR><TD colspan="2">5
       // </TABLE>
   
  -    while (cCol < nCols && cellAt(cRow, cCol).cell)
  +    while (cCol < nCols && (cellAt(cRow, cCol).cell || cellAt(cRow, cCol).inColSpan))
   	cCol++;
   
       if (rSpan == 1) {
  
  
  
  1.28      +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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- table_layout.cpp	30 Nov 2005 02:51:57 -0000	1.27
  +++ table_layout.cpp	3 Dec 2005 02:28:59 -0000	1.28
  @@ -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.27 2005/11/30 02:51:57 eseidel Exp $
  + * $Id: table_layout.cpp,v 1.28 2005/12/03 02:28:59 bdakin Exp $
    */
   #include "config.h"
   #include "table_layout.h"
  @@ -757,7 +757,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 && haveAuto && fixedWidth <= cMinWidth ) {
   			int w = kMax( layoutStruct[pos].effMinWidth, layoutStruct[pos].width.value );
   			fixedWidth -= layoutStruct[pos].width.value;
  @@ -771,9 +771,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 && haveAuto && fixedWidth <= cMinWidth) ) {
  -                        int w = kMax( layoutStruct[pos].effMinWidth, cMinWidth * layoutStruct[pos].effMaxWidth / maxw );
  +                        int w = kMax( layoutStruct[pos].effMinWidth, maxw ? (cMinWidth * layoutStruct[pos].effMaxWidth / maxw) : cMinWidth );
                           w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
                                                   
   #ifdef DEBUG_LAYOUT
  @@ -792,8 +792,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 = kMax( layoutStruct[pos].effMaxWidth, cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth );
  +		for ( unsigned int pos = col; maxWidth >= 0 && pos < lastCol; pos++ ) {
  +		    int w = kMax( 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