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

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

Issue 2296883002: Revert "Percent height content should respect the fixed height of its containing cell" (Closed)
Patch Set: Revert "Calculate border-box dimensions correctly for cells" Created 4 years, 4 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/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 846d7cd95e57c5cca051b605b25596f4f84631ac..1310a4ff1b275b77f208d42b70d835a2a9f1f09e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1901,8 +1901,7 @@ LayoutUnit LayoutBlock::availableLogicalHeightForPercentageComputation() const
availableHeight = overrideLogicalContentHeight();
} else if (style.logicalHeight().isFixed()) {
LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing(style.logicalHeight().value());
- availableHeight = constrainContentBoxLogicalHeightByMinMax(
- contentBoxHeight - scrollbarLogicalHeight(), LayoutUnit(-1)).clampNegativeToZero();
+ availableHeight = std::max(LayoutUnit(), constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), LayoutUnit(-1)));
} else if (style.logicalHeight().hasPercent() && !isOutOfFlowPositionedWithSpecifiedHeight) {
LayoutUnit heightWithScrollbar = computePercentageLogicalHeight(style.logicalHeight());
if (heightWithScrollbar != -1) {

Powered by Google App Engine
This is Rietveld 408576698