summaryrefslogtreecommitdiff
path: root/xfa/fwl/core
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-17 18:14:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-17 18:14:25 -0700
commit878dd5b121b38e6eaba5b3f3a90d0a9abf60feaf (patch)
tree6b490d5e54c0d2e213d18b5e4bfe106f61eb1390 /xfa/fwl/core
parent8021a646f18d76518be32c36907a04f213a0e21c (diff)
downloadpdfium-878dd5b121b38e6eaba5b3f3a90d0a9abf60feaf.tar.xz
Cleanup unneeded FWL theme code.
This CL removes FWL theme code methods which do not have implementations. Review-Url: https://codereview.chromium.org/2422373002
Diffstat (limited to 'xfa/fwl/core')
-rw-r--r--xfa/fwl/core/fwl_formimp.cpp38
-rw-r--r--xfa/fwl/core/fwl_widgetimp.cpp2
-rw-r--r--xfa/fwl/core/ifwl_themeprovider.h14
3 files changed, 5 insertions, 49 deletions
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index 1b82ff59f8..4dcedf67f9 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -652,12 +652,7 @@ void CFWL_FormImp::ReSetSysBtn() {
m_iSysBox = 0;
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_CloseBox) {
m_pCloseBox = new CFWL_SysBtn;
- if (m_bCustomizeLayout) {
- CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
- param.m_iPart = CFWL_Part::CloseBox;
- pTheme->GetPartRect(&param, m_pCloseBox->m_rtBtn);
- } else {
+ if (!m_bCustomizeLayout) {
m_pCloseBox->m_rtBtn.Set(
m_rtRelative.right() - kSystemButtonMargin - kSystemButtonSize,
kSystemButtonMargin, kSystemButtonSize, kSystemButtonSize);
@@ -666,12 +661,7 @@ void CFWL_FormImp::ReSetSysBtn() {
}
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_MaximizeBox) {
m_pMaxBox = new CFWL_SysBtn;
- if (m_bCustomizeLayout) {
- CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
- param.m_iPart = CFWL_Part::MaximizeBox;
- pTheme->GetPartRect(&param, m_pMaxBox->m_rtBtn);
- } else {
+ if (!m_bCustomizeLayout) {
if (m_pCloseBox) {
m_pMaxBox->m_rtBtn.Set(
m_pCloseBox->m_rtBtn.left - kSystemButtonSpan - kSystemButtonSize,
@@ -686,12 +676,7 @@ void CFWL_FormImp::ReSetSysBtn() {
}
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_MinimizeBox) {
m_pMinBox = new CFWL_SysBtn;
- if (m_bCustomizeLayout) {
- CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
- param.m_iPart = CFWL_Part::MinimizeBox;
- pTheme->GetPartRect(&param, m_pMinBox->m_rtBtn);
- } else {
+ if (!m_bCustomizeLayout) {
if (m_pMaxBox) {
m_pMinBox->m_rtBtn.Set(
m_pMaxBox->m_rtBtn.left - kSystemButtonSpan - kSystemButtonSize,
@@ -712,26 +697,11 @@ void CFWL_FormImp::ReSetSysBtn() {
static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider);
if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Icon &&
pData->GetIcon(m_pInterface, FALSE)) {
- if (m_bCustomizeLayout) {
- CFWL_ThemeBackground param;
- param.m_pWidget = m_pInterface;
- param.m_iPart = CFWL_Part::Icon;
- CFX_WideString wsText;
- m_pProperties->m_pDataProvider->GetCaption(m_pInterface, wsText);
- param.m_pData = &wsText;
- pTheme->GetPartRect(&param, m_rtIcon);
- } else {
+ if (!m_bCustomizeLayout) {
m_rtIcon.Set(5, (m_rtCaption.height - m_fSmallIconSz) / 2, m_fSmallIconSz,
m_fSmallIconSz);
}
}
- if (m_bCustomizeLayout) {
- CFWL_ThemeText parma;
- parma.m_pWidget = m_pInterface;
- parma.m_iPart = CFWL_Part::HeadText;
- m_pProperties->m_pDataProvider->GetCaption(m_pInterface, parma.m_wsText);
- pTheme->GetPartRect(&parma, m_rtCaptionText);
- }
}
void CFWL_FormImp::RegisterForm() {
IFWL_App* pApp = GetOwnerApp();
diff --git a/xfa/fwl/core/fwl_widgetimp.cpp b/xfa/fwl/core/fwl_widgetimp.cpp
index a7338b18a6..6e8ec09243 100644
--- a/xfa/fwl/core/fwl_widgetimp.cpp
+++ b/xfa/fwl/core/fwl_widgetimp.cpp
@@ -638,7 +638,7 @@ IFWL_ThemeProvider* CFWL_WidgetImp::GetAvailableTheme() {
: m_pWidgetMgr->GetParentWidget(pUp);
if (pUp) {
IFWL_ThemeProvider* pRet = pUp->GetThemeProvider();
- if (pRet && pRet->IsValidWidget(m_pInterface))
+ if (pRet)
return pRet;
}
} while (pUp);
diff --git a/xfa/fwl/core/ifwl_themeprovider.h b/xfa/fwl/core/ifwl_themeprovider.h
index 06f64ba302..275f649574 100644
--- a/xfa/fwl/core/ifwl_themeprovider.h
+++ b/xfa/fwl/core/ifwl_themeprovider.h
@@ -20,25 +20,11 @@ class IFWL_Widget;
class IFWL_ThemeProvider {
public:
virtual ~IFWL_ThemeProvider() {}
- virtual bool IsValidWidget(IFWL_Widget* pWidget) = 0;
- virtual uint32_t GetThemeID(IFWL_Widget* pWidget) = 0;
- virtual uint32_t SetThemeID(IFWL_Widget* pWidget,
- uint32_t dwThemeID,
- FX_BOOL bChildren = TRUE) = 0;
- virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget,
- CFX_Matrix& matrix) = 0;
- virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget,
- const CFX_Matrix& matrix) = 0;
virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams) = 0;
virtual FX_BOOL DrawText(CFWL_ThemeText* pParams) = 0;
virtual void* GetCapacity(CFWL_ThemePart* pThemePart,
CFWL_WidgetCapacity dwCapacity) = 0;
virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget) = 0;
- virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart,
- CFX_RectF& rtPart) = 0;
- virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy) = 0;
virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) = 0;
};