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

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

Issue 2065243003: [css-sizing] Ensure positive available size on replaced elements Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A different approach. Created 4 years, 1 month 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index eadfef9c82765fe03c6eccf06e10c2f8e1529a44..a7bb9c71841aebc0d17a8903b7ce6b8fa17c6985 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -3250,13 +3250,17 @@ LayoutUnit LayoutBox::computeReplacedLogicalWidthRespectingMinMaxWidth(
LayoutUnit logicalWidth,
ShouldComputePreferred shouldComputePreferred) const {
LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred &&
- style()->logicalMinWidth().isPercentOrCalc())
+ (style()->logicalMinWidth().isPercentOrCalc() ||
+ style()->logicalMinWidth().isFitContent() ||
+ style()->logicalMinWidth().isFillAvailable()))
? logicalWidth
: computeReplacedLogicalWidthUsing(
MinSize, style()->logicalMinWidth());
LayoutUnit maxLogicalWidth =
(shouldComputePreferred == ComputePreferred &&
- style()->logicalMaxWidth().isPercentOrCalc()) ||
+ (style()->logicalMaxWidth().isPercentOrCalc() ||
+ style()->logicalMaxWidth().isFitContent() ||
+ style()->logicalMaxWidth().isFillAvailable())) ||
mstensho (USE GERRIT) 2016/11/10 19:54:25 So, what's a good term to use when you're either p
jfernandez 2016/11/10 20:54:39 If I manage to do something very simple, I think i
style()->logicalMaxWidth().isMaxSizeNone()
? logicalWidth
: computeReplacedLogicalWidthUsing(MaxSize,

Powered by Google App Engine
This is Rietveld 408576698