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 1cbedcad8db3996a92f175d35cad6c5aeda90a76..e9b9608e380893c02924cfa5d9c8fdc3a95d2e73 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -161,7 +161,7 @@ void LayoutBox::removeFloatingOrPositionedChildFromBlockLists() |
if (isFloating()) { |
LayoutBlockFlow* parentBlockFlow = nullptr; |
- for (LayoutObject* curr = parent(); curr && !curr->isLayoutView(); curr = curr->parent()) { |
+ for (LayoutObject* curr = parent(); curr; curr = curr->parent()) { |
wkorman
2016/06/08 18:23:33
This line diff seems to already be in ToT. Update
|
if (curr->isLayoutBlockFlow()) { |
LayoutBlockFlow* currBlockFlow = toLayoutBlockFlow(curr); |
if (!parentBlockFlow || currBlockFlow->containsFloat(this)) |
@@ -2317,8 +2317,10 @@ LayoutUnit LayoutBox::computeLogicalWidthUsing(SizeType widthType, const Length& |
LayoutUnit marginEnd; |
LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd); |
- if (shrinkToAvoidFloats() && cb->isLayoutBlockFlow() && toLayoutBlockFlow(cb)->containsFloats()) |
+ if (shrinkToAvoidFloats() && cb->isLayoutBlockFlow() && toLayoutBlockFlow(cb)->containsFloats() |
+ && cb->style()->isHorizontalWritingMode() == style()->isHorizontalWritingMode()) { |
wkorman
2016/06/08 18:23:33
Perhaps use static helper method like isParallelWr
|
logicalWidthResult = std::min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, toLayoutBlockFlow(cb))); |
+ } |
if (widthType == MainOrPreferredSize && sizesLogicalWidthToFitContent(logicalWidth)) |
return std::max(minPreferredLogicalWidth(), std::min(maxPreferredLogicalWidth(), logicalWidthResult)); |
@@ -2440,7 +2442,8 @@ void LayoutBox::computeMarginsForDirection(MarginDirection flowDirection, const |
LayoutUnit marginEndWidth = minimumValueForLength(marginEndLength, containerWidth); |
LayoutUnit availableWidth = containerWidth; |
- if (avoidsFloats() && containingBlock->isLayoutBlockFlow() && toLayoutBlockFlow(containingBlock)->containsFloats()) { |
+ if (avoidsFloats() && containingBlock->isLayoutBlockFlow() && toLayoutBlockFlow(containingBlock)->containsFloats() |
+ && containingBlock->style()->isHorizontalWritingMode() == style()->isHorizontalWritingMode()) { |
availableWidth = containingBlockAvailableLineWidth(); |
if (shrinkToAvoidFloats() && availableWidth < containerWidth) { |
marginStart = std::max(LayoutUnit(), marginStartWidth); |