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

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

Issue 2040503002: Fix more bugs found by /analyze tool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_stream_acc.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.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/cfwl_widgetmgr.h" 7 #include "xfa/fwl/core/cfwl_widgetmgr.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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 if (!pChild) 761 if (!pChild)
762 return TRUE; 762 return TRUE;
763 763
764 CFX_RectF rtChilds; 764 CFX_RectF rtChilds;
765 rtChilds.Empty(); 765 rtChilds.Empty();
766 FX_BOOL bChildIntersectWithDirty = FALSE; 766 FX_BOOL bChildIntersectWithDirty = FALSE;
767 FX_BOOL bOrginPtIntersectWidthChild = FALSE; 767 FX_BOOL bOrginPtIntersectWidthChild = FALSE;
768 FX_BOOL bOrginPtIntersectWidthDirty = 768 FX_BOOL bOrginPtIntersectWidthDirty =
769 rtDirty.Contains(rtWidget.left, rtWidget.top); 769 rtDirty.Contains(rtWidget.left, rtWidget.top);
770 static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints]; 770 static FWL_NEEDREPAINTHITDATA hitPoint[kNeedRepaintHitPoints];
771 int32_t iSize = sizeof(FWL_NEEDREPAINTHITDATA); 771 FXSYS_memset(hitPoint, 0, sizeof(hitPoint));
772 FXSYS_memset(hitPoint, 0, iSize);
773 FX_FLOAT fxPiece = rtWidget.width / kNeedRepaintHitPiece; 772 FX_FLOAT fxPiece = rtWidget.width / kNeedRepaintHitPiece;
774 FX_FLOAT fyPiece = rtWidget.height / kNeedRepaintHitPiece; 773 FX_FLOAT fyPiece = rtWidget.height / kNeedRepaintHitPiece;
775 hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left; 774 hitPoint[2].hitPoint.x = hitPoint[6].hitPoint.x = rtWidget.left;
776 hitPoint[0].hitPoint.x = hitPoint[3].hitPoint.x = hitPoint[7].hitPoint.x = 775 hitPoint[0].hitPoint.x = hitPoint[3].hitPoint.x = hitPoint[7].hitPoint.x =
777 hitPoint[10].hitPoint.x = fxPiece + rtWidget.left; 776 hitPoint[10].hitPoint.x = fxPiece + rtWidget.left;
778 hitPoint[1].hitPoint.x = hitPoint[4].hitPoint.x = hitPoint[8].hitPoint.x = 777 hitPoint[1].hitPoint.x = hitPoint[4].hitPoint.x = hitPoint[8].hitPoint.x =
779 hitPoint[11].hitPoint.x = fxPiece * 2 + rtWidget.left; 778 hitPoint[11].hitPoint.x = fxPiece * 2 + rtWidget.left;
780 hitPoint[5].hitPoint.x = hitPoint[9].hitPoint.x = 779 hitPoint[5].hitPoint.x = hitPoint[9].hitPoint.x =
781 rtWidget.width + rtWidget.left; 780 rtWidget.width + rtWidget.left;
782 hitPoint[0].hitPoint.y = hitPoint[1].hitPoint.y = rtWidget.top; 781 hitPoint[0].hitPoint.y = hitPoint[1].hitPoint.y = rtWidget.top;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 temp.Deflate(50, 50); 852 temp.Deflate(50, 50);
854 if (!temp.Contains(r)) 853 if (!temp.Contains(r))
855 return FALSE; 854 return FALSE;
856 855
857 pItem->bOutsideChanged = FALSE; 856 pItem->bOutsideChanged = FALSE;
858 } 857 }
859 #endif 858 #endif
860 859
861 return pItem->iRedrawCounter == 0; 860 return pItem->iRedrawCounter == 0;
862 } 861 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_stream_acc.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698