| Index: Source/core/rendering/RenderTableCell.cpp
|
| diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
|
| index d1bc177c3a2b996c8ec6e7f0e4f425ba09d3fe69..f13dc0a006a71fe4979afa7932442d3087b6cba7 100644
|
| --- a/Source/core/rendering/RenderTableCell.cpp
|
| +++ b/Source/core/rendering/RenderTableCell.cpp
|
| @@ -500,12 +500,12 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
|
| // (1) Our start border.
|
| int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| - CollapsedBorderValue result(style()->borderStart(), includeColor ? style()->visitedDependentColor(startColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue result(style()->borderStart(), includeColor ? resolveColor(startColorProperty) : Color(), BCELL);
|
|
|
| // (2) The end border of the preceding cell.
|
| RenderTableCell* cellBefore = table->cellBefore(this);
|
| if (cellBefore) {
|
| - CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(cellBefore->borderAdjoiningCellAfter(this), includeColor ? cellBefore->style()->visitedDependentColor(endColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(cellBefore->borderAdjoiningCellAfter(this), includeColor ? cellBefore->resolveColor(endColorProperty) : Color(), BCELL);
|
| // |result| should be the 2nd argument as |cellBefore| should win in case of equality per CSS 2.1 (Border conflict resolution, point 4).
|
| result = chooseBorder(cellBeforeAdjoiningBorder, result);
|
| if (!result.exists())
|
| @@ -515,12 +515,12 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
|
| bool startBorderAdjoinsTable = hasStartBorderAdjoiningTable();
|
| if (startBorderAdjoinsTable) {
|
| // (3) Our row's start border.
|
| - result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningStartCell(this), includeColor ? parent()->style()->visitedDependentColor(startColorProperty) : Color(), BROW));
|
| + result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningStartCell(this), includeColor ? parent()->resolveColor(startColorProperty) : Color(), BROW));
|
| if (!result.exists())
|
| return result;
|
|
|
| // (4) Our row group's start border.
|
| - result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningStartCell(this), includeColor ? section()->style()->visitedDependentColor(startColorProperty) : Color(), BROWGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningStartCell(this), includeColor ? section()->resolveColor(startColorProperty) : Color(), BROWGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -531,19 +531,19 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
|
| if (RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endColEdge)) {
|
| if (colElt->isTableColumnGroup() && startColEdge) {
|
| // The |colElt| is a column group and is also the first colgroup (in case of spanned colgroups).
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->resolveColor(startColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| } else if (!colElt->isTableColumnGroup()) {
|
| // We first consider the |colElt| and irrespective of whether it is a spanned col or not, we apply
|
| // its start border. This is as per HTML5 which states that: "For the purposes of the CSS table model,
|
| // the col element is expected to be treated as if it was present as many times as its span attribute specifies".
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(this), includeColor ? colElt->resolveColor(startColorProperty) : Color(), BCOL));
|
| if (!result.exists())
|
| return result;
|
| // Next, apply the start border of the enclosing colgroup but only if it is adjacent to the cell's edge.
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) {
|
| - result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->resolveColor(startColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -555,18 +555,18 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
|
| if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) {
|
| if (colElt->isTableColumnGroup() && endColEdge) {
|
| // The element is a colgroup and is also the last colgroup (in case of spanned colgroups).
|
| - result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP), result);
|
| + result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOLGROUP), result);
|
| if (!result.exists())
|
| return result;
|
| } else if (colElt->isTableColumn()) {
|
| // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5.
|
| - result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL), result);
|
| + result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOL), result);
|
| if (!result.exists())
|
| return result;
|
| // Next, if the previous col has a parent colgroup then its end border should be applied
|
| // but only if it is adjacent to the cell's edge.
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) {
|
| - result = chooseBorder(CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP), result);
|
| + result = chooseBorder(CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->resolveColor(endColorProperty) : Color(), BCOLGROUP), result);
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -576,7 +576,7 @@ CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC
|
|
|
| if (startBorderAdjoinsTable) {
|
| // (7) The table's start border.
|
| - result = chooseBorder(result, CollapsedBorderValue(table->tableStartBorderAdjoiningCell(this), includeColor ? table->style()->visitedDependentColor(startColorProperty) : Color(), BTABLE));
|
| + result = chooseBorder(result, CollapsedBorderValue(table->tableStartBorderAdjoiningCell(this), includeColor ? table->resolveColor(startColorProperty) : Color(), BTABLE));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -603,12 +603,12 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
| // (1) Our end border.
|
| int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| - CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), includeColor ? style()->visitedDependentColor(endColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), includeColor ? resolveColor(endColorProperty) : Color(), BCELL);
|
|
|
| // (2) The start border of the following cell.
|
| if (!isEndColumn) {
|
| if (RenderTableCell* cellAfter = table->cellAfter(this)) {
|
| - CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue(cellAfter->borderAdjoiningCellBefore(this), includeColor ? cellAfter->style()->visitedDependentColor(startColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue(cellAfter->borderAdjoiningCellBefore(this), includeColor ? cellAfter->resolveColor(startColorProperty) : Color(), BCELL);
|
| result = chooseBorder(result, cellAfterAdjoiningBorder);
|
| if (!result.exists())
|
| return result;
|
| @@ -618,12 +618,12 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
| bool endBorderAdjoinsTable = hasEndBorderAdjoiningTable();
|
| if (endBorderAdjoinsTable) {
|
| // (3) Our row's end border.
|
| - result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningEndCell(this), includeColor ? parent()->style()->visitedDependentColor(endColorProperty) : Color(), BROW));
|
| + result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningEndCell(this), includeColor ? parent()->resolveColor(endColorProperty) : Color(), BROW));
|
| if (!result.exists())
|
| return result;
|
|
|
| // (4) Our row group's end border.
|
| - result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningEndCell(this), includeColor ? section()->style()->visitedDependentColor(endColorProperty) : Color(), BROWGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningEndCell(this), includeColor ? section()->resolveColor(endColorProperty) : Color(), BROWGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -634,19 +634,19 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
| if (RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &startColEdge, &endColEdge)) {
|
| if (colElt->isTableColumnGroup() && endColEdge) {
|
| // The element is a colgroup and is also the last colgroup (in case of spanned colgroups).
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| } else if (!colElt->isTableColumnGroup()) {
|
| // First apply the end border of the column irrespective of whether it is spanned or not. This is as per
|
| // HTML5 which states that: "For the purposes of the CSS table model, the col element is expected to be
|
| // treated as if it was present as many times as its span attribute specifies".
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor(endColorProperty) : Color(), BCOL));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOL));
|
| if (!result.exists())
|
| return result;
|
| // Next, if it has a parent colgroup then we apply its end border but only if it is adjacent to the cell.
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) {
|
| - result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->resolveColor(endColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -658,17 +658,17 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
| if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge)) {
|
| if (colElt->isTableColumnGroup() && startColEdge) {
|
| // This case is a colgroup without any col, we only compute it if it is adjacent to the cell's edge.
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->resolveColor(startColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| } else if (colElt->isTableColumn()) {
|
| // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5.
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColor(startColorProperty) : Color(), BCOL));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(this), includeColor ? colElt->resolveColor(startColorProperty) : Color(), BCOL));
|
| if (!result.exists())
|
| return result;
|
| // If we have a parent colgroup, resolve the border only if it is adjacent to the cell.
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) {
|
| - result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGroup->resolveColor(startColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -678,7 +678,7 @@ CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
|
|
| if (endBorderAdjoinsTable) {
|
| // (7) The table's end border.
|
| - result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorderAdjoiningCell(this), includeColor ? table->style()->visitedDependentColor(endColorProperty) : Color(), BTABLE));
|
| + result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorderAdjoiningCell(this), includeColor ? table->resolveColor(endColorProperty) : Color(), BTABLE));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -702,18 +702,18 @@ CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder
|
| // (1) Our before border.
|
| int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| - CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), includeColor ? style()->visitedDependentColor(beforeColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), includeColor ? resolveColor(beforeColorProperty) : Color(), BCELL);
|
|
|
| RenderTableCell* prevCell = table->cellAbove(this);
|
| if (prevCell) {
|
| // (2) A before cell's after border.
|
| - result = chooseBorder(CollapsedBorderValue(prevCell->style()->borderAfter(), includeColor ? prevCell->style()->visitedDependentColor(afterColorProperty) : Color(), BCELL), result);
|
| + result = chooseBorder(CollapsedBorderValue(prevCell->style()->borderAfter(), includeColor ? prevCell->resolveColor(afterColorProperty) : Color(), BCELL), result);
|
| if (!result.exists())
|
| return result;
|
| }
|
|
|
| // (3) Our row's before border.
|
| - result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderBefore(), includeColor ? parent()->style()->visitedDependentColor(beforeColorProperty) : Color(), BROW));
|
| + result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderBefore(), includeColor ? parent()->resolveColor(beforeColorProperty) : Color(), BROW));
|
| if (!result.exists())
|
| return result;
|
|
|
| @@ -726,7 +726,7 @@ CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder
|
| prevRow = prevCell->section()->lastChild();
|
|
|
| if (prevRow) {
|
| - result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderAfter(), includeColor ? prevRow->style()->visitedDependentColor(afterColorProperty) : Color(), BROW), result);
|
| + result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderAfter(), includeColor ? prevRow->resolveColor(afterColorProperty) : Color(), BROW), result);
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -736,14 +736,14 @@ CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder
|
| RenderTableSection* currSection = section();
|
| if (!rowIndex()) {
|
| // (5) Our row group's before border.
|
| - result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->style()->visitedDependentColor(beforeColorProperty) : Color(), BROWGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->resolveColor(beforeColorProperty) : Color(), BROWGROUP));
|
| if (!result.exists())
|
| return result;
|
|
|
| // (6) Previous row group's after border.
|
| currSection = table->sectionAbove(currSection, SkipEmptySections);
|
| if (currSection) {
|
| - result = chooseBorder(CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->style()->visitedDependentColor(afterColorProperty) : Color(), BROWGROUP), result);
|
| + result = chooseBorder(CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->resolveColor(afterColorProperty) : Color(), BROWGROUP), result);
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -753,18 +753,18 @@ CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder
|
| // (8) Our column and column group's before borders.
|
| RenderTableCol* colElt = table->colElement(col());
|
| if (colElt) {
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderBefore(), includeColor ? colElt->style()->visitedDependentColor(beforeColorProperty) : Color(), BCOL));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderBefore(), includeColor ? colElt->resolveColor(beforeColorProperty) : Color(), BCOL));
|
| if (!result.exists())
|
| return result;
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroup()) {
|
| - result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style()->borderBefore(), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(beforeColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style()->borderBefore(), includeColor ? enclosingColumnGroup->resolveColor(beforeColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| }
|
|
|
| // (9) The table's before border.
|
| - result = chooseBorder(result, CollapsedBorderValue(table->style()->borderBefore(), includeColor ? table->style()->visitedDependentColor(beforeColorProperty) : Color(), BTABLE));
|
| + result = chooseBorder(result, CollapsedBorderValue(table->style()->borderBefore(), includeColor ? table->resolveColor(beforeColorProperty) : Color(), BTABLE));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -788,24 +788,24 @@ CollapsedBorderValue RenderTableCell::computeCollapsedAfterBorder(IncludeBorderC
|
| // (1) Our after border.
|
| int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
|
| - CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), includeColor ? style()->visitedDependentColor(afterColorProperty) : Color(), BCELL);
|
| + CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), includeColor ? resolveColor(afterColorProperty) : Color(), BCELL);
|
|
|
| RenderTableCell* nextCell = table->cellBelow(this);
|
| if (nextCell) {
|
| // (2) An after cell's before border.
|
| - result = chooseBorder(result, CollapsedBorderValue(nextCell->style()->borderBefore(), includeColor ? nextCell->style()->visitedDependentColor(beforeColorProperty) : Color(), BCELL));
|
| + result = chooseBorder(result, CollapsedBorderValue(nextCell->style()->borderBefore(), includeColor ? nextCell->resolveColor(beforeColorProperty) : Color(), BCELL));
|
| if (!result.exists())
|
| return result;
|
| }
|
|
|
| // (3) Our row's after border. (FIXME: Deal with rowspan!)
|
| - result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderAfter(), includeColor ? parent()->style()->visitedDependentColor(afterColorProperty) : Color(), BROW));
|
| + result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderAfter(), includeColor ? parent()->resolveColor(afterColorProperty) : Color(), BROW));
|
| if (!result.exists())
|
| return result;
|
|
|
| // (4) The next row's before border.
|
| if (nextCell) {
|
| - result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style()->borderBefore(), includeColor ? nextCell->parent()->style()->visitedDependentColor(beforeColorProperty) : Color(), BROW));
|
| + result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style()->borderBefore(), includeColor ? nextCell->parent()->resolveColor(beforeColorProperty) : Color(), BROW));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -814,14 +814,14 @@ CollapsedBorderValue RenderTableCell::computeCollapsedAfterBorder(IncludeBorderC
|
| RenderTableSection* currSection = section();
|
| if (rowIndex() + rowSpan() >= currSection->numRows()) {
|
| // (5) Our row group's after border.
|
| - result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->style()->visitedDependentColor(afterColorProperty) : Color(), BROWGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->resolveColor(afterColorProperty) : Color(), BROWGROUP));
|
| if (!result.exists())
|
| return result;
|
|
|
| // (6) Following row group's before border.
|
| currSection = table->sectionBelow(currSection, SkipEmptySections);
|
| if (currSection) {
|
| - result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->style()->visitedDependentColor(beforeColorProperty) : Color(), BROWGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->resolveColor(beforeColorProperty) : Color(), BROWGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -831,17 +831,17 @@ CollapsedBorderValue RenderTableCell::computeCollapsedAfterBorder(IncludeBorderC
|
| // (8) Our column and column group's after borders.
|
| RenderTableCol* colElt = table->colElement(col());
|
| if (colElt) {
|
| - result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderAfter(), includeColor ? colElt->style()->visitedDependentColor(afterColorProperty) : Color(), BCOL));
|
| + result = chooseBorder(result, CollapsedBorderValue(colElt->style()->borderAfter(), includeColor ? colElt->resolveColor(afterColorProperty) : Color(), BCOL));
|
| if (!result.exists()) return result;
|
| if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroup()) {
|
| - result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style()->borderAfter(), includeColor ? enclosingColumnGroup->style()->visitedDependentColor(afterColorProperty) : Color(), BCOLGROUP));
|
| + result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style()->borderAfter(), includeColor ? enclosingColumnGroup->resolveColor(afterColorProperty) : Color(), BCOLGROUP));
|
| if (!result.exists())
|
| return result;
|
| }
|
| }
|
|
|
| // (9) The table's after border.
|
| - result = chooseBorder(result, CollapsedBorderValue(table->style()->borderAfter(), includeColor ? table->style()->visitedDependentColor(afterColorProperty) : Color(), BTABLE));
|
| + result = chooseBorder(result, CollapsedBorderValue(table->style()->borderAfter(), includeColor ? table->resolveColor(afterColorProperty) : Color(), BTABLE));
|
| if (!result.exists())
|
| return result;
|
| }
|
| @@ -1142,9 +1142,10 @@ void RenderTableCell::paintCollapsedBorders(PaintInfo& paintInfo, const LayoutPo
|
| bool antialias = shouldAntialiasLines(graphicsContext);
|
|
|
| for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) {
|
| - if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue()))
|
| + if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue())) {
|
| drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side,
|
| - border->borderValue.color(), border->style, 0, 0, antialias);
|
| + resolveColor(border->borderValue.color()), border->style, 0, 0, antialias);
|
| + }
|
| }
|
| }
|
|
|
| @@ -1167,7 +1168,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay
|
| if (backgroundObject != this)
|
| adjustedPaintOffset.moveBy(location());
|
|
|
| - Color c = backgroundObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
|
| + Color c = backgroundObject->resolveColor(CSSPropertyBackgroundColor);
|
| const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers();
|
|
|
| if (bgLayer->hasImage() || c.isValid()) {
|
|
|