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

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

Issue 2065243003: [css-sizing] Ensure positive available size on replaced elements Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined test. Created 3 years, 11 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 | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/platform/Length.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9f10ae51d040d384e469528d75cff5360f3fd769..420e773f934b8f9db786462da0d8a89849502aa2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -823,8 +823,10 @@ void LayoutReplaced::computePreferredLogicalWidths() {
// fit-content) as the available logical width may not be set on our
// containing block.
const Length& logicalWidth = style()->logicalWidth();
- if (logicalWidth.isPercentOrCalc() || logicalWidth.isFillAvailable() ||
- logicalWidth.isFitContent())
+ if (logicalWidth.isLayoutDependent() ||
+ (logicalWidth.isAuto() &&
+ (style()->logicalMinWidth().isLayoutDependent() ||
+ style()->logicalMaxWidth().isLayoutDependent())))
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth,
m_maxPreferredLogicalWidth);
else
@@ -832,8 +834,8 @@ void LayoutReplaced::computePreferredLogicalWidths() {
computeReplacedLogicalWidth(ComputePreferred);
const ComputedStyle& styleToUse = styleRef();
- if (styleToUse.logicalWidth().isPercentOrCalc() ||
- styleToUse.logicalMaxWidth().isPercentOrCalc())
+ if (styleToUse.logicalWidth().isLayoutDependent() ||
+ styleToUse.logicalMaxWidth().isLayoutDependent())
m_minPreferredLogicalWidth = LayoutUnit();
if (styleToUse.logicalMinWidth().isFixed() &&
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/platform/Length.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698