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

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

Issue 2286543002: Add Length::isPercent and use it in tables. (Closed)
Patch Set: rebase Created 4 years, 3 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 1fa949d239748c74fc2ce766dba2e923d4dafb75..4084874b67220a06c8bdec518f5e1fb190dd069c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1045,7 +1045,7 @@ void LayoutBlock::dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutSco
LayoutUnit LayoutBlock::textIndentOffset() const
{
LayoutUnit cw;
- if (style()->textIndent().hasPercent())
+ if (style()->textIndent().isPercentOrCalc())
cw = containingBlock()->availableLogicalWidth();
return minimumValueForLength(style()->textIndent(), cw);
}
@@ -1918,7 +1918,7 @@ LayoutUnit LayoutBlock::availableLogicalHeightForPercentageComputation() const
} else if (style.logicalHeight().isFixed()) {
LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing(style.logicalHeight().value());
availableHeight = std::max(LayoutUnit(), constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), LayoutUnit(-1)));
- } else if (style.logicalHeight().hasPercent() && !isOutOfFlowPositionedWithSpecifiedHeight) {
+ } else if (style.logicalHeight().isPercentOrCalc() && !isOutOfFlowPositionedWithSpecifiedHeight) {
LayoutUnit heightWithScrollbar = computePercentageLogicalHeight(style.logicalHeight());
if (heightWithScrollbar != -1) {
LayoutUnit contentBoxHeightWithScrollbar = adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar);

Powered by Google App Engine
This is Rietveld 408576698