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

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

Issue 1950973003: Cleanup CFWL_ThemePart data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fwl/basewidget/ifwl_edit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_listboximp.cpp
diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp
index dd017e215ff5741351aa9e54ee4711ee4c2941c8..7f8663737836f313ffb63aa777bf70ceb89c7464 100644
--- a/xfa/fwl/basewidget/fwl_listboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_listboximp.cpp
@@ -636,9 +636,6 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
dwItemStyles & FWL_ITEMSTATE_LTB_Focused) {
dwPartStates |= CFWL_PartState_Focused;
}
- FWL_ListBoxItemData itemData;
- itemData.pDataProvider = pData;
- itemData.iIndex = Index;
{
CFWL_ThemeBackground param;
param.m_pWidget = m_pInterface;
@@ -647,7 +644,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtItem;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
CFX_RectF rtFocus(rtItem);
param.m_pData = &rtFocus;
if (m_pVertScrollBar && !m_pHorzScrollBar &&
@@ -671,7 +668,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtDIB;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
param.m_pImage = pDib;
pTheme->DrawBackground(&param);
}
@@ -693,7 +690,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
}
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtCheck;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
pTheme->DrawBackground(&param);
}
CFX_WideString wsText;
@@ -716,7 +713,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
textParam.m_wsText = wsText;
textParam.m_dwTTOStyles = m_dwTTOStyles;
textParam.m_iTTOAlign = m_iTTOAligns;
- textParam.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ textParam.m_bMaximize = true;
pTheme->DrawText(&textParam);
}
}
@@ -750,7 +747,7 @@ CFX_SizeF CFWL_ListBoxImp::CalcSize(FX_BOOL bAutoSize) {
itemPart.m_pWidget = m_pInterface;
itemPart.m_iPart = CFWL_Part::ListItem;
itemPart.m_pData = m_pProperties->m_pDataProvider;
- itemPart.m_dwData = i;
+ itemPart.m_bMaximize = i > 0;
CFX_RectF r;
m_pProperties->m_pThemeProvider->GetPartRect(&itemPart, r);
if (!bAutoSize) {
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fwl/basewidget/ifwl_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698