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 bee8429e72b67a5571f2c88cbb6c162ebfd60bdc..b2aa48d7e07ad3cdac403de1cd5f6a97f098f155 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -2088,7 +2088,7 @@ static float getMaxWidthListMarker(const LayoutBox* layoutObject) |
void LayoutBox::computeLogicalWidth(LogicalExtentComputedValues& computedValues) const |
{ |
- computedValues.m_extent = logicalWidth(); |
+ computedValues.m_extent = style()->containsLayout() ? borderAndPaddingLogicalWidth() : logicalWidth(); |
computedValues.m_position = logicalLeft(); |
computedValues.m_margins.m_start = marginStart(); |
computedValues.m_margins.m_end = marginEnd(); |
@@ -2418,7 +2418,8 @@ void LayoutBox::updateLogicalHeight() |
m_intrinsicContentLogicalHeight = contentLogicalHeight(); |
LogicalExtentComputedValues computedValues; |
- computeLogicalHeight(logicalHeight(), logicalTop(), computedValues); |
+ LayoutUnit height = style()->containsLayout() ? borderAndPaddingLogicalHeight() : logicalHeight(); |
+ computeLogicalHeight(height, logicalTop(), computedValues); |
setLogicalHeight(computedValues.m_extent); |
setLogicalTop(computedValues.m_position); |
@@ -3796,7 +3797,7 @@ static bool shouldBeConsideredAsReplaced(Node* node) |
bool LayoutBox::avoidsFloats() const |
{ |
- return isAtomicInlineLevel() || shouldBeConsideredAsReplaced(node()) || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated() || style()->containsPaint(); |
+ return isAtomicInlineLevel() || shouldBeConsideredAsReplaced(node()) || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated() || style()->containsPaint() || style()->containsLayout(); |
} |
bool LayoutBox::hasNonCompositedScrollbars() const |