Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
index 754ba3498df89678cbba151237cb7186ba27e57c..aa168c705caae130069e675a83d768a01a5bb248 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
@@ -332,6 +332,9 @@ void LayoutBlock::removeLeftoverAnonymousBlock(LayoutBlock* child) |
if (child->continuation()) |
return; |
+ if (isFieldset()) |
+ return; |
+ |
// Promote all the leftover anonymous block's children (to become children of this block |
// instead). We still want to keep the leftover block in the tree for a moment, for notification |
// purposes done further below (flow threads and grids). |
@@ -1740,6 +1743,9 @@ LayoutBlock* LayoutBlock::createAnonymousWithParentAndDisplay(const LayoutObject |
if (display == FLEX || display == INLINE_FLEX) { |
newBox = LayoutFlexibleBox::createAnonymous(&parent->document()); |
newDisplay = FLEX; |
+ } else if (display == GRID || display == INLINE_GRID) { |
+ newBox = LayoutGrid::createAnonymous(&parent->document()); |
+ newDisplay = GRID; |
} else { |
newBox = LayoutBlockFlow::createAnonymous(&parent->document()); |
newDisplay = BLOCK; |