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

Side by Side Diff: xfa/fwl/core/ifwl_picturebox.cpp

Issue 2527683002: Remove DataProvider from CFWL_WidgetProperties (Closed)
Patch Set: Rebase to master 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/core/ifwl_datetimepicker.cpp ('k') | xfa/fwl/core/ifwl_spinbutton.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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/core/ifwl_picturebox.h" 7 #include "xfa/fwl/core/ifwl_picturebox.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 17 matching lines...) Expand all
28 return FWL_Type::PictureBox; 28 return FWL_Type::PictureBox;
29 } 29 }
30 30
31 void IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { 31 void IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
32 if (!bAutoSize) { 32 if (!bAutoSize) {
33 rect = m_pProperties->m_rtWidget; 33 rect = m_pProperties->m_rtWidget;
34 return; 34 return;
35 } 35 }
36 36
37 rect.Set(0, 0, 0, 0); 37 rect.Set(0, 0, 0, 0);
38 if (!m_pProperties->m_pDataProvider) 38
39 return;
40 IFWL_Widget::GetWidgetRect(rect, true); 39 IFWL_Widget::GetWidgetRect(rect, true);
41 } 40 }
42 41
43 void IFWL_PictureBox::Update() { 42 void IFWL_PictureBox::Update() {
44 if (IsLocked()) 43 if (IsLocked())
45 return; 44 return;
46 if (!m_pProperties->m_pThemeProvider) 45 if (!m_pProperties->m_pThemeProvider)
47 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 46 m_pProperties->m_pThemeProvider = GetAvailableTheme();
48 47
49 GetClientRect(m_rtClient); 48 GetClientRect(m_rtClient);
(...skipping 10 matching lines...) Expand all
60 if (HasBorder()) 59 if (HasBorder())
61 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); 60 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
62 if (HasEdge()) 61 if (HasEdge())
63 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); 62 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix);
64 } 63 }
65 64
66 void IFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics, 65 void IFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics,
67 const CFX_Matrix* pMatrix) { 66 const CFX_Matrix* pMatrix) {
68 DrawWidget(pGraphics, pMatrix); 67 DrawWidget(pGraphics, pMatrix);
69 } 68 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_datetimepicker.cpp ('k') | xfa/fwl/core/ifwl_spinbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698