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

Side by Side Diff: xfa/src/fwl/src/lightwidget/scrollbar.cpp

Issue 1509203002: FWL refcounts never incremented (part 1) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: protected Created 5 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/src/fwl/src/lightwidget/pushbutton.cpp ('k') | xfa/src/fwl/src/lightwidget/tooltipctrl.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 "../../../foxitlib.h" 7 #include "../../../foxitlib.h"
8 CFWL_ScrollBar* CFWL_ScrollBar::Create() { 8 CFWL_ScrollBar* CFWL_ScrollBar::Create() {
9 return new CFWL_ScrollBar; 9 return new CFWL_ScrollBar;
10 } 10 }
11 FWL_ERR CFWL_ScrollBar::Initialize(const CFWL_WidgetProperties* pProperties) { 11 FWL_ERR CFWL_ScrollBar::Initialize(const CFWL_WidgetProperties* pProperties) {
12 if (m_pIface) 12 if (m_pIface)
13 return FWL_ERR_Indefinite; 13 return FWL_ERR_Indefinite;
14 if (pProperties) { 14 if (pProperties) {
15 *m_pProperties = *pProperties; 15 *m_pProperties = *pProperties;
16 } 16 }
17 m_pIface = IFWL_ScrollBar::Create(); 17 m_pIface = new IFWL_ScrollBar;
18 FWL_ERR ret = 18 FWL_ERR ret =
19 ((IFWL_ScrollBar*)m_pIface) 19 ((IFWL_ScrollBar*)m_pIface)
20 ->Initialize(m_pProperties->MakeWidgetImpProperties(nullptr), 20 ->Initialize(m_pProperties->MakeWidgetImpProperties(nullptr),
21 nullptr); 21 nullptr);
22 if (ret == FWL_ERR_Succeeded) { 22 if (ret == FWL_ERR_Succeeded) {
23 CFWL_Widget::Initialize(); 23 CFWL_Widget::Initialize();
24 } 24 }
25 return ret; 25 return ret;
26 } 26 }
27 FX_BOOL CFWL_ScrollBar::IsVertical() { 27 FX_BOOL CFWL_ScrollBar::IsVertical() {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return FWL_ERR_Indefinite; 79 return FWL_ERR_Indefinite;
80 return ((IFWL_ScrollBar*)m_pIface)->SetTrackPos(fTrackPos); 80 return ((IFWL_ScrollBar*)m_pIface)->SetTrackPos(fTrackPos);
81 } 81 }
82 FX_BOOL CFWL_ScrollBar::DoScroll(FX_DWORD dwCode, FX_FLOAT fPos) { 82 FX_BOOL CFWL_ScrollBar::DoScroll(FX_DWORD dwCode, FX_FLOAT fPos) {
83 if (!m_pIface) 83 if (!m_pIface)
84 return FALSE; 84 return FALSE;
85 return ((IFWL_ScrollBar*)m_pIface)->DoScroll(dwCode, fPos); 85 return ((IFWL_ScrollBar*)m_pIface)->DoScroll(dwCode, fPos);
86 } 86 }
87 CFWL_ScrollBar::CFWL_ScrollBar() {} 87 CFWL_ScrollBar::CFWL_ScrollBar() {}
88 CFWL_ScrollBar::~CFWL_ScrollBar() {} 88 CFWL_ScrollBar::~CFWL_ScrollBar() {}
OLDNEW
« no previous file with comments | « xfa/src/fwl/src/lightwidget/pushbutton.cpp ('k') | xfa/src/fwl/src/lightwidget/tooltipctrl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698