Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
| index bc62253984249840a2d113bff033d44650651947..f59d615d8b27b470614a5b8c613148d894ed5e18 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
| @@ -315,14 +315,14 @@ LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o) const |
| return offset; |
| } |
| -LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
| +LayoutRect LayoutTableCell::localOverflowRectForPaintInvalidation() const |
| { |
| // If the table grid is dirty, we cannot get reliable information about adjoining cells, |
| // so we ignore outside borders. This should not be a problem because it means that |
| // the table is going to recalculate the grid, relayout and issue a paint invalidation of its current rect, which |
| // includes any outside borders of this cell. |
| if (!table()->collapseBorders() || table()->needsSectionRecalc()) |
| - return LayoutBlockFlow::clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState); |
| + return LayoutBlockFlow::localOverflowRectForPaintInvalidation(); |
| bool rtl = !styleForCellFlow().isLeftToRightDirection(); |
| int outlineOutset = style()->outlineOutsetExtent(); |
| @@ -355,20 +355,15 @@ LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout |
| } |
| } |
| LayoutPoint location(std::max(LayoutUnit(left), -visualOverflowRect().x()), std::max(LayoutUnit(top), -visualOverflowRect().y())); |
| - LayoutRect r(-location.x(), -location.y(), location.x() + std::max(size().width() + right, visualOverflowRect().maxX()), location.y() + std::max(size().height() + bottom, visualOverflowRect().maxY())); |
| - |
| - mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalidationState); |
| - return r; |
| + return LayoutRect(-location.x(), -location.y(), location.x() + std::max(size().width() + right, visualOverflowRect().maxX()), location.y() + std::max(size().height() + bottom, visualOverflowRect().maxY())); |
| } |
| -void LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& r, const PaintInvalidationState* paintInvalidationState) const |
| +void LayoutTableCell::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& r) const |
| { |
| if (ancestor == this) |
| return; |
| - r.setY(r.y()); |
|
chrishtr
2016/03/24 01:05:42
What about this line?
chrishtr
2016/03/24 16:58:53
Is this now compensated for in the code I commente
trchen
2016/03/25 00:00:45
This looks like a no-op to me.
Xianzhu
2016/03/25 16:35:54
Isn't this a no-op?
|
| - if ((!paintInvalidationState || !paintInvalidationState->canMapToAncestor(ancestor)) && parent()) |
| - r.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in. |
| - LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r, paintInvalidationState); |
| + r.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in. |
| + LayoutBlockFlow::mapToVisibleRectInAncestorSpace(ancestor, r); |
| } |
| int LayoutTableCell::cellBaselinePosition() const |