diff options
author | tsepez <tsepez@chromium.org> | 2016-05-24 09:46:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-24 09:46:02 -0700 |
commit | 1529756d0d62638ea0fc7965416bef717ff47413 (patch) | |
tree | 81f94e0c8cc9e093a97bf59d907d051bb6086039 /xfa/fwl/theme/cfwl_widgettp.cpp | |
parent | ded3634145b214b11212a7c53faa8ba15a1789ca (diff) | |
download | pdfium-1529756d0d62638ea0fc7965416bef717ff47413.tar.xz |
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
Diffstat (limited to 'xfa/fwl/theme/cfwl_widgettp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_widgettp.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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); } } |