Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1530303003: Implement Layout Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to Ahem. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698