Chromium Code Reviews| 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 2348ba690993427266953fde54c7023a018e0497..9ebcb1dc5ebecfdd51c3423e728e9039bafea809 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -4658,9 +4658,16 @@ LayoutObject* LayoutBox::splitAnonymousBoxesAroundChild(LayoutObject* beforeChil |
| markBoxForRelayoutAfterSplit(boxToSplit); |
| markBoxForRelayoutAfterSplit(postBox); |
| + // Splitting the box means the left side of the container chain will lose any percent height descendants |
| + // below |postBox| in the right hand side. |
| + if (LayoutBlock::hasPercentHeightContainerMap()) |
|
mstensho (USE GERRIT)
2016/01/18 20:06:24
Can this be moved to a separate CL? This change is
mstensho (USE GERRIT)
2016/01/21 19:12:32
Well? :)
|
| + LayoutBlock::clearPercentHeightDescendantsFrom(postBox); |
| + |
| beforeChild = postBox; |
| } else { |
| - beforeChild = boxToSplit; |
| + // If a lone anonymous block is now unnecessary. Collapse it away and skip to its parent. |
|
mstensho (USE GERRIT)
2016/01/18 20:06:24
"If" without "then". :-P
Did you mean to write th
|
| + if (!boxToSplit->isLayoutBlock() || !toLayoutBlock(boxToSplit)->collapseLoneAnonymousBlock(toLayoutBlock(boxToSplit))) |
|
mstensho (USE GERRIT)
2016/01/18 20:06:24
I hope collapseLoneAnonymousBlock() can be static.
|
| + beforeChild = boxToSplit; |
| } |
|
mstensho (USE GERRIT)
2016/01/18 20:06:24
What if collapseLoneAnonymousBlock() did something
|
| } |