| Index: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| index 85cfd59807b1c23ebcbcd70b8d39bdd30037b0da..830f0602aafd0bfb39e70b6ada9633603586ff51 100644
|
| --- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| @@ -122,10 +122,9 @@ LayoutSize calculateFillTileSize(const LayoutBoxModelObject& obj,
|
| case Contain:
|
| case Cover: {
|
| float horizontalScaleFactor =
|
| - imageIntrinsicSize.width()
|
| - ? positioningAreaSize.width().toFloat() /
|
| - imageIntrinsicSize.width()
|
| - : 1.0f;
|
| + imageIntrinsicSize.width() ? positioningAreaSize.width().toFloat() /
|
| + imageIntrinsicSize.width()
|
| + : 1.0f;
|
| float verticalScaleFactor = imageIntrinsicSize.height()
|
| ? positioningAreaSize.height().toFloat() /
|
| imageIntrinsicSize.height()
|
| @@ -140,18 +139,20 @@ LayoutSize calculateFillTileSize(const LayoutBoxModelObject& obj,
|
| positioningAreaSize.width(),
|
| LayoutUnit(std::max(
|
| 1.0f, imageIntrinsicSize.height() * horizontalScaleFactor)));
|
| - return LayoutSize(LayoutUnit(std::max(1.0f, imageIntrinsicSize.width() *
|
| - verticalScaleFactor)),
|
| - positioningAreaSize.height());
|
| + return LayoutSize(
|
| + LayoutUnit(std::max(
|
| + 1.0f, imageIntrinsicSize.width() * verticalScaleFactor)),
|
| + positioningAreaSize.height());
|
| }
|
| if (horizontalScaleFactor > verticalScaleFactor)
|
| return LayoutSize(
|
| positioningAreaSize.width(),
|
| LayoutUnit(std::max(
|
| 1.0f, imageIntrinsicSize.height() * horizontalScaleFactor)));
|
| - return LayoutSize(LayoutUnit(std::max(1.0f, imageIntrinsicSize.width() *
|
| - verticalScaleFactor)),
|
| - positioningAreaSize.height());
|
| + return LayoutSize(
|
| + LayoutUnit(
|
| + std::max(1.0f, imageIntrinsicSize.width() * verticalScaleFactor)),
|
| + positioningAreaSize.height());
|
| }
|
| }
|
|
|
| @@ -358,10 +359,11 @@ LayoutPoint BackgroundImageGeometry::getOffsetForCell(
|
| cell.table()->subtractCaptionRect(sectionsRect);
|
| LayoutUnit heightOfCaptions =
|
| cell.table()->size().height() - sectionsRect.height();
|
| - LayoutPoint offsetInBackground = LayoutPoint(
|
| - LayoutUnit(), (cell.section()->location().y() -
|
| - cell.table()->borderBefore() - heightOfCaptions) +
|
| - cell.location().y());
|
| + LayoutPoint offsetInBackground =
|
| + LayoutPoint(LayoutUnit(),
|
| + (cell.section()->location().y() -
|
| + cell.table()->borderBefore() - heightOfCaptions) +
|
| + cell.location().y());
|
|
|
| DCHECK(positioningBox.isLayoutTableCol());
|
| if (toLayoutTableCol(positioningBox).isTableColumn()) {
|
|
|