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

Unified Diff: xfa/fwl/cfwl_combobox.cpp

Issue 2560873005: Cleanup CFWL_Widget code to return CFX_RectFs where appropriate (Closed)
Patch Set: Review feedback Created 4 years 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/cfwl_checkbox.cpp ('k') | xfa/fwl/cfwl_comboedit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_combobox.cpp
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 90366979f44546bf496c882879e939e5962b849a..3c59c473fc6440373b891f4c2e53294d36745f29 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -408,7 +408,7 @@ void CFWL_ComboBox::Layout() {
if (m_pWidgetMgr->IsFormDisabled())
return DisForm_Layout();
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
if (!pFWidth)
@@ -512,7 +512,7 @@ void CFWL_ComboBox::ResetListItemAlignment() {
void CFWL_ComboBox::ProcessSelChanged(bool bLButtonUp) {
m_iCurSel = m_pListBox->GetItemIndex(this, m_pListBox->GetSelItem(0));
if (!IsDropDownStyle()) {
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
@@ -622,7 +622,7 @@ void CFWL_ComboBox::DisForm_ShowDropList(bool bActivate) {
CFX_RectF rect = m_pListBox->GetWidgetRect();
rect.Inflate(2, 2);
- Repaint(&rect);
+ RepaintRect(rect);
}
void CFWL_ComboBox::DisForm_ModifyStylesEx(uint32_t dwStylesExAdded,
@@ -717,7 +717,7 @@ CFX_RectF CFWL_ComboBox::DisForm_GetBBox() const {
}
void CFWL_ComboBox::DisForm_Layout() {
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
m_rtContent = m_rtClient;
FX_FLOAT* pFWidth = static_cast<FX_FLOAT*>(
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
@@ -830,13 +830,13 @@ void CFWL_ComboBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
return;
}
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
if (!IsDropDownStyle() || pMsg->m_pDstTarget == m_pListBox.get()) {
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
if (!m_pEdit)
@@ -859,11 +859,11 @@ void CFWL_ComboBox::OnLButtonDown(CFWL_MessageMouse* pMsg) {
m_bLButtonDown = true;
m_iBtnState = CFWL_PartState_Pressed;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
ShowDropList(true);
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_ComboBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
@@ -873,7 +873,7 @@ void CFWL_ComboBox::OnLButtonUp(CFWL_MessageMouse* pMsg) {
else
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
void CFWL_ComboBox::OnMouseMove(CFWL_MessageMouse* pMsg) {
@@ -887,7 +887,7 @@ void CFWL_ComboBox::OnMouseMove(CFWL_MessageMouse* pMsg) {
if ((iOldState != m_iBtnState) &&
!((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) ==
FWL_WGTSTATE_Disabled)) {
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
}
@@ -896,7 +896,7 @@ void CFWL_ComboBox::OnMouseLeave(CFWL_MessageMouse* pMsg) {
!((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) ==
FWL_WGTSTATE_Disabled)) {
m_iBtnState = CFWL_PartState_Normal;
- Repaint(&m_rtBtn);
+ RepaintRect(m_rtBtn);
}
}
@@ -943,7 +943,7 @@ void CFWL_ComboBox::DoSubCtrlKey(CFWL_MessageKey* pMsg) {
if (bDropDown && m_pEdit)
SyncEditText(m_iCurSel);
else
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
return;
}
« no previous file with comments | « xfa/fwl/cfwl_checkbox.cpp ('k') | xfa/fwl/cfwl_comboedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698