| Index: third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| index e9d00961ae56359570e6530bdc8e647c2c108593..e055a8bd24bd63a9140b6e12ec14b54c0e3e9927 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| @@ -1825,20 +1825,6 @@ void LayoutGrid::applyStretchAlignmentToTracksIfNeeded(GridTrackSizingDirection
|
| availableSpace = LayoutUnit();
|
| }
|
|
|
| -bool LayoutGrid::isChildOverflowingContainingBlockHeight(const LayoutBox& child) const
|
| -{
|
| - // TODO (lajava) We must consider margins to determine whether it overflows or not (see https://crbug/628155)
|
| - LayoutUnit containingBlockContentHeight = child.hasOverrideContainingBlockHeight() ? child.overrideContainingBlockContentHeight() : LayoutUnit();
|
| - return child.size().height() > containingBlockContentHeight;
|
| -}
|
| -
|
| -bool LayoutGrid::isChildOverflowingContainingBlockWidth(const LayoutBox& child) const
|
| -{
|
| - // TODO (lajava) We must consider margins to determine whether it overflows or not (see https://crbug/628155)
|
| - LayoutUnit containingBlockContentWidth = child.hasOverrideContainingBlockWidth() ? child.overrideContainingBlockContentWidth() : LayoutUnit();
|
| - return child.size().width() > containingBlockContentWidth;
|
| -}
|
| -
|
| void LayoutGrid::layoutGridItems(GridSizingData& sizingData)
|
| {
|
| populateGridPositionsForDirection(sizingData, ForColumns);
|
| @@ -1884,10 +1870,12 @@ void LayoutGrid::layoutGridItems(GridSizingData& sizingData)
|
| #endif
|
| child->setLogicalLocation(findChildLogicalPosition(*child, sizingData));
|
|
|
| - // Keep track of children overflowing their grid area as we might need to paint them even if the grid-area is
|
| - // not visible.
|
| + // Keep track of children overflowing their grid area as we might need to paint them even if the grid-area is not visible.
|
| // Using physical dimensions for simplicity, so we can forget about orthogonalty.
|
| - if (isChildOverflowingContainingBlockHeight(*child) || isChildOverflowingContainingBlockWidth(*child))
|
| + // TODO (lajava): Child's margins should account when evaluating whether it overflows its grid area (http://crbug.com/628155).
|
| + LayoutUnit childGridAreaHeight = isHorizontalWritingMode() ? overrideContainingBlockContentLogicalHeight : overrideContainingBlockContentLogicalWidth;
|
| + LayoutUnit childGridAreaWidth = isHorizontalWritingMode() ? overrideContainingBlockContentLogicalWidth : overrideContainingBlockContentLogicalHeight;
|
| + if (child->size().height() > childGridAreaHeight || child->size().width() > childGridAreaWidth)
|
| m_gridItemsOverflowingGridArea.append(child);
|
| }
|
| }
|
|
|