| Index: Source/core/layout/LayoutTableCell.cpp
|
| diff --git a/Source/core/layout/LayoutTableCell.cpp b/Source/core/layout/LayoutTableCell.cpp
|
| index 00f292de8f5d6d4ddbfe6ef42f7437fffa7a177a..fefca898d222d87637ca8449be4d3094e259880d 100644
|
| --- a/Source/core/layout/LayoutTableCell.cpp
|
| +++ b/Source/core/layout/LayoutTableCell.cpp
|
| @@ -321,7 +321,7 @@ LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout
|
| if (!table()->collapseBorders() || table()->needsSectionRecalc())
|
| return RenderBlockFlow::clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
|
|
|
| - bool rtl = !styleForCellFlow()->isLeftToRightDirection();
|
| + bool rtl = !styleForCellFlow().isLeftToRightDirection();
|
| int outlineSize = style()->outlineSize();
|
| int left = std::max(borderHalfLeft(true), outlineSize);
|
| int right = std::max(borderHalfRight(true), outlineSize);
|
| @@ -500,8 +500,8 @@ CollapsedBorderValue LayoutTableCell::computeCollapsedStartBorder(IncludeBorderC
|
|
|
| // For the start border, we need to check, in order of precedence:
|
| // (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;
|
| + 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 ? resolveColor(startColorProperty) : Color(), BCELL);
|
|
|
| // (2) The end border of the preceding cell.
|
| @@ -603,8 +603,8 @@ CollapsedBorderValue LayoutTableCell::computeCollapsedEndBorder(IncludeBorderCol
|
|
|
| // For end border, we need to check, in order of precedence:
|
| // (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;
|
| + 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 ? resolveColor(endColorProperty) : Color(), BCELL);
|
|
|
| // (2) The start border of the following cell.
|
| @@ -702,8 +702,8 @@ CollapsedBorderValue LayoutTableCell::computeCollapsedBeforeBorder(IncludeBorder
|
|
|
| // For before border, we need to check, in order of precedence:
|
| // (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;
|
| + 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 ? resolveColor(beforeColorProperty) : Color(), BCELL);
|
|
|
| LayoutTableCell* prevCell = table->cellAbove(this);
|
| @@ -788,8 +788,8 @@ CollapsedBorderValue LayoutTableCell::computeCollapsedAfterBorder(IncludeBorderC
|
|
|
| // For after border, we need to check, in order of precedence:
|
| // (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;
|
| + 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 ? resolveColor(afterColorProperty) : Color(), BCELL);
|
|
|
| LayoutTableCell* nextCell = table->cellBelow(this);
|
| @@ -896,41 +896,41 @@ int LayoutTableCell::borderAfter() const
|
|
|
| int LayoutTableCell::borderHalfLeft(bool outer) const
|
| {
|
| - const LayoutStyle* styleForCellFlow = this->styleForCellFlow();
|
| - if (styleForCellFlow->isHorizontalWritingMode())
|
| - return styleForCellFlow->isLeftToRightDirection() ? borderHalfStart(outer) : borderHalfEnd(outer);
|
| - return styleForCellFlow->isFlippedBlocksWritingMode() ? borderHalfAfter(outer) : borderHalfBefore(outer);
|
| + const LayoutStyle& styleForCellFlow = this->styleForCellFlow();
|
| + if (styleForCellFlow.isHorizontalWritingMode())
|
| + return styleForCellFlow.isLeftToRightDirection() ? borderHalfStart(outer) : borderHalfEnd(outer);
|
| + return styleForCellFlow.isFlippedBlocksWritingMode() ? borderHalfAfter(outer) : borderHalfBefore(outer);
|
| }
|
|
|
| int LayoutTableCell::borderHalfRight(bool outer) const
|
| {
|
| - const LayoutStyle* styleForCellFlow = this->styleForCellFlow();
|
| - if (styleForCellFlow->isHorizontalWritingMode())
|
| - return styleForCellFlow->isLeftToRightDirection() ? borderHalfEnd(outer) : borderHalfStart(outer);
|
| - return styleForCellFlow->isFlippedBlocksWritingMode() ? borderHalfBefore(outer) : borderHalfAfter(outer);
|
| + const LayoutStyle& styleForCellFlow = this->styleForCellFlow();
|
| + if (styleForCellFlow.isHorizontalWritingMode())
|
| + return styleForCellFlow.isLeftToRightDirection() ? borderHalfEnd(outer) : borderHalfStart(outer);
|
| + return styleForCellFlow.isFlippedBlocksWritingMode() ? borderHalfBefore(outer) : borderHalfAfter(outer);
|
| }
|
|
|
| int LayoutTableCell::borderHalfTop(bool outer) const
|
| {
|
| - const LayoutStyle* styleForCellFlow = this->styleForCellFlow();
|
| - if (styleForCellFlow->isHorizontalWritingMode())
|
| - return styleForCellFlow->isFlippedBlocksWritingMode() ? borderHalfAfter(outer) : borderHalfBefore(outer);
|
| - return styleForCellFlow->isLeftToRightDirection() ? borderHalfStart(outer) : borderHalfEnd(outer);
|
| + const LayoutStyle& styleForCellFlow = this->styleForCellFlow();
|
| + if (styleForCellFlow.isHorizontalWritingMode())
|
| + return styleForCellFlow.isFlippedBlocksWritingMode() ? borderHalfAfter(outer) : borderHalfBefore(outer);
|
| + return styleForCellFlow.isLeftToRightDirection() ? borderHalfStart(outer) : borderHalfEnd(outer);
|
| }
|
|
|
| int LayoutTableCell::borderHalfBottom(bool outer) const
|
| {
|
| - const LayoutStyle* styleForCellFlow = this->styleForCellFlow();
|
| - if (styleForCellFlow->isHorizontalWritingMode())
|
| - return styleForCellFlow->isFlippedBlocksWritingMode() ? borderHalfBefore(outer) : borderHalfAfter(outer);
|
| - return styleForCellFlow->isLeftToRightDirection() ? borderHalfEnd(outer) : borderHalfStart(outer);
|
| + const LayoutStyle& styleForCellFlow = this->styleForCellFlow();
|
| + if (styleForCellFlow.isHorizontalWritingMode())
|
| + return styleForCellFlow.isFlippedBlocksWritingMode() ? borderHalfBefore(outer) : borderHalfAfter(outer);
|
| + return styleForCellFlow.isLeftToRightDirection() ? borderHalfEnd(outer) : borderHalfStart(outer);
|
| }
|
|
|
| int LayoutTableCell::borderHalfStart(bool outer) const
|
| {
|
| CollapsedBorderValue border = collapsedStartBorder(DoNotIncludeBorderColor);
|
| if (border.exists())
|
| - return (border.width() + ((styleForCellFlow()->isLeftToRightDirection() ^ outer) ? 1 : 0)) / 2; // Give the extra pixel to top and left.
|
| + return (border.width() + ((styleForCellFlow().isLeftToRightDirection() ^ outer) ? 1 : 0)) / 2; // Give the extra pixel to top and left.
|
| return 0;
|
| }
|
|
|
| @@ -938,7 +938,7 @@ int LayoutTableCell::borderHalfEnd(bool outer) const
|
| {
|
| CollapsedBorderValue border = collapsedEndBorder(DoNotIncludeBorderColor);
|
| if (border.exists())
|
| - return (border.width() + ((styleForCellFlow()->isLeftToRightDirection() ^ outer) ? 0 : 1)) / 2;
|
| + return (border.width() + ((styleForCellFlow().isLeftToRightDirection() ^ outer) ? 0 : 1)) / 2;
|
| return 0;
|
| }
|
|
|
| @@ -946,7 +946,7 @@ int LayoutTableCell::borderHalfBefore(bool outer) const
|
| {
|
| CollapsedBorderValue border = collapsedBeforeBorder(DoNotIncludeBorderColor);
|
| if (border.exists())
|
| - return (border.width() + ((styleForCellFlow()->isFlippedBlocksWritingMode() ^ outer) ? 0 : 1)) / 2; // Give the extra pixel to top and left.
|
| + return (border.width() + ((styleForCellFlow().isFlippedBlocksWritingMode() ^ outer) ? 0 : 1)) / 2; // Give the extra pixel to top and left.
|
| return 0;
|
| }
|
|
|
| @@ -954,7 +954,7 @@ int LayoutTableCell::borderHalfAfter(bool outer) const
|
| {
|
| CollapsedBorderValue border = collapsedAfterBorder(DoNotIncludeBorderColor);
|
| if (border.exists())
|
| - return (border.width() + ((styleForCellFlow()->isFlippedBlocksWritingMode() ^ outer) ? 1 : 0)) / 2;
|
| + return (border.width() + ((styleForCellFlow().isFlippedBlocksWritingMode() ^ outer) ? 1 : 0)) / 2;
|
| return 0;
|
| }
|
|
|
|
|