From 1529756d0d62638ea0fc7965416bef717ff47413 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 24 May 2016 09:46:02 -0700 Subject: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr. The pure virtual class isn't buying us anything, and is costing us an otherwise unneeded vtable. Fix pre-existing presubmit warning in fwl_noteimp.cpp:88: If statement had no body and no else clause ... Remove switch on enum() and make separate GetWidget() methods. Review-Url: https://codereview.chromium.org/2004213002 --- xfa/fwl/theme/cfwl_widgettp.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xfa/fwl/theme/cfwl_widgettp.cpp') diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp index 764c86e314..f4aea4aab6 100644 --- a/xfa/fwl/theme/cfwl_widgettp.cpp +++ b/xfa/fwl/theme/cfwl_widgettp.cpp @@ -13,9 +13,9 @@ #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" #include "xfa/fwl/core/cfwl_themetext.h" +#include "xfa/fwl/core/fwl_widgetmgrimp.h" #include "xfa/fwl/core/ifwl_themeprovider.h" #include "xfa/fwl/core/ifwl_widget.h" -#include "xfa/fwl/core/ifwl_widgetmgr.h" #include "xfa/fxgraphics/cfx_color.h" #include "xfa/fxgraphics/cfx_path.h" #include "xfa/fxgraphics/cfx_shading.h" @@ -35,16 +35,15 @@ const float kCYBorder = 1.0f; } // namespace static void FWL_SetChildThemeID(IFWL_Widget* pParent, uint32_t dwThemeID) { - IFWL_WidgetMgr* pWidgetMgr = FWL_GetWidgetMgr(); - IFWL_Widget* pChild = - pWidgetMgr->GetWidget(pParent, FWL_WGTRELATION_FirstChild); + CFWL_WidgetMgr* pWidgetMgr = CFWL_WidgetMgr::GetInstance(); + IFWL_Widget* pChild = pWidgetMgr->GetFirstChildWidget(pParent); while (pChild) { IFWL_ThemeProvider* pTheme = pChild->GetThemeProvider(); if (pTheme) { pTheme->SetThemeID(pChild, dwThemeID, FALSE); } FWL_SetChildThemeID(pChild, dwThemeID); - pChild = pWidgetMgr->GetWidget(pChild, FWL_WGTRELATION_NextSibling); + pChild = pWidgetMgr->GetNextSiblingWidget(pChild); } } -- cgit v1.2.3