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

Side by Side Diff: xfa/fwl/cfwl_combolist.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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/cfwl_comboedit.cpp ('k') | xfa/fwl/cfwl_datetimeedit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/cfwl_combolist.h" 7 #include "xfa/fwl/cfwl_combolist.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 if (hItem) { 56 if (hItem) {
57 CFX_RectF rect; 57 CFX_RectF rect;
58 CFWL_ListItem* hItem = GetItem(this, iSel); 58 CFWL_ListItem* hItem = GetItem(this, iSel);
59 GetItemRect(this, hItem, rect); 59 GetItemRect(this, hItem, rect);
60 rtInvalidate.Union(rect); 60 rtInvalidate.Union(rect);
61 CFWL_ListItem* hSel = GetItem(this, iSel); 61 CFWL_ListItem* hSel = GetItem(this, iSel);
62 SetSelItem(hSel, true); 62 SetSelItem(hSel, true);
63 } 63 }
64 if (!rtInvalidate.IsEmpty()) 64 if (!rtInvalidate.IsEmpty())
65 Repaint(&rtInvalidate); 65 RepaintRect(rtInvalidate);
66 } 66 }
67 67
68 void CFWL_ComboList::ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy) { 68 void CFWL_ComboList::ClientToOuter(FX_FLOAT& fx, FX_FLOAT& fy) {
69 fx += m_pProperties->m_rtWidget.left, fy += m_pProperties->m_rtWidget.top; 69 fx += m_pProperties->m_rtWidget.left, fy += m_pProperties->m_rtWidget.top;
70 CFWL_Widget* pOwner = GetOwner(); 70 CFWL_Widget* pOwner = GetOwner();
71 if (!pOwner) 71 if (!pOwner)
72 return; 72 return;
73 pOwner->TransformTo(m_pOuter, fx, fy); 73 pOwner->TransformTo(m_pOuter, fx, fy);
74 } 74 }
75 75
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 CFWL_ListItem* hItem = GetItem(this, pOuter->GetCurrentSelection()); 229 CFWL_ListItem* hItem = GetItem(this, pOuter->GetCurrentSelection());
230 hItem = GetListItem(hItem, dwKeyCode); 230 hItem = GetListItem(hItem, dwKeyCode);
231 if (!hItem) 231 if (!hItem)
232 break; 232 break;
233 233
234 SetSelection(hItem, hItem, true); 234 SetSelection(hItem, hItem, true);
235 ScrollToVisible(hItem); 235 ScrollToVisible(hItem);
236 CFX_RectF rtInvalidate; 236 CFX_RectF rtInvalidate;
237 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width, 237 rtInvalidate.Set(0, 0, m_pProperties->m_rtWidget.width,
238 m_pProperties->m_rtWidget.height); 238 m_pProperties->m_rtWidget.height);
239 Repaint(&rtInvalidate); 239 RepaintRect(rtInvalidate);
240 break; 240 break;
241 } 241 }
242 default: 242 default:
243 break; 243 break;
244 } 244 }
245 } 245 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_comboedit.cpp ('k') | xfa/fwl/cfwl_datetimeedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698