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

Unified Diff: xfa/fwl/basewidget/fwl_comboboximp.cpp

Issue 2422373002: Cleanup unneeded FWL theme code. (Closed)
Patch Set: Created 4 years, 2 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 | xfa/fwl/basewidget/fwl_listboximp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_comboboximp.cpp
diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp
index ded0da51f5270f2e8fbbc0f347f881d39b51e810..17c5bf80d4f2f725400c4182a79c8ecdb713e757 100644
--- a/xfa/fwl/basewidget/fwl_comboboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp
@@ -695,12 +695,10 @@ FWL_Error CFWL_ComboBoxImp::SetThemeProvider(
if (!pThemeProvider)
return FWL_Error::Indefinite;
m_pProperties->m_pThemeProvider = pThemeProvider;
- if (m_pListBox && pThemeProvider->IsValidWidget(m_pListBox.get())) {
+ if (m_pListBox)
m_pListBox->SetThemeProvider(pThemeProvider);
- }
- if (m_pEdit && pThemeProvider->IsValidWidget(m_pEdit.get())) {
+ if (m_pEdit)
m_pEdit->SetThemeProvider(pThemeProvider);
- }
return FWL_Error::Succeeded;
}
int32_t CFWL_ComboBoxImp::GetCurSel() {
@@ -1042,17 +1040,10 @@ void CFWL_ComboBoxImp::ReSetTheme() {
pTheme = GetAvailableTheme();
m_pProperties->m_pThemeProvider = pTheme;
}
- if (m_pListBox) {
- if (!m_pListBox->GetThemeProvider() &&
- pTheme->IsValidWidget(m_pListBox.get())) {
- m_pListBox->SetThemeProvider(pTheme);
- }
- }
- if (m_pEdit) {
- if (!m_pEdit->GetThemeProvider() && pTheme->IsValidWidget(m_pEdit.get())) {
- m_pEdit->SetThemeProvider(pTheme);
- }
- }
+ if (m_pListBox && !m_pListBox->GetThemeProvider())
+ m_pListBox->SetThemeProvider(pTheme);
+ if (m_pEdit && !m_pEdit->GetThemeProvider())
+ m_pEdit->SetThemeProvider(pTheme);
}
void CFWL_ComboBoxImp::ReSetEditAlignment() {
if (!m_pEdit)
« no previous file with comments | « no previous file | xfa/fwl/basewidget/fwl_listboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698