Index: Source/core/layout/LayoutButton.cpp |
diff --git a/Source/core/layout/LayoutButton.cpp b/Source/core/layout/LayoutButton.cpp |
index f9f454ae1058af7f0adb942f322775e01d525b38..cad8c5eedb6d02afc4213333b4c812b7ede23d3b 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()); |