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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.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/LayoutDeprecatedFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index 97343cf14bceac04a6eb2fdd40bef2ec29dd5061..bf3a2c98843f199193bbfdd26e3f94f47161adb4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -445,7 +445,7 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
SubtreeLayoutScope layoutScope(*child);
// TODO(jchaffraix): It seems incorrect to check isAtomicInlineLevel in this file.
// We probably want to check if the element is replaced.
- if (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().hasPercent() || child->style()->height().hasPercent())))
+ if (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().isPercentOrCalc() || child->style()->height().isPercentOrCalc())))
layoutScope.setChildNeedsLayout(child);
// Compute the child's vertical margins.
@@ -745,7 +745,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
}
SubtreeLayoutScope layoutScope(*child);
- if (!haveLineClamp && (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().hasPercent() || child->style()->height().hasPercent()))))
+ if (!haveLineClamp && (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().isPercentOrCalc() || child->style()->height().isPercentOrCalc()))))
layoutScope.setChildNeedsLayout(child);
if (child->style()->visibility() == EVisibility::Collapse) {
@@ -957,7 +957,7 @@ void LayoutDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
continue;
child->clearOverrideSize();
- if (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().hasPercent() || child->style()->height().hasPercent()))
+ if (relayoutChildren || (child->isAtomicInlineLevel() && (child->style()->width().isPercentOrCalc() || child->style()->height().isPercentOrCalc()))
|| (child->style()->height().isAuto() && child->isLayoutBlock())) {
child->setChildNeedsLayout(MarkOnlyThis);
@@ -1045,7 +1045,7 @@ void LayoutDeprecatedFlexibleBox::clearLineClamp()
continue;
child->clearOverrideSize();
- if ((child->isAtomicInlineLevel() && (child->style()->width().hasPercent() || child->style()->height().hasPercent()))
+ if ((child->isAtomicInlineLevel() && (child->style()->width().isPercentOrCalc() || child->style()->height().isPercentOrCalc()))
|| (child->style()->height().isAuto() && child->isLayoutBlock())) {
child->setChildNeedsLayout();

Powered by Google App Engine
This is Rietveld 408576698