Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2398043002: [css-grid] Stretch should grow and shrink items to fit its grid area (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index b59cf4626abb3a6e4380f5724f7e55c2d0214412..9c341de0976cf47cb0cf05d47e1e8b4374ae72d7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2485,14 +2485,6 @@ void LayoutBox::computeLogicalWidth(
if (treatAsReplaced) {
computedValues.m_extent =
LayoutUnit(logicalWidthLength.value()) + borderAndPaddingLogicalWidth();
- } else if (parent()->isLayoutGrid() && style()->logicalWidth().isAuto() &&
- style()->logicalMinWidth().isAuto() &&
- style()->overflowInlineDirection() == OverflowVisible &&
- containerWidthInInlineDirection < minPreferredLogicalWidth()) {
- // TODO (lajava) Move this logic to the LayoutGrid class.
- // Implied minimum size of Grid items.
- computedValues.m_extent = constrainLogicalWidthByMinMax(
- minPreferredLogicalWidth(), containerWidthInInlineDirection, cb);
} else {
LayoutUnit preferredWidth =
computeLogicalWidthUsing(MainOrPreferredSize, styleToUse.logicalWidth(),
@@ -2906,20 +2898,7 @@ void LayoutBox::computeLogicalHeight(
// FIXME: Account for writing-mode in flexible boxes.
// https://bugs.webkit.org/show_bug.cgi?id=46418
if (hasOverrideLogicalContentHeight()) {
- LayoutUnit contentHeight = overrideLogicalContentHeight();
- if (parent()->isLayoutGrid() && style()->logicalMinHeight().isAuto() &&
- style()->overflowY() == OverflowVisible) {
- ASSERT(style()->logicalHeight().isAuto());
- LayoutUnit minContentHeight = computeContentLogicalHeight(
- MinSize, Length(MinContent),
- computedValues.m_extent - borderAndPaddingLogicalHeight());
- contentHeight = std::max(
- contentHeight,
- constrainContentBoxLogicalHeightByMinMax(
- minContentHeight,
- computedValues.m_extent - borderAndPaddingLogicalHeight()));
- }
- h = Length(contentHeight, Fixed);
+ h = Length(overrideLogicalContentHeight(), Fixed);
} else if (treatAsReplaced) {
h = Length(computeReplacedLogicalHeight(), Fixed);
} else {

Powered by Google App Engine
This is Rietveld 408576698