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

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

Issue 2224063003: LayoutTheme: Clean up popupInternalPadding* functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutTheme.h » ('j') | 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 842318f5db836237b6569f3b770afbefdf36a431..04556f888ff1828afbf41da571b162f38468c26b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
@@ -98,8 +98,10 @@ void LayoutMenuList::adjustInnerStyle()
innerStyle.setAlignSelfPosition(ItemPositionFlexStart);
}
- innerStyle.setPaddingLeft(Length(LayoutTheme::theme().popupInternalPaddingLeft(styleRef()), Fixed));
- innerStyle.setPaddingRight(Length(LayoutTheme::theme().popupInternalPaddingRight(styleRef()), Fixed));
+ Length paddingStart = Length(LayoutTheme::theme().popupInternalPaddingStart(styleRef()), Fixed);
+ Length paddingEnd = Length(LayoutTheme::theme().popupInternalPaddingEnd(styleRef()), Fixed);
+ innerStyle.setPaddingLeft(styleRef().direction() == LTR ? paddingStart : paddingEnd);
+ innerStyle.setPaddingRight(styleRef().direction() == LTR ? paddingEnd : paddingStart);
innerStyle.setPaddingTop(Length(LayoutTheme::theme().popupInternalPaddingTop(styleRef()), Fixed));
innerStyle.setPaddingBottom(Length(LayoutTheme::theme().popupInternalPaddingBottom(styleRef()), Fixed));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698