Changeset 56655 in webkit


Ignore:
Timestamp:
Mar 26, 2010 10:08:58 PM (14 years ago)
Author:
dbates@webkit.org
Message:

2010-03-26 Daniel Bates <dbates@rim.com>

Reviewed by Beth Dakin.

https://bugs.webkit.org/show_bug.cgi?id=9268

As per sections 14.2 (http://www.w3.org/TR/CSS2/colors.html#background)
and 17.5.1 (http://www.w3.org/TR/CSS2/tables.html#table-layers) of the
CSS 2.1 spec., the background-image of a table-row should span the
entire area of the table-row (i.e cover all the <td>'s). Moreover,
fixes background image painting with respect to row-groups, columns
and column-groups (*).

Currently, the background-image of a table row, row-group, and column-group
is inherited by the table cells. This directly contradicts section 14.2.
Instead, the background-image should cover the entire area of the table row,
row-group, column, or column-group, respectively as described in section 17.5.1.

(*) A follow up patch to compute the absolute content box of a column, and
column-group is needed so that background image positioning for these table
elements works. See bug #36104.

Tests: fast/table/table-background.html

fast/table/table-cell-border-draws-on-top-of-col-background.html
fast/table/table-cell-border-draws-on-top-of-col-group-background.html
fast/table/table-cell-border-draws-on-top-of-row-background.html
fast/table/table-cell-border-draws-on-top-of-row-group-background.html
fast/table/table-cell-overrides-row-background.html
fast/table/table-col-background.html
fast/table/table-col-group-background.html
fast/table/table-col-group-col-span-background.html
fast/table/table-col-group-span-background.html
fast/table/table-col-span-background.html
fast/table/table-row-background-left-50px.html
fast/table/table-row-background-right-100percent.html
fast/table/table-row-background-right-50px.html
fast/table/table-row-background.html
fast/table/table-row-group-background-positioned.html
fast/table/table-row-group-background.html

  • rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Modified to call RenderObject::adjustBackgroundImagePosition.
  • rendering/RenderBoxModelObject.h:
  • rendering/RenderObject.h: (WebCore::RenderObject::adjustBackgroundImagePosition): Added.
  • rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::adjustBackgroundImagePosition): Added.
  • rendering/RenderTableCell.h:

2010-03-26 Daniel Bates <dbates@rim.com>

Reviewed by Beth Dakin.

https://bugs.webkit.org/show_bug.cgi?id=9268

Tests that background-image support for table, table-cell, table-row,
row-group, table-column and column-group (*) conform to section 17.5.1
of the CSS 2.1 spec.

(*) A follow up patch to compute the absolute content box of a column, and
column-group is needed so that background image positioning for these table
elements works. See bug #36104.

  • fast/table/table-background.html: Added.
  • fast/table/table-cell-border-draws-on-top-of-col-background.html: Added.
  • fast/table/table-cell-border-draws-on-top-of-col-group-background.html: Added.
  • fast/table/table-cell-border-draws-on-top-of-row-background.html: Added.
  • fast/table/table-cell-border-draws-on-top-of-row-group-background.html: Added.
  • fast/table/table-cell-overrides-row-background.html: Added.
  • fast/table/table-col-background.html: Added.
  • fast/table/table-col-group-background.html: Added.
  • fast/table/table-col-group-col-span-background.html: Added.
  • fast/table/table-col-group-span-background.html: Added.
  • fast/table/table-col-span-background.html: Added.
  • fast/table/table-row-background-left-50px.html: Added.
  • fast/table/table-row-background-right-100percent.html: Added.
  • fast/table/table-row-background-right-50px.html: Added.
  • fast/table/table-row-background.html: Added.
  • fast/table/table-row-group-background-positioned.html: Added.
  • fast/table/table-row-group-background.html: Added.
  • platform/mac/fast/table/table-background-expected.checksum: Added.
  • platform/mac/fast/table/table-background-expected.png: Added.
  • platform/mac/fast/table/table-background-expected.txt: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.checksum: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.png: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.txt: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.checksum: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.png: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.txt: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.checksum: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.png: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.txt: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.checksum: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.png: Added.
  • platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.txt: Added.
  • platform/mac/fast/table/table-cell-overrides-row-background-expected.checksum: Added.
  • platform/mac/fast/table/table-cell-overrides-row-background-expected.png: Added.
  • platform/mac/fast/table/table-cell-overrides-row-background-expected.txt: Added.
  • platform/mac/fast/table/table-col-background-expected.checksum: Added.
  • platform/mac/fast/table/table-col-background-expected.png: Added.
  • platform/mac/fast/table/table-col-background-expected.txt: Added.
  • platform/mac/fast/table/table-col-group-background-expected.checksum: Added.
  • platform/mac/fast/table/table-col-group-background-expected.png: Added.
  • platform/mac/fast/table/table-col-group-background-expected.txt: Added.
  • platform/mac/fast/table/table-col-group-col-span-background-expected.checksum: Added.
  • platform/mac/fast/table/table-col-group-col-span-background-expected.png: Added.
  • platform/mac/fast/table/table-col-group-col-span-background-expected.txt: Added.
  • platform/mac/fast/table/table-col-group-span-background-expected.checksum: Added.
  • platform/mac/fast/table/table-col-group-span-background-expected.png: Added.
  • platform/mac/fast/table/table-col-group-span-background-expected.txt: Added.
  • platform/mac/fast/table/table-col-span-background-expected.checksum: Added.
  • platform/mac/fast/table/table-col-span-background-expected.png: Added.
  • platform/mac/fast/table/table-col-span-background-expected.txt: Added.
  • platform/mac/fast/table/table-row-background-expected.checksum: Added.
  • platform/mac/fast/table/table-row-background-expected.png: Added.
  • platform/mac/fast/table/table-row-background-expected.txt: Added.
  • platform/mac/fast/table/table-row-background-left-50px-expected.checksum: Added.
  • platform/mac/fast/table/table-row-background-left-50px-expected.png: Added.
  • platform/mac/fast/table/table-row-background-left-50px-expected.txt: Added.
  • platform/mac/fast/table/table-row-background-right-100percent-expected.checksum: Added.
  • platform/mac/fast/table/table-row-background-right-100percent-expected.png: Added.
  • platform/mac/fast/table/table-row-background-right-100percent-expected.txt: Added.
  • platform/mac/fast/table/table-row-background-right-50px-expected.checksum: Added.
  • platform/mac/fast/table/table-row-background-right-50px-expected.png: Added.
  • platform/mac/fast/table/table-row-background-right-50px-expected.txt: Added.
  • platform/mac/fast/table/table-row-group-background-expected.checksum: Added.
  • platform/mac/fast/table/table-row-group-background-expected.png: Added.
  • platform/mac/fast/table/table-row-group-background-expected.txt: Added.
  • platform/mac/fast/table/table-row-group-background-positioned-expected.checksum: Added.
  • platform/mac/fast/table/table-row-group-background-positioned-expected.png: Added.
  • platform/mac/fast/table/table-row-group-background-positioned-expected.txt: Added.
Location:
trunk
Files:
68 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r56651 r56655  
     12010-03-26  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Beth Dakin.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=9268
     6
     7        Tests that background-image support for table, table-cell, table-row,
     8        row-group, table-column and column-group (*) conform to section 17.5.1
     9        of the CSS 2.1 spec.
     10
     11        (*) A follow up patch to compute the absolute content box of a column, and
     12        column-group is needed so that background image positioning for these table
     13        elements works. See bug #36104.
     14
     15        * fast/table/table-background.html: Added.
     16        * fast/table/table-cell-border-draws-on-top-of-col-background.html: Added.
     17        * fast/table/table-cell-border-draws-on-top-of-col-group-background.html: Added.
     18        * fast/table/table-cell-border-draws-on-top-of-row-background.html: Added.
     19        * fast/table/table-cell-border-draws-on-top-of-row-group-background.html: Added.
     20        * fast/table/table-cell-overrides-row-background.html: Added.
     21        * fast/table/table-col-background.html: Added.
     22        * fast/table/table-col-group-background.html: Added.
     23        * fast/table/table-col-group-col-span-background.html: Added.
     24        * fast/table/table-col-group-span-background.html: Added.
     25        * fast/table/table-col-span-background.html: Added.
     26        * fast/table/table-row-background-left-50px.html: Added.
     27        * fast/table/table-row-background-right-100percent.html: Added.
     28        * fast/table/table-row-background-right-50px.html: Added.
     29        * fast/table/table-row-background.html: Added.
     30        * fast/table/table-row-group-background-positioned.html: Added.
     31        * fast/table/table-row-group-background.html: Added.
     32        * platform/mac/fast/table/table-background-expected.checksum: Added.
     33        * platform/mac/fast/table/table-background-expected.png: Added.
     34        * platform/mac/fast/table/table-background-expected.txt: Added.
     35        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.checksum: Added.
     36        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.png: Added.
     37        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-background-expected.txt: Added.
     38        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.checksum: Added.
     39        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.png: Added.
     40        * platform/mac/fast/table/table-cell-border-draws-on-top-of-col-group-background-expected.txt: Added.
     41        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.checksum: Added.
     42        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.png: Added.
     43        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-background-expected.txt: Added.
     44        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.checksum: Added.
     45        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.png: Added.
     46        * platform/mac/fast/table/table-cell-border-draws-on-top-of-row-group-background-expected.txt: Added.
     47        * platform/mac/fast/table/table-cell-overrides-row-background-expected.checksum: Added.
     48        * platform/mac/fast/table/table-cell-overrides-row-background-expected.png: Added.
     49        * platform/mac/fast/table/table-cell-overrides-row-background-expected.txt: Added.
     50        * platform/mac/fast/table/table-col-background-expected.checksum: Added.
     51        * platform/mac/fast/table/table-col-background-expected.png: Added.
     52        * platform/mac/fast/table/table-col-background-expected.txt: Added.
     53        * platform/mac/fast/table/table-col-group-background-expected.checksum: Added.
     54        * platform/mac/fast/table/table-col-group-background-expected.png: Added.
     55        * platform/mac/fast/table/table-col-group-background-expected.txt: Added.
     56        * platform/mac/fast/table/table-col-group-col-span-background-expected.checksum: Added.
     57        * platform/mac/fast/table/table-col-group-col-span-background-expected.png: Added.
     58        * platform/mac/fast/table/table-col-group-col-span-background-expected.txt: Added.
     59        * platform/mac/fast/table/table-col-group-span-background-expected.checksum: Added.
     60        * platform/mac/fast/table/table-col-group-span-background-expected.png: Added.
     61        * platform/mac/fast/table/table-col-group-span-background-expected.txt: Added.
     62        * platform/mac/fast/table/table-col-span-background-expected.checksum: Added.
     63        * platform/mac/fast/table/table-col-span-background-expected.png: Added.
     64        * platform/mac/fast/table/table-col-span-background-expected.txt: Added.
     65        * platform/mac/fast/table/table-row-background-expected.checksum: Added.
     66        * platform/mac/fast/table/table-row-background-expected.png: Added.
     67        * platform/mac/fast/table/table-row-background-expected.txt: Added.
     68        * platform/mac/fast/table/table-row-background-left-50px-expected.checksum: Added.
     69        * platform/mac/fast/table/table-row-background-left-50px-expected.png: Added.
     70        * platform/mac/fast/table/table-row-background-left-50px-expected.txt: Added.
     71        * platform/mac/fast/table/table-row-background-right-100percent-expected.checksum: Added.
     72        * platform/mac/fast/table/table-row-background-right-100percent-expected.png: Added.
     73        * platform/mac/fast/table/table-row-background-right-100percent-expected.txt: Added.
     74        * platform/mac/fast/table/table-row-background-right-50px-expected.checksum: Added.
     75        * platform/mac/fast/table/table-row-background-right-50px-expected.png: Added.
     76        * platform/mac/fast/table/table-row-background-right-50px-expected.txt: Added.
     77        * platform/mac/fast/table/table-row-group-background-expected.checksum: Added.
     78        * platform/mac/fast/table/table-row-group-background-expected.png: Added.
     79        * platform/mac/fast/table/table-row-group-background-expected.txt: Added.
     80        * platform/mac/fast/table/table-row-group-background-positioned-expected.checksum: Added.
     81        * platform/mac/fast/table/table-row-group-background-positioned-expected.png: Added.
     82        * platform/mac/fast/table/table-row-group-background-positioned-expected.txt: Added.
     83
    1842010-03-26  Justin Schuh  <jschuh@chromium.org>
    285
  • trunk/WebCore/ChangeLog

    r56653 r56655  
     12010-03-26  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Beth Dakin.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=9268
     6
     7        As per sections 14.2 (http://www.w3.org/TR/CSS2/colors.html#background)
     8        and 17.5.1 (http://www.w3.org/TR/CSS2/tables.html#table-layers) of the
     9        CSS 2.1 spec., the background-image of a table-row should span the
     10        entire area of the table-row (i.e cover all the <td>'s). Moreover,
     11        fixes background image painting with respect to row-groups, columns
     12        and column-groups (*).
     13
     14        Currently, the background-image of a table row, row-group, and column-group
     15        is inherited by the table cells. This directly contradicts section 14.2.
     16        Instead, the background-image should cover the entire area of the table row,
     17        row-group, column, or column-group, respectively as described in section 17.5.1.
     18
     19        (*) A follow up patch to compute the absolute content box of a column, and
     20        column-group is needed so that background image positioning for these table
     21        elements works. See bug #36104.
     22
     23        Tests: fast/table/table-background.html
     24               fast/table/table-cell-border-draws-on-top-of-col-background.html
     25               fast/table/table-cell-border-draws-on-top-of-col-group-background.html
     26               fast/table/table-cell-border-draws-on-top-of-row-background.html
     27               fast/table/table-cell-border-draws-on-top-of-row-group-background.html
     28               fast/table/table-cell-overrides-row-background.html
     29               fast/table/table-col-background.html
     30               fast/table/table-col-group-background.html
     31               fast/table/table-col-group-col-span-background.html
     32               fast/table/table-col-group-span-background.html
     33               fast/table/table-col-span-background.html
     34               fast/table/table-row-background-left-50px.html
     35               fast/table/table-row-background-right-100percent.html
     36               fast/table/table-row-background-right-50px.html
     37               fast/table/table-row-background.html
     38               fast/table/table-row-group-background-positioned.html
     39               fast/table/table-row-group-background.html
     40
     41        * rendering/RenderBoxModelObject.cpp:
     42        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
     43        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Modified
     44        to call RenderObject::adjustBackgroundImagePosition.
     45        * rendering/RenderBoxModelObject.h:
     46        * rendering/RenderObject.h:
     47        (WebCore::RenderObject::adjustBackgroundImagePosition): Added.
     48        * rendering/RenderTableCell.cpp:
     49        (WebCore::RenderTableCell::adjustBackgroundImagePosition): Added.
     50        * rendering/RenderTableCell.h:
     51
    1522010-03-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    253
  • trunk/WebCore/rendering/RenderBoxModelObject.cpp

    r56239 r56655  
    601601        IntSize tileSize;
    602602
    603         calculateBackgroundImageGeometry(bgLayer, tx, ty, w, h, destRect, phase, tileSize);
     603        calculateBackgroundImageGeometry(bgLayer, tx, ty, w, h, destRect, phase, tileSize, backgroundObject);
    604604        IntPoint destOrigin = destRect.location();
    605605        destRect.intersect(paintInfo.rect);
     
    681681
    682682void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fillLayer, int tx, int ty, int w, int h,
    683                                                             IntRect& destRect, IntPoint& phase, IntSize& tileSize)
     683                                                            IntRect& destRect, IntPoint& phase, IntSize& tileSize, RenderObject* backgroundObject)
    684684{
    685685    int left = 0;
     
    701701#endif
    702702
     703    // FIXME: Add table columns/column groups to this condition once RenderTableCol::absoluteContentBox(),
     704    // RenderTableCol::width() and RenderTableCol::height() have been implemented. See bug <https://bugs.webkit.org/show_bug.cgi?id=36104>.
     705    bool isBackgroundTablePart = backgroundObject && (backgroundObject->isTableRow() || backgroundObject->isTableSection());
     706
    703707    if (!fixedAttachment) {
    704         destRect = IntRect(tx, ty, w, h);
     708        destRect = isBackgroundTablePart ? toRenderBox(backgroundObject)->absoluteBoundingBoxRect() : IntRect(tx, ty, w, h);
    705709
    706710        int right = 0;
     
    727731            left += marginLeft();
    728732            top += marginTop();
     733        } else if (isBackgroundTablePart) {
     734            positioningAreaSize = IntSize(toRenderBox(backgroundObject)->width() - left - right, toRenderBox(backgroundObject)->height() - top - bottom);
     735            left += marginLeft();
     736            top += marginTop();
    729737        } else
    730738            positioningAreaSize = IntSize(w - left - right, h - top - bottom);
     
    761769
    762770    destRect.intersect(IntRect(tx, ty, w, h));
     771
     772    if (adjustBackgroundImagePosition(backgroundObject, destRect, tileSize, xPosition, yPosition)) {
     773        phase.setX(tileSize.width() ? tileSize.width() - xPosition % tileSize.width() : 0);
     774        phase.setY(tileSize.height() ? tileSize.height() - yPosition % tileSize.height() : 0);
     775    }
    763776}
    764777
  • trunk/WebCore/rendering/RenderBoxModelObject.h

    r54113 r56655  
    102102
    103103protected:
    104     void calculateBackgroundImageGeometry(const FillLayer*, int tx, int ty, int w, int h, IntRect& destRect, IntPoint& phase, IntSize& tileSize);
     104    void calculateBackgroundImageGeometry(const FillLayer*, int tx, int ty, int w, int h, IntRect& destRect, IntPoint& phase, IntSize& tileSize, RenderObject* backgroundObject = 0);
    105105
    106106private:
  • trunk/WebCore/rendering/RenderObject.h

    r55980 r56655  
    628628    // Called to repaint a block's floats.
    629629    virtual void repaintOverhangingFloats(bool paintAllDescendants = false);
     630
     631    // Called to adjust the background image offset when painting the background.
     632    virtual bool adjustBackgroundImagePosition(const RenderObject* /*backgroundObject*/, const IntRect& /*clipRect*/, const IntSize& /*imageSize*/, int& /*xPosition*/, int& /*yPosition*/) { return false; }
    630633
    631634    bool checkForRepaintDuringLayout() const;
  • trunk/WebCore/rendering/RenderTableCell.cpp

    r56319 r56655  
    896896}
    897897
     898bool RenderTableCell::adjustBackgroundImagePosition(const RenderObject* backgroundObject, const IntRect& clipRect, const IntSize& tileSize, int& xPosition, int& yPosition)
     899{
     900    if (!backgroundObject)
     901        return false;
     902
     903    // Initially, the xPosition, yPosition represent the background offset with
     904    // respect to the absolute content box of backgroundObject. We adjust these
     905    // offsets so that they are with respect to this table cell.
     906    //
     907    // The clipRect describes how the background image is positioned inside
     908    // this table cell. Moreover, it is the rectangle that will be painted with
     909    // the background image.
     910    int absClipRectX = clipRect.x();
     911    int absClipRectY = clipRect.y();
     912
     913    // Notice that the clipRect is contained within the absolute content box of the table.
     914    // So, to work out the offsets relative to the content box of the table we take the
     915    // difference between the location of the absolute content box of the table and the
     916    // location of the clipRect.
     917    IntRect absTableContentBox = table()->absoluteContentBox();
     918    int absTableX = absTableContentBox.x();
     919    int absTableY = absTableContentBox.y();
     920
     921    if (backgroundObject->isTableCol() && backgroundObject->style()->display() == TABLE_COLUMN_GROUP) {
     922        // Adjust background for table column group.
     923        // Each column group extends from the top of the cells in the top row to the bottom of the
     924        // cells on the bottom row and from the left edge of its leftmost column to the right edge
     925        // of its rightmost column. The background covers exactly the full area of all cells that
     926        // originate in the column group, even if they span outside the column group, but this
     927        // difference in area does not affect background image positioning.
     928        yPosition = tileSize.height() + yPosition - absClipRectY + absTableY;
     929
     930        RenderTable* tableElement = table();
     931        bool foundFirstColInColGroup = false; // i.e. leftmost column.
     932        int c = col();
     933        for (; !foundFirstColInColGroup && c >= 0; --c)
     934            tableElement->colElement(c, &foundFirstColInColGroup, 0);
     935        c += 1;
     936        ASSERT(foundFirstColInColGroup);
     937
     938        int colX = tableElement->columnPositions()[c]; // relative to the width of the table.
     939        xPosition = tileSize.width() + xPosition - absClipRectX + absTableX + colX;
     940        return true;
     941    }
     942    if (backgroundObject->isTableCol()) {
     943        // Adjust background for table column.
     944        // Each column is as tall as the column groups and as wide as a normal (single-column-spanning)
     945        // cell in the column. The background covers exactly the full area of all cells that originate
     946        // in the column, even if they span outside the column, but this difference in area does not
     947        // affect background image positioning.
     948        xPosition = tileSize.width() + xPosition;
     949        yPosition = tileSize.height() + yPosition - absClipRectY + absTableY;
     950        return true;
     951    }
     952    if (backgroundObject->isTableSection()) {
     953        // Adjust background for table row group.
     954        // Each row group extends from the top left corner of its topmost cell in the first
     955        // column to the bottom right corner of its bottommost cell in the last column.
     956        const RenderTableSection* section = toRenderTableSection(backgroundObject);
     957        if (RenderTableCell* topMostCellInFirstCol = section->cellAt(0, 0).cell) {
     958            // Notice, the absolute bounding box for topMostCellInFirstCol takes into
     959            // account the location of the table (i.e., absTableX, absTableY).
     960            int absTopMostCellInFirstColX = topMostCellInFirstCol->absoluteBoundingBoxRect().x();
     961            int absTopMostCellInFirstColY = topMostCellInFirstCol->absoluteBoundingBoxRect().y();
     962            xPosition = tileSize.width() + xPosition - absClipRectX + absTopMostCellInFirstColX;
     963            yPosition = tileSize.height() + yPosition - absClipRectY + absTopMostCellInFirstColY;
     964        }
     965        return true;
     966    }   
     967    if (backgroundObject->isTableRow()) {
     968        // Adjust background for table row.
     969        // Each row is as wide as the row groups and as tall as a normal (single-row-spanning) cell
     970        // in the row. As with columns, the background covers exactly the full area of all cells that
     971        // originate in the row, even if they span outside the row, but this difference in area does
     972        // not affect background image positioning.
     973        xPosition = tileSize.width() + xPosition - absClipRectX + absTableX;
     974        yPosition = tileSize.height() + yPosition - absClipRectY + absTableY;
     975        return true;
     976    }
     977    return false;
     978}
     979
    898980} // namespace WebCore
  • trunk/WebCore/rendering/RenderTableCell.h

    r54784 r56655  
    102102    bool hasVisibleOverflow() const { return m_overflow; }
    103103
     104    virtual bool adjustBackgroundImagePosition(const RenderObject* backgroundObject, const IntRect& clipRect, const IntSize& tileSize, int& xPosition, int& yPosition);
     105
    104106protected:
    105107    virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
Note: See TracChangeset for help on using the changeset viewer.