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

Timothy thatcher at opensource.apple.com
Sun Dec 4 13:01:22 PST 2005


thatcher    05/12/04 13:01:22

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               khtml/rendering Tag: Safari-2-0-branch render_table.cpp
                        table_layout.cpp
  Log:
          Merged fix from TOT to Safari-2-0-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.1.2.92  +26 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.1.2.91
  retrieving revision 1.1.2.92
  diff -u -r1.1.2.91 -r1.1.2.92
  --- ChangeLog	3 Dec 2005 01:17:33 -0000	1.1.2.91
  +++ ChangeLog	4 Dec 2005 21:01:17 -0000	1.1.2.92
  @@ -1,3 +1,29 @@
  +2005-12-04  Timothy Hatcher  <timothy at apple.com>
  +
  +        Merged fix from TOT to Safari-2-0-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.
  +
   === WebCore-417.8 ===
   
   2005-12-02  Adele Peterson  <adele at apple.com>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.123.8.5 +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.123.8.4
  retrieving revision 1.123.8.5
  diff -u -r1.123.8.4 -r1.123.8.5
  --- render_table.cpp	19 Nov 2005 00:11:18 -0000	1.123.8.4
  +++ render_table.cpp	4 Dec 2005 21:01:20 -0000	1.123.8.5
  @@ -932,7 +932,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.22.8.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.8.1
  retrieving revision 1.22.8.2
  diff -u -r1.22.8.1 -r1.22.8.2
  --- table_layout.cpp	17 Nov 2005 22:24:48 -0000	1.22.8.1
  +++ table_layout.cpp	4 Dec 2005 21:01:20 -0000	1.22.8.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.8.1 2005/11/17 22:24:48 thatcher Exp $
  + * $Id: table_layout.cpp,v 1.22.8.2 2005/12/04 21:01:20 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