diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-17 09:55:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-17 09:55:41 -0800 |
commit | 28f9b62c397c4f3f8dc0cba69ce1cb8c02f81e76 (patch) | |
tree | 9f6aa0965e1b20964e40e2976f49eb9992816d4f /xfa/fwl | |
parent | e7798055382d2694e2ce78e5330af20c741d0a84 (diff) | |
download | pdfium-28f9b62c397c4f3f8dc0cba69ce1cb8c02f81e76.tar.xz |
Remove the CFWL_EventType::DrawItem
The ListBox DrawItems event is caught by the ComboBox which converts the
event into a ComboBox DrawItems event which is never processed. Removed both.
Review-Url: https://codereview.chromium.org/2510123002
Diffstat (limited to 'xfa/fwl')
-rw-r--r-- | xfa/fwl/core/cfwl_event.h | 1 | ||||
-rw-r--r-- | xfa/fwl/core/ifwl_combobox.cpp | 11 | ||||
-rw-r--r-- | xfa/fwl/core/ifwl_combobox.h | 7 | ||||
-rw-r--r-- | xfa/fwl/core/ifwl_listbox.cpp | 11 | ||||
-rw-r--r-- | xfa/fwl/core/ifwl_listbox.h | 7 |
5 files changed, 2 insertions, 35 deletions
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h index c0c3c3f373..b071fb7c9f 100644 --- a/xfa/fwl/core/cfwl_event.h +++ b/xfa/fwl/core/cfwl_event.h @@ -21,7 +21,6 @@ enum class CFWL_EventType { CheckWord, Click, Close, - DrawItem, EditChanged, Key, KillFocus, diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp index 68d8cc97f8..5a49dcc850 100644 --- a/xfa/fwl/core/ifwl_combobox.cpp +++ b/xfa/fwl/core/ifwl_combobox.cpp @@ -847,16 +847,7 @@ void IFWL_ComboBox::OnProcessMessage(CFWL_Message* pMessage) { void IFWL_ComboBox::OnProcessEvent(CFWL_Event* pEvent) { CFWL_EventType dwFlag = pEvent->GetClassID(); - if (dwFlag == CFWL_EventType::DrawItem) { - CFWL_EvtLtbDrawItem* pDrawItemEvent = - static_cast<CFWL_EvtLtbDrawItem*>(pEvent); - CFWL_EvtCmbDrawItem pTemp; - pTemp.m_pSrcTarget = this; - pTemp.m_pGraphics = pDrawItemEvent->m_pGraphics; - pTemp.m_index = pDrawItemEvent->m_index; - pTemp.m_rtItem = pDrawItemEvent->m_rect; - DispatchEvent(&pTemp); - } else if (dwFlag == CFWL_EventType::Scroll) { + if (dwFlag == CFWL_EventType::Scroll) { CFWL_EvtScroll* pScrollEvent = static_cast<CFWL_EvtScroll*>(pEvent); CFWL_EvtScroll pScrollEv; pScrollEv.m_pSrcTarget = this; diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h index 8b045a8780..5b6657baef 100644 --- a/xfa/fwl/core/ifwl_combobox.h +++ b/xfa/fwl/core/ifwl_combobox.h @@ -56,13 +56,6 @@ FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, CFX_Int32Array iArraySels; bool bLButtonUp;) -FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, - CFWL_EventType::DrawItem, - CFX_Graphics* m_pGraphics; - CFX_Matrix m_matrix; - int32_t m_index; - CFX_RectF m_rtItem;) - class IFWL_ComboBoxDP : public IFWL_ListBoxDP { public: virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; diff --git a/xfa/fwl/core/ifwl_listbox.cpp b/xfa/fwl/core/ifwl_listbox.cpp index 1f5a50c4c8..4a8f9395b6 100644 --- a/xfa/fwl/core/ifwl_listbox.cpp +++ b/xfa/fwl/core/ifwl_listbox.cpp @@ -510,17 +510,8 @@ void IFWL_ListBox::DrawItems(CFX_Graphics* pGraphics, if (bMultiCol && rtItem.left > m_rtConent.right()) break; - if (GetStylesEx() & FWL_STYLEEXT_LTB_OwnerDraw) { - CFWL_EvtLtbDrawItem ev; - ev.m_pSrcTarget = this; - ev.m_pGraphics = pGraphics; - ev.m_matrix = *pMatrix; - ev.m_index = i; - ev.m_rect = rtItem; - DispatchEvent(&ev); - } else { + if (!(GetStylesEx() & FWL_STYLEEXT_LTB_OwnerDraw)) DrawItem(pGraphics, pTheme, pItem, i, rtItem, pMatrix); - } } } diff --git a/xfa/fwl/core/ifwl_listbox.h b/xfa/fwl/core/ifwl_listbox.h index 42886d17e0..48d4522009 100644 --- a/xfa/fwl/core/ifwl_listbox.h +++ b/xfa/fwl/core/ifwl_listbox.h @@ -42,13 +42,6 @@ FWL_EVENT_DEF(CFWL_EvtLtbSelChanged, CFWL_EventType::SelectChanged, CFX_Int32Array iarraySels;) -FWL_EVENT_DEF(CFWL_EvtLtbDrawItem, - CFWL_EventType::DrawItem, - CFX_Graphics* m_pGraphics; - CFX_Matrix m_matrix; - int32_t m_index; - CFX_RectF m_rect;) - class IFWL_ListBoxDP : public IFWL_DataProvider { public: virtual int32_t CountItems(const IFWL_Widget* pWidget) const = 0; |