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 f8986d141ca7888851c88322342aabb4c99afd06..d6460b0f6535dde544c7d6903d8edba2aa4afb82 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -2064,7 +2064,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(); |
| @@ -2379,7 +2379,10 @@ void LayoutBox::updateLogicalHeight() |
| m_intrinsicContentLogicalHeight = contentLogicalHeight(); |
| LogicalExtentComputedValues computedValues; |
| - computeLogicalHeight(logicalHeight(), logicalTop(), computedValues); |
| + if (style()->containsLayout()) |
|
ojan
2015/12/18 18:21:14
Nit: I might have written this as:
LayoutUnit heig
|
| + computeLogicalHeight(borderAndPaddingLogicalHeight(), logicalTop(), computedValues); |
| + else |
| + computeLogicalHeight(logicalHeight(), logicalTop(), computedValues); |
| setLogicalHeight(computedValues.m_extent); |
| setLogicalTop(computedValues.m_position); |
| @@ -4058,7 +4061,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 |