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

Unified Diff: Source/core/layout/LayoutButton.cpp

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 9 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: Source/core/layout/LayoutButton.cpp
diff --git a/Source/core/layout/LayoutButton.cpp b/Source/core/layout/LayoutButton.cpp
index 84a4e0211976716c3c632dea895e3b471086e1cf..bee9e70fb92f3842a6178e7bbd34bc441824e15d 100644
--- a/Source/core/layout/LayoutButton.cpp
+++ b/Source/core/layout/LayoutButton.cpp
@@ -66,6 +66,8 @@ void LayoutButton::updateAnonymousChildStyle(const LayoutObject& child, Computed
ASSERT(!m_inner || &child == m_inner);
childStyle.setFlexGrow(1.0f);
+ // min-width: 0; is needed for correct shrinking.
+ childStyle.setMinWidth(Length(0, Fixed));
// Use margin:auto instead of align-items:center to get safe centering, i.e.
// when the content overflows, treat it the same as align-items: flex-start.
childStyle.setMarginTop(Length());

Powered by Google App Engine
This is Rietveld 408576698