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

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

Issue 1951653002: Return bool rather than bitwise-and for FX_BOOL (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual tidy Created 4 years, 7 months 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
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/fwl_widgetmgrimp.h" 7 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
8 8
9 #include "xfa/fwl/core/cfwl_message.h" 9 #include "xfa/fwl/core/cfwl_message.h"
10 #include "xfa/fwl/core/fwl_appimp.h" 10 #include "xfa/fwl/core/fwl_appimp.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 return FALSE; 663 return FALSE;
664 } 664 }
665 uint32_t dwStyles = pWidget->GetStyles(); 665 uint32_t dwStyles = pWidget->GetStyles();
666 return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) == 666 return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) ==
667 FWL_WGTSTYLE_OverLapper) || 667 FWL_WGTSTYLE_OverLapper) ||
668 (dwStyles & FWL_WGTSTYLE_Popup); 668 (dwStyles & FWL_WGTSTYLE_Popup);
669 } 669 }
670 FX_BOOL CFWL_WidgetMgr::IsThreadEnabled() { 670 FX_BOOL CFWL_WidgetMgr::IsThreadEnabled() {
671 return !(m_dwCapability & FWL_WGTMGR_DisableThread); 671 return !(m_dwCapability & FWL_WGTMGR_DisableThread);
672 } 672 }
673 FX_BOOL CFWL_WidgetMgr::IsFormDisabled() { 673 FX_BOOL CFWL_WidgetMgr::IsFormDisabled() {
dsinclair 2016/05/04 13:11:51 nit: bool?
Tom Sepez 2016/05/04 20:21:26 Done.
674 return m_dwCapability & FWL_WGTMGR_DisableForm; 674 return !!(m_dwCapability & FWL_WGTMGR_DisableForm);
675 } 675 }
676 FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget, 676 FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget,
677 FX_FLOAT fMinHeight, 677 FX_FLOAT fMinHeight,
678 FX_FLOAT fMaxHeight, 678 FX_FLOAT fMaxHeight,
679 const CFX_RectF& rtAnchor, 679 const CFX_RectF& rtAnchor,
680 CFX_RectF& rtPopup) { 680 CFX_RectF& rtPopup) {
681 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); 681 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr();
682 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, 682 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor,
683 rtPopup); 683 rtPopup);
684 } 684 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); 1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen);
1001 temp.Deflate(50, 50); 1001 temp.Deflate(50, 50);
1002 if (!temp.Contains(r)) { 1002 if (!temp.Contains(r)) {
1003 return FALSE; 1003 return FALSE;
1004 } 1004 }
1005 pItem->bOutsideChanged = FALSE; 1005 pItem->bOutsideChanged = FALSE;
1006 } 1006 }
1007 #endif 1007 #endif
1008 return pItem->iRedrawCounter == 0; 1008 return pItem->iRedrawCounter == 0;
1009 } 1009 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698