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

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

Issue 1054063004: Revert of [CSS Shapes] Properly shrink boxes to avoid shape-outside (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix revert Created 5 years, 9 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
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-overflow-hidden-vertical-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index 6503f5b0e902c4fcbf1255c723d166d675e9993f..e2cb24e8a9a9d59ee43452f116a6b9a7e132a475 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -1506,15 +1506,14 @@ LayoutUnit LayoutBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
LayoutUnit logicalTopPosition = logicalTop();
LayoutUnit startOffsetForContent = cb->startOffsetForContent();
LayoutUnit endOffsetForContent = cb->endOffsetForContent();
- LayoutUnit logicalHeight = cb->logicalHeightForChild(*this);
- LayoutUnit startOffsetForLine = cb->startOffsetForLine(logicalTopPosition, false, logicalHeight);
- LayoutUnit endOffsetForLine = cb->endOffsetForLine(logicalTopPosition, false, logicalHeight);
+ LayoutUnit startOffsetForLine = cb->startOffsetForLine(logicalTopPosition, false);
+ LayoutUnit endOffsetForLine = cb->endOffsetForLine(logicalTopPosition, false);
// If there aren't any floats constraining us then allow the margins to shrink/expand the width as much as they want.
if (startOffsetForContent == startOffsetForLine && endOffsetForContent == endOffsetForLine)
- return cb->availableLogicalWidthForLine(logicalTopPosition, false, logicalHeight) - childMarginStart - childMarginEnd;
+ return cb->availableLogicalWidthForLine(logicalTopPosition, false) - childMarginStart - childMarginEnd;
- LayoutUnit width = cb->availableLogicalWidthForLine(logicalTopPosition, false, logicalHeight) - std::max(LayoutUnit(), childMarginStart) - std::max(LayoutUnit(), childMarginEnd);
+ LayoutUnit width = cb->availableLogicalWidthForLine(logicalTopPosition, false) - std::max(LayoutUnit(), childMarginStart) - std::max(LayoutUnit(), childMarginEnd);
// We need to see if margins on either the start side or the end side can contain the floats in question. If they can,
// then just using the line width is inaccurate. In the case where a float completely fits, we don't need to use the line
// offset at all, but can instead push all the way to the content edge of the containing block. In the case where the float
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-overflow-hidden-vertical-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698