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

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

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined 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/LayoutMenuList.cpp
diff --git a/Source/core/layout/LayoutMenuList.cpp b/Source/core/layout/LayoutMenuList.cpp
index 47279f57d6c36dc043e73e05410770cf1f52c3a7..6a84e8afe44084e6289c5934441c7bbd3c4fe39d 100644
--- a/Source/core/layout/LayoutMenuList.cpp
+++ b/Source/core/layout/LayoutMenuList.cpp
@@ -103,6 +103,8 @@ void LayoutMenuList::adjustInnerStyle()
ComputedStyle& innerStyle = m_innerBlock->mutableStyleRef();
innerStyle.setFlexGrow(1);
innerStyle.setFlexShrink(1);
+ // min-width: 0; is needed for correct shrinking.
+ innerStyle.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.
// But we only do that for the cases where html.css would otherwise use center.

Powered by Google App Engine
This is Rietveld 408576698