| 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 feb7a9c71ca80ba309879f9bc64c88b21d53814a..89929a6ffcc44c4813b0b983871843a3dd491b5c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
|
| @@ -238,7 +238,7 @@ void LayoutTableCell::layout()
|
| // of them wrong. So if our content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
|
| // table and row layout can use the correct baseline and height for this cell.
|
| if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselinePosition() > section()->rowBaseline(rowIndex())) {
|
| - int newIntrinsicPaddingBefore = std::max<LayoutUnit>(0, intrinsicPaddingBefore() - std::max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline));
|
| + int newIntrinsicPaddingBefore = (intrinsicPaddingBefore() - (cellBaselinePosition() - oldCellBaseline).clampNegativeToZero()).clampNegativeToZero();
|
| setIntrinsicPaddingBefore(newIntrinsicPaddingBefore);
|
| SubtreeLayoutScope layouter(*this);
|
| layouter.setNeedsLayout(this, LayoutInvalidationReason::TableChanged);
|
| @@ -297,7 +297,7 @@ LayoutUnit LayoutTableCell::paddingAfter() const
|
| void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit rowHeight)
|
| {
|
| clearIntrinsicPadding();
|
| - setOverrideLogicalContentHeight(std::max<LayoutUnit>(0, rowHeight - borderAndPaddingLogicalHeight()));
|
| + setOverrideLogicalContentHeight((rowHeight - borderAndPaddingLogicalHeight()).clampNegativeToZero());
|
| }
|
|
|
| LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o, const LayoutPoint& point, bool* offsetDependsOnPoint) const
|
|
|