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

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

Issue 2698663003: [css-grid] Improve intrinsic size computation with orthogonal flows (Closed)
Patch Set: Created 3 years, 10 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/GridTrackSizingAlgorithm.cpp
diff --git a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
index cf41414466b10852dfa7063396d2510762f4ffb4..79d68e6c9d32373638be38aa298f76e154c0051d 100644
--- a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
+++ b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
@@ -303,18 +303,6 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::minContentForChild(
return child.minPreferredLogicalWidth() + marginLogicalWidth;
}
- // All orthogonal flow boxes were already laid out during an early layout
- // phase performed in FrameView::performLayout.
- // It's true that grid track sizing was not completed at that time and it may
- // afffect the final height of a grid item, but since it's forbidden to
- // perform a layout during intrinsic width computation, we have to use that
- // computed height for now.
- if (direction() == ForColumns &&
- m_algorithm.m_sizingOperation == IntrinsicSizeComputation) {
- DCHECK(layoutGrid()->isOrthogonalChild(child));
- return child.logicalHeight() + child.marginLogicalHeight();
jfernandez 2017/02/15 22:49:58 Removing this code implies that we will mark the g
- }
-
if (updateOverrideContainingBlockContentSizeForChild(child,
childInlineDirection))
child.setNeedsLayout(LayoutInvalidationReason::GridChanged);
@@ -346,17 +334,6 @@ LayoutUnit GridTrackSizingAlgorithmStrategy::maxContentForChild(
return child.maxPreferredLogicalWidth() + marginLogicalWidth;
}
- if (direction() == ForColumns &&
- m_algorithm.m_sizingOperation == IntrinsicSizeComputation) {
- // All orthogonal flow boxes were already laid out during an early layout
- // phase performed in FrameView::performLayout. It's true that grid track
- // sizing was not completed at that time and it may afffect the final height
- // of a grid item, but since it's forbidden to perform a layout during
- // intrinsic width computation, we have to use that computed height for now.
- DCHECK(layoutGrid()->isOrthogonalChild(child));
- return child.logicalHeight() + child.marginLogicalHeight();
jfernandez 2017/02/15 22:49:58 Ditto.
- }
-
if (updateOverrideContainingBlockContentSizeForChild(child,
childInlineDirection))
child.setNeedsLayout(LayoutInvalidationReason::GridChanged);

Powered by Google App Engine
This is Rietveld 408576698