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

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

Issue 2108043003: Move LayoutMenuList's height calculation logic to styleDidChange method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/LayoutMenuList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
index 04b1aec36161d85c16773f5a20dd9be33fd77105..a5e44c0a31269e73925e2c9a32f5cb23dcb53564 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
@@ -80,8 +80,6 @@ void LayoutMenuList::createInnerBlock()
adjustInnerStyle();
LayoutFlexibleBox::addChild(m_innerBlock);
-
- m_innerBlockHeight = style()->getFontMetrics().height() + m_innerBlock->borderAndPaddingHeight();
}
void LayoutMenuList::adjustInnerStyle()
@@ -147,6 +145,12 @@ void LayoutMenuList::styleDidChange(StyleDifference diff, const ComputedStyle* o
m_buttonText->setStyle(mutableStyle());
adjustInnerStyle();
+ updateInnerBlockHeight();
+}
+
+void LayoutMenuList::updateInnerBlockHeight()
+{
+ m_innerBlockHeight = style()->getFontMetrics().height() + m_innerBlock->borderAndPaddingHeight();
}
void LayoutMenuList::updateOptionsWidth() const
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMenuList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698