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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 697653004: [CSS Grid Layout] Grid items must set a new formatting context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied additional suggested changes. Created 6 years, 1 month 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
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 5f51066734ecbe40ef68acca735f517b9442cb21..d981d50a8b59cc0e4a79eaa34ef46e213502cc8c 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -1260,7 +1260,7 @@ bool RenderBlock::isSelfCollapsingBlock() const
// We should be able to give a quick answer if the box is a relayout boundary.
// Being a relayout boundary implies a block formatting context, and also
// our internal layout shouldn't affect our container in any way.
- if (createsBlockFormattingContext())
+ if (createsNewFormattingContext())
return false;
// Placeholder elements are not laid out until the dimensions of their parent text control are known, so they
@@ -1518,10 +1518,11 @@ void RenderBlock::addVisualOverflowFromTheme()
addVisualOverflow(inflatedRect);
}
-bool RenderBlock::createsBlockFormattingContext() const
+bool RenderBlock::createsNewFormattingContext() const
{
return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
- || style()->specifiesColumns() || isRenderFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElement() || style()->columnSpan();
+ || style()->specifiesColumns() || isRenderFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot()
+ || isDocumentElement() || style()->columnSpan() || isGridItem();
}
void RenderBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* child)
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698