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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.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/LayoutReplaced.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
index 2d0d6faab4376724cb9ad9c7079bdf86e7c7b652..9cf1e4c7b6dd7e179d7d60599d8be280ac0cd409 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -669,13 +669,13 @@ void LayoutReplaced::computePreferredLogicalWidths()
// We cannot resolve some logical width here (i.e. percent, fill-available or fit-content)
// as the available logical width may not be set on our containing block.
const Length& logicalWidth = style()->logicalWidth();
- if (logicalWidth.hasPercent() || logicalWidth.isFillAvailable() || logicalWidth.isFitContent())
+ if (logicalWidth.isPercentOrCalc() || logicalWidth.isFillAvailable() || logicalWidth.isFitContent())
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeReplacedLogicalWidth(ComputePreferred);
const ComputedStyle& styleToUse = styleRef();
- if (styleToUse.logicalWidth().hasPercent() || styleToUse.logicalMaxWidth().hasPercent())
+ if (styleToUse.logicalWidth().isPercentOrCalc() || styleToUse.logicalMaxWidth().isPercentOrCalc())
m_minPreferredLogicalWidth = LayoutUnit();
if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutSlider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698