[webkit-changes] cvs commit: WebCore/layout-tests/fast/table overflowHidden-expected.txt overflowHidden.html 029-expected.txt

Beth bdakin at opensource.apple.com
Mon Sep 19 13:54:12 PDT 2005


bdakin      05/09/19 13:54:12

  Modified:    .        ChangeLog
               khtml/css cssstyleselector.cpp
               khtml/rendering render_block.cpp render_box.cpp render_box.h
                        render_layer.cpp render_object.cpp render_object.h
                        render_table.cpp
               layout-tests/fast/table 029-expected.txt
  Added:       layout-tests/fast/table overflowHidden-expected.txt
                        overflowHidden.html
  Log:
  Bug #:
  
  Revision  Changes    Path
  1.133     +36 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- ChangeLog	19 Sep 2005 18:52:09 -0000	1.132
  +++ ChangeLog	19 Sep 2005 20:54:08 -0000	1.133
  @@ -1,3 +1,39 @@
  +2005-09-19  Beth Dakin  <bdakin at apple.com>
  +
  +        Reviewed by Hyatt
  +
  +        Test cases added: fast/table/overflowHidden.html
  +
  +	-Fixed <rdar://problem/3885711> (4047) CSS: Content displays incorrectly in tables with TD style set overflow:hidden
  +	Table cells render correctly with overflow:hidden, :auto, and :scroll specified. Cells now have a layer when overflow is specified.
  +
  +        * khtml/css/cssstyleselector.cpp: Make sure table cells do not honor position:relative
  +        (khtml::CSSStyleSelector::adjustRenderStyle):
  +        * khtml/rendering/render_block.cpp: Add borderTopExtra() and borderBottomExtra() to various calculations of table cell height so that scroll bars render properly.
  +        (khtml::RenderBlock::isPointInScrollbar):
  +        (khtml::RenderBlock::nodeAtPoint):
  +        * khtml/rendering/render_box.cpp: Allow table cells to have overflow, and add borderTopExtra() and borderBottomExtra() to calculation of the clip rect.
  +        (RenderBox::setStyle):
  +        (RenderBox::getOverflowClipRect):
  +        * khtml/rendering/render_box.h: Removed definitions of borderTopExtra() and borderBottomExtra() so that they occur at the RenderObject level now.
  +        * khtml/rendering/render_layer.cpp: Layers must also take borderTopExtra() and borderBottomExtra() into account.
  +        (khtml::RenderLayer::updateLayerPosition):
  +        (khtml::RenderLayer::paintLayer):
  +        (khtml::RenderLayer::hitTestLayer):
  +        * khtml/rendering/render_object.cpp: Use m_overflowClip instead of hasOverflowClip() for consistency.
  +        (RenderObject::requiresLayer):
  +        * khtml/rendering/render_object.h: Add definitions of borderTopExtra() and borderBottomExtra() to RenderObject level.
  +        (khtml::RenderObject::borderTopExtra):
  +        (khtml::RenderObject::borderBottomExtra):
  +        * khtml/rendering/render_table.cpp: Allow table cells to have a layer if overflow is specified.
  +        (RenderTableSection::paint):
  +        (RenderTableCell::requiresLayer):
  +        (RenderTableCell::paint):
  +        (RenderTableCell::paintBoxDecorations):
  +        * layout-tests/fast/table/029-expected.txt: This layout test now paints a layer because it specifies overflow:hidden
  +        * layout-tests/fast/table/overflowHidden-expected.txt: Added.
  +        * layout-tests/fast/table/overflowHidden.html: Added.
  +
   2005-09-14  Maciej Stachowiak  <mjs at apple.com>
   
           Reviewed by Geoff.
  
  
  
  1.205     +3 -3      WebCore/khtml/css/cssstyleselector.cpp
  
  Index: cssstyleselector.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
  retrieving revision 1.204
  retrieving revision 1.205
  diff -u -r1.204 -r1.205
  --- cssstyleselector.cpp	12 Sep 2005 03:40:37 -0000	1.204
  +++ cssstyleselector.cpp	19 Sep 2005 20:54:09 -0000	1.205
  @@ -922,9 +922,9 @@
           }
           
           // After performing the display mutation, check table rows.  We do not honor position:relative on
  -        // table rows.  This has been established in CSS2.1 (and caused a crash in containingBlock() on
  -        // some sites).
  -        if (style->display() == TABLE_ROW && style->position() == RELATIVE)
  +        // table rows or cells.  This has been established in CSS2.1 (and caused a crash in containingBlock()
  +        // on some sites).
  +        if ((style->display() == TABLE_ROW || style->display() == TABLE_CELL) && style->position() == RELATIVE)
               style->setPosition(STATIC);
       }
   
  
  
  
  1.204     +4 -5      WebCore/khtml/rendering/render_block.cpp
  
  Index: render_block.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_block.cpp,v
  retrieving revision 1.203
  retrieving revision 1.204
  diff -u -r1.203 -r1.204
  --- render_block.cpp	16 Sep 2005 22:42:15 -0000	1.203
  +++ render_block.cpp	19 Sep 2005 20:54:09 -0000	1.204
  @@ -2428,9 +2428,9 @@
   
       if (m_layer->verticalScrollbarWidth()) {
           QRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(),
  -                       _ty + borderTop(),
  +                       _ty + borderTop() - borderTopExtra(),
                          m_layer->verticalScrollbarWidth(),
  -                       height()-borderTop()-borderBottom());
  +                       height() + borderTopExtra() + borderBottomExtra() - borderTop() - borderBottom());
           if (vertRect.contains(_x, _y)) {
               RenderLayer::gScrollBar = m_layer->verticalScrollbar();
               return true;
  @@ -2439,8 +2439,8 @@
   
       if (m_layer->horizontalScrollbarHeight()) {
           QRect horizRect(_tx + borderLeft(),
  -                        _ty + height() - borderBottom() - m_layer->horizontalScrollbarHeight(),
  -                        width()-borderLeft()-borderRight(),
  +                        _ty + height() + borderTop() + borderBottomExtra() - m_layer->horizontalScrollbarHeight() - borderBottom(),
  +                        width() - borderLeft() - borderRight(),
                           m_layer->horizontalScrollbarHeight());
           if (horizRect.contains(_x, _y)) {
               RenderLayer::gScrollBar = m_layer->horizontalScrollbar();
  @@ -2475,7 +2475,6 @@
           }
       }
   
  -    // See if we're inside the scrollbar (if we're overflow:scroll/auto).
       if (isPointInScrollbar(_x, _y, tx, ty)) {
           if (hitTestAction == HitTestBlockBackground) {
               setInnerNode(info);
  
  
  
  1.166     +7 -7      WebCore/khtml/rendering/render_box.cpp
  
  Index: render_box.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_box.cpp,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- render_box.cpp	30 Aug 2005 09:30:20 -0000	1.165
  +++ render_box.cpp	19 Sep 2005 20:54:09 -0000	1.166
  @@ -98,17 +98,17 @@
               setRelPositioned(true);
       }
   
  -    // FIXME: Note that we restrict overflow to blocks for now.  One day table bodies and cells 
  +    // FIXME: Note that we restrict overflow to blocks for now.  One day table bodies 
       // will need to support overflow.
       // We also handle <body> and <html>, whose overflow applies to the viewport.
  -    if (_style->overflow() != OVISIBLE && isBlockFlow() && !isTableCell() && !isRoot() && (!isBody() || !document()->isHTMLDocument()))
  +    if (_style->overflow() != OVISIBLE && isBlockFlow() && !isRoot() && (!isBody() || !document()->isHTMLDocument()))
           setHasOverflowClip();
   
       if (requiresLayer()) {
           if (!m_layer) {
               m_layer = new (renderArena()) RenderLayer(this);
               m_layer->insertOnlyThisLayer();
  -            if (containingBlock())
  +            if (parent() && containingBlock())
                   m_layer->updateLayerPositions();
           }
       }
  @@ -587,10 +587,10 @@
       // XXX When overflow-clip (CSS3) is implemented, we'll obtain the property
       // here.
       int bl=borderLeft(),bt=borderTop(),bb=borderBottom(),br=borderRight();
  -    int clipx = tx+bl;
  -    int clipy = ty+bt;
  -    int clipw = m_width-bl-br;
  -    int cliph = m_height-bt-bb;
  +    int clipx = tx + bl;
  +    int clipy = ty + bt;
  +    int clipw = m_width - bl - br;
  +    int cliph = m_height - bt - bb + borderTopExtra() + borderBottomExtra();
   
       // Subtract out scrollbars if we have them.
       if (m_layer) {
  
  
  
  1.56      +0 -3      WebCore/khtml/rendering/render_box.h
  
  Index: render_box.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_box.h,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- render_box.h	27 Aug 2005 00:14:21 -0000	1.55
  +++ render_box.h	19 Sep 2005 20:54:09 -0000	1.56
  @@ -152,9 +152,6 @@
       void paintBackground(QPainter *p, const QColor& c, const BackgroundLayer* bgLayer, int clipy, int cliph, int _tx, int _ty, int w, int h);
       void outlineBox(QPainter *p, int _tx, int _ty, const char *color = "red");
   
  -    virtual int borderTopExtra() const { return 0; }
  -    virtual int borderBottomExtra() const { return 0; }
  -
       void calcAbsoluteHorizontal();
       void calcAbsoluteVertical();
       void calcAbsoluteHorizontalValues(WidthType widthType, RenderObject* cb, int cw, int pab, int static_distance,
  
  
  
  1.104     +9 -8      WebCore/khtml/rendering/render_layer.cpp
  
  Index: render_layer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.cpp,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- render_layer.cpp	31 Aug 2005 04:38:40 -0000	1.103
  +++ render_layer.cpp	19 Sep 2005 20:54:09 -0000	1.104
  @@ -201,7 +201,7 @@
           return;
       
       int x = m_object->xPos();
  -    int y = m_object->yPos();
  +    int y = m_object->yPos() - m_object->borderTopExtra();
   
       if (!m_object->isPositioned()) {
           // We must adjust our position by walking up the render tree looking for the
  @@ -212,6 +212,7 @@
               y += curr->yPos();
               curr = curr->parent();
           }
  +        y += curr->borderTopExtra();
       }
   
       m_relX = m_relY = 0;
  @@ -265,7 +266,7 @@
       setPos(x,y);
   
       setWidth(m_object->width());
  -    setHeight(m_object->height());
  +    setHeight(m_object->height() + m_object->borderTopExtra() + m_object->borderBottomExtra());
   
       if (!m_object->hasOverflowClip()) {
           if (m_object->overflowWidth() > m_object->width())
  @@ -909,7 +910,7 @@
   
           // Paint the background.
           RenderObject::PaintInfo info(p, damageRect, PaintActionBlockBackground, paintingRootForRenderer);
  -        renderer()->paint(info, x - renderer()->xPos(), y - renderer()->yPos());        
  +        renderer()->paint(info, x - renderer()->xPos(), y - renderer()->yPos() + renderer()->borderTopExtra());        
   #if APPLE_CHANGES
           // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
           // z-index.  We paint after we painted the background/border, so that the scrollbars will
  @@ -941,7 +942,7 @@
           setClip(p, paintDirtyRect, clipRectToApply);
   
           int tx = x - renderer()->xPos();
  -        int ty = y - renderer()->yPos();
  +        int ty = y - renderer()->yPos() + renderer()->borderTopExtra();
           RenderObject::PaintInfo info(p, clipRectToApply, 
                                        selectionOnly ? PaintActionSelection : PaintActionChildBlockBackgrounds,
                                        paintingRootForRenderer);
  @@ -1035,8 +1036,8 @@
       // Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
       if (containsPoint(xMousePos, yMousePos, fgRect) && 
           renderer()->hitTest(info, xMousePos, yMousePos,
  -                            layerBounds.x() - renderer()->xPos(),
  -                            layerBounds.y() - renderer()->yPos(), HitTestDescendants)) {
  +                            layerBounds.x() - renderer()->xPos() + m_object->borderLeft(),
  +                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra() - m_object->borderBottom(), HitTestDescendants)) {
           // for positioned generated content, we might still not have a
           // node by the time we get to the layer level, since none of
           // the content in the layer has an element. So just walk up
  @@ -1075,8 +1076,8 @@
       // Next we want to see if the mouse pos is inside this layer but not any of its children.
       if (containsPoint(xMousePos, yMousePos, bgRect) &&
           renderer()->hitTest(info, xMousePos, yMousePos,
  -                            layerBounds.x() - renderer()->xPos(),
  -                            layerBounds.y() - renderer()->yPos(),
  +                            layerBounds.x() - renderer()->xPos() + m_object->borderLeft(),
  +                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra() - m_object->borderBottom(),
                               HitTestSelf))
           return this;
   
  
  
  
  1.216     +1 -1      WebCore/khtml/rendering/render_object.cpp
  
  Index: render_object.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_object.cpp,v
  retrieving revision 1.215
  retrieving revision 1.216
  diff -u -r1.215 -r1.216
  --- render_object.cpp	16 Sep 2005 23:09:59 -0000	1.215
  +++ render_object.cpp	19 Sep 2005 20:54:10 -0000	1.216
  @@ -528,7 +528,7 @@
   bool RenderObject::requiresLayer()
   {
       return isRoot() || isPositioned() || isRelPositioned() || style()->opacity() < 1.0f ||
  -           m_hasOverflowClip;
  +           hasOverflowClip();
   }
   
   RenderBlock* RenderObject::firstLineBlock() const
  
  
  
  1.157     +2 -0      WebCore/khtml/rendering/render_object.h
  
  Index: render_object.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_object.h,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- render_object.h	16 Sep 2005 22:42:16 -0000	1.156
  +++ render_object.h	19 Sep 2005 20:54:10 -0000	1.157
  @@ -661,6 +661,8 @@
       
       virtual int borderTop() const { return style()->borderTopWidth(); }
       virtual int borderBottom() const { return style()->borderBottomWidth(); }
  +    virtual int borderTopExtra() const { return 0; }
  +    virtual int borderBottomExtra() const { return 0; }
       virtual int borderLeft() const { return style()->borderLeftWidth(); }
       virtual int borderRight() const { return style()->borderRightWidth(); }
   
  
  
  
  1.132     +16 -7     WebCore/khtml/rendering/render_table.cpp
  
  Index: render_table.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_table.cpp,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- render_table.cpp	25 Aug 2005 23:13:54 -0000	1.131
  +++ render_table.cpp	19 Sep 2005 20:54:10 -0000	1.132
  @@ -1391,7 +1391,7 @@
   		c--;
   	    for ( ; c < endcol; c++ ) {
   		RenderTableCell *cell = cellAt(r, c);
  -		if (!cell || cell == (RenderTableCell *)-1 )
  +		if (!cell || cell == (RenderTableCell *)-1 || (cell->layer() && i.phase != PaintActionCollapsedTableBorders)) 
   		    continue;
                   
                   // Cells must always paint in the order in which they appear taking into account
  @@ -1702,9 +1702,7 @@
   }
   
   bool RenderTableCell::requiresLayer() {
  -    // FIXME: This is only here until we figure out how to position
  -    // table cells properly when they have layers.
  -    return false;
  +    return isPositioned() || style()->opacity() < 1.0f || hasOverflowClip();
   }
   
   // The following rules apply for resolving conflicts and figuring out which border
  @@ -2039,7 +2037,7 @@
       int os = 2*maximalOutlineSize(i.phase);
       if ((_ty >= i.r.y() + i.r.height() + os) || (_ty + _topExtra + m_height + _bottomExtra <= i.r.y() - os))
           return;
  -    
  +
       if (i.phase == PaintActionCollapsedTableBorders && style()->visibility() == VISIBLE) {
           int w = width();
           int h = height() + borderTopExtra() + borderBottomExtra();
  @@ -2253,8 +2251,19 @@
       int end = kMin(i.r.y() + i.r.height(), _ty + h);
       int mh = end - my;
   
  -    if (bgLayer->hasImage() || c.isValid())
  -	paintBackground(i.p, c, bgLayer, my, mh, _tx, _ty, w, h);
  +    if (bgLayer->hasImage() || c.isValid()) {
  +	// We have to clip here because the backround would paint
  +        // on top of the borders otherwise.
  +        if (m_layer && tableElt->collapseBorders()) {
  +            QRect clipRect(_tx + borderLeft(), _ty + borderTop(), w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
  +            clipRect = i.p->xForm(clipRect);
  +            i.p->save();
  +            i.p->addClip(clipRect);
  +        }
  +        paintBackground(i.p, c, bgLayer, my, mh, _tx, _ty, w, h);
  +        if (m_layer && tableElt->collapseBorders())
  +            i.p->restore();
  +    }
   
       if (style()->hasBorder() && !tableElt->collapseBorders())
           paintBorder(i.p, _tx, _ty, w, h, style());
  
  
  
  1.5       +13 -10    WebCore/layout-tests/fast/table/029-expected.txt
  
  Index: 029-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/table/029-expected.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 029-expected.txt	26 Apr 2004 21:19:02 -0000	1.4
  +++ 029-expected.txt	19 Sep 2005 20:54:11 -0000	1.5
  @@ -6,13 +6,16 @@
         RenderTable {TABLE} at (0,0) size 784x40
           RenderTableSection {TBODY} at (0,0) size 0x40
             RenderTableRow {TR} at (0,0) size 0x0
  -            RenderTableCell {TD} at (0,0) size 150x40 [r=0 c=0 rs=1 cs=1]
  -              RenderTable {TABLE} at (0,0) size 150x40 [border: (10px outset #808080)]
  -                RenderTableSection {TBODY} at (10,10) size 0x20
  -                  RenderTableRow {TR} at (0,0) size 0x0
  -                    RenderTableCell {TD} at (0,0) size 130x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  -                      RenderText {TEXT} at (1,1) size 121x18
  -                        text run at (1,1) width 121: "left column content"
  -            RenderTableCell {TD} at (150,11) size 634x18 [r=0 c=1 rs=1 cs=1]
  -              RenderText {TEXT} at (0,0) size 70x18
  -                text run at (0,0) width 70: "second cell"
  +layer at (8,8) size 150x40
  +  RenderTableCell {TD} at (0,0) size 150x40 [r=0 c=0 rs=1 cs=1]
  +    RenderTable {TABLE} at (0,0) size 150x40 [border: (10px outset #808080)]
  +      RenderTableSection {TBODY} at (10,10) size 0x20
  +        RenderTableRow {TR} at (0,0) size 0x0
  +layer at (18,18) size 130x20 clip at (19,19) size 128x18
  +  RenderTableCell {TD} at (0,0) size 130x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  +    RenderText {TEXT} at (1,1) size 121x18
  +      text run at (1,1) width 121: "left column content"
  +layer at (158,8) size 634x40
  +  RenderTableCell {TD} at (150,11) size 634x18 [r=0 c=1 rs=1 cs=1]
  +    RenderText {TEXT} at (0,0) size 70x18
  +      text run at (0,0) width 70: "second cell"
  
  
  
  1.1                  WebCore/layout-tests/fast/table/overflowHidden-expected.txt
  
  Index: overflowHidden-expected.txt
  ===================================================================
  layer at (0,0) size 785x2414
    RenderCanvas at (0,0) size 785x600
  layer at (0,0) size 785x2414
    RenderBlock {HTML} at (0,0) size 785x2414
      RenderBody {BODY} at (8,8) size 769x2398
        RenderTable {TABLE} at (0,0) size 418x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (306,2) size 106x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,112) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,148) size 718x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,260) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,296) size 718x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,408) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,444) size 418x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,556) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,592) size 418x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (2,2) size 104x104 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,704) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,740) size 618x218 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x214
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (308,2) size 304x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 300x100 [bgcolor=#800080]
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (2,108) size 304x104 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 300x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,958) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,994) size 718x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1106) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,1142) size 718x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1254) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,1290) size 718x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (608,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1402) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {DIV} at (0,1438) size 400x100
          RenderTableSection at (0,0) size 0x100
            RenderTableRow {DIV} at (0,0) size 0x0
              RenderTableCell {DIV} at (300,0) size 100x100 [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1538) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {DIV} at (0,1574) size 400x100
          RenderTableSection at (0,0) size 0x100
            RenderTableRow {DIV} at (0,0) size 0x0
              RenderTableCell {DIV} at (300,0) size 100x100 [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1674) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,1710) size 710x107
          RenderTableSection {TBODY} at (0,0) size 0x107
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (605,0) size 105x107 [border: (3px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,4) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1817) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,1853) size 710x107
          RenderTableSection {TBODY} at (0,0) size 0x107
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (605,0) size 105x107 [border: (3px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,4) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,1960) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,1996) size 418x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,2108) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,2144) size 418x112 [border: (2px outset #808080)]
          RenderTableSection {TBODY} at (2,2) size 0x108
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (308,2) size 104x104 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (2,2) size 100x100 [bgcolor=#800080]
        RenderBlock (anonymous) at (0,2256) size 769x36
          RenderBR {BR} at (0,0) size 0x18
          RenderBR {BR} at (0,18) size 0x18
        RenderTable {TABLE} at (0,2292) size 470x106
          RenderTableSection {TBODY} at (0,0) size 0x106
            RenderTableRow {TR} at (0,0) size 0x0
              RenderTableCell {TD} at (366,2) size 102x102 [r=0 c=1 rs=1 cs=1]
                RenderBlock {DIV} at (1,1) size 100x100 [bgcolor=#800080]
  layer at (12,12) size 302x104 clip at (13,13) size 300x102
    RenderTableCell {TD} at (2,52) size 302x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  layer at (14,90) size 600x18
    RenderBlock (positioned) {DIV} at (14,90) size 600x18 [bgcolor=#00FFFF]
      RenderText {TEXT} at (0,0) size 209x18
        text run at (0,0) width 209: "With absolute positioning on div."
  layer at (12,160) size 604x104 clip at (13,161) size 602x102
    RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  layer at (14,203) size 600x18
    RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#00FFFF]
      RenderText {TEXT} at (0,0) size 129x18
        text run at (0,0) width 129: "With opacity on div."
  layer at (12,308) size 604x104 clip at (13,309) size 602x102
    RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#00FFFF]
        RenderText {TEXT} at (0,0) size 131x18
          text run at (0,0) width 131: "With opacity on cell."
  layer at (12,456) size 304x104 clip at (13,457) size 302x102 scrollWidth 601
    RenderTableCell {TD} at (2,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 27x18
            text run at (0,0) width 27: "Test"
  layer at (118,604) size 304x104 clip at (119,605) size 302x102 scrollWidth 601
    RenderTableCell {TD} at (108,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 82x18
            text run at (0,0) width 82: "Reverse Test"
  layer at (12,752) size 304x104 clip at (13,753) size 302x102 scrollWidth 601
    RenderTableCell {TD} at (2,52) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 81x18
            text run at (0,0) width 81: "Stacked Test"
  layer at (318,858) size 304x104 clip at (319,859) size 302x102 scrollWidth 601
    RenderTableCell {TD} at (308,158) size 304x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 51x18
            text run at (0,0) width 51: "Reverse"
  layer at (12,1006) size 604x104 clip at (13,1007) size 602x102
    RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
  layer at (14,1049) size 600x18
    RenderBlock (relative positioned) {DIV} at (2,2) size 600x18 [bgcolor=#FFA500]
      RenderText {TEXT} at (0,0) size 203x18
        text run at (0,0) width 203: "With relative positioning on div."
  layer at (12,1154) size 604x104 clip at (13,1155) size 602x102
    RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#FFC0CB]
        RenderText {TEXT} at (0,0) size 205x18
          text run at (0,0) width 205: "With relative positioning on cell."
  layer at (12,1302) size 604x104 clip at (13,1303) size 602x102
    RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#FFC0CB]
        RenderText {TEXT} at (0,0) size 290x18
          text run at (0,0) width 290: "With relative positioning and an offset on cell."
  layer at (8,1446) size 300x100 scrollWidth 600
    RenderTableCell {DIV} at (0,41) size 300x18 [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (0,0) size 300x18
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#FFA500]
          RenderText {TEXT} at (0,0) size 141x18
            text run at (0,0) width 141: "With display:table-cell"
  layer at (8,1582) size 300x100 scrollWidth 600
    RenderTableCell {DIV} at (0,41) size 300x18 [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (0,0) size 300x18
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#FFA500]
          RenderText {TEXT} at (0,0) size 278x18
            text run at (0,0) width 278: "With display:table-cell + relative positioning"
  layer at (8,1718) size 605x107 clip at (11,1721) size 602x102
    RenderTableCell {TD} at (0,41) size 605x25 [bgcolor=#808080] [border: (3px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (4,4) size 600x18 [bgcolor=#FFFF00]
        RenderText {TEXT} at (0,0) size 215x18
          text run at (0,0) width 215: "Test with border-collapse:collapse"
  layer at (8,1861) size 605x107 clip at (11,1864) size 602x102
    RenderTableCell {TD} at (0,41) size 605x25 [border: (3px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (4,4) size 600x18 [bgcolor=#FFFF00]
        RenderText {TEXT} at (0,0) size 271x18
          text run at (0,0) width 271: "Test with border-collapse:collapse no color"
  layer at (12,2008) size 304x104 clip at (13,2009) size 302x87 scrollWidth 601
    RenderTableCell {TD} at (2,44) size 304x19 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 151x18
            text run at (0,0) width 151: "Test with overflow:auto"
  layer at (12,2156) size 304x104 clip at (13,2157) size 287x87 scrollWidth 601
    RenderTableCell {TD} at (2,44) size 304x19 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (2,-18) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 158x18
            text run at (0,0) width 158: "Test with overflow:scroll"
  layer at (10,2302) size 362x102 clip at (40,2332) size 302x27 scrollWidth 601
    RenderTableCell {TD} at (2,5) size 362x95 [bgcolor=#808080] [border: (30px solid #000000)] [r=0 c=0 rs=1 cs=1]
      RenderBlock {DIV} at (31,31) size 300x18 [bgcolor=#00FF00]
        RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#008000]
          RenderText {TEXT} at (0,0) size 151x18
            text run at (0,0) width 151: "Test with overflow:auto"
  
  
  
  1.1                  WebCore/layout-tests/fast/table/overflowHidden.html
  
  Index: overflowHidden.html
  ===================================================================
  <html>
  <body>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="position:absolute; top:90px; width:600px; background-color:cyan">With absolute positioning on div.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:600px; background-color:cyan; opacity:0.50;">With opacity on div.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey; opacity:0.50;">
  <div style="width:600px; background-color:cyan">With opacity on cell.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Test</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Reverse Test</div>
  </div>
  </td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Stacked Test</div>
  </div>
  </td>
  <td><div style="height:100px; background-color:purple"></div></td>
  </tr>
  <tr valign=middle>
  <td><div style="height:100px; background-color:purple"></div></td>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Reverse</div>
  </div>
  </td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="position:relative; width:600px; background-color:orange">With relative positioning on div.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; position:relative; background-color:grey">
  <div style="width:600px; background-color:pink">With relative positioning on cell.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:hidden; position:relative; left:100px; background-color:grey">
  <div style="width:600px; background-color:pink">With relative positioning and an offset on cell.</div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <div style="display:table">
  <div style="display:table-row;">
  <div style="display:table-cell;vertical-align:middle; overflow:hidden">
  <div style="width:300px">
  <div style="width:600px; background-color:orange">With display:table-cell</div>
  </div>
  </div>
  <div style="display:table-cell"><div style="height:100px;width:100px; background-color:purple"></div></div>
  </div>
  </div>
  
  <br><br>
  
  <div style="display:table">
  <div style="display:table-row;">
  <div style="position:relative; left:100px; display:table-cell;vertical-align:middle; overflow:hidden">
  <div style="width:300px">
  <div style="width:600px; background-color:orange">With display:table-cell + relative positioning</div>
  </div>
  </div>
  <div style="display:table-cell"><div style="height:100px;width:100px; background-color:purple"></div></div>
  </div>
  </div>
  
  <br><br>
  
  <table border=5 style="border-collapse:collapse">
  <tr valign=middle>
  <td width=300 style="overflow:hidden; background-color:grey">
  <div style="width:600px; background-color:yellow">Test with border-collapse:collapse</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=5 style="border-collapse:collapse">
  <tr valign=middle>
  <td width=300 style="overflow:hidden;">
  <div style="width:600px; background-color:yellow">Test with border-collapse:collapse no color</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:auto; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Test with overflow:auto</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table border=2>
  <tr valign=middle>
  <td width=300 style="overflow:scroll; background-color:grey">
  <div style="width:300px; margin-top:-20px; background-color:lime">
  <div style="width:600px; background-color:green">Test with overflow:scroll</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  <br><br>
  
  <table>
  <tr valign=middle>
  <td width=300 style="overflow:auto; background-color:grey; border: 30px solid black">
  <div style="width:300px; background-color:lime">
  <div style="width:600px; background-color:green">Test with overflow:auto</div>
  </div>
  </td>
  <td><div style="height:100px;width:100px; background-color:purple"></div></td>
  </tr>
  </table>
  
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list