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

Side by Side Diff: xfa/fde/css/fde_cssstylesheet.h

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: 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 | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fde/css/fde_cssstylesheet.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 #ifndef XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ 7 #ifndef XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_
8 #define XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ 8 #define XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_
9 9
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 30 matching lines...) Expand all
41 FDE_CSSSELECTORTYPE eType); 41 FDE_CSSSELECTORTYPE eType);
42 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; } 42 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; }
43 FDE_CSSSELECTORTYPE m_eType; 43 FDE_CSSSELECTORTYPE m_eType;
44 uint32_t m_dwHash; 44 uint32_t m_dwHash;
45 CFDE_CSSSelector* m_pNext; 45 CFDE_CSSSelector* m_pNext;
46 }; 46 };
47 typedef CFX_ArrayTemplate<CFDE_CSSSelector*> CFDE_CSSSelectorArray; 47 typedef CFX_ArrayTemplate<CFDE_CSSSelector*> CFDE_CSSSelectorArray;
48 48
49 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target { 49 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target {
50 public: 50 public:
51 CFDE_CSSStyleRule() : m_ppSelector(NULL), m_iSelectors(0) {} 51 CFDE_CSSStyleRule() : m_ppSelector(nullptr), m_iSelectors(0) {}
52 int32_t CountSelectorLists() const override { return m_iSelectors; } 52 int32_t CountSelectorLists() const override { return m_iSelectors; }
53 CFDE_CSSSelector* GetSelectorList(int32_t index) const override { 53 CFDE_CSSSelector* GetSelectorList(int32_t index) const override {
54 return m_ppSelector[index]; 54 return m_ppSelector[index];
55 } 55 }
56 56
57 CFDE_CSSDeclaration* GetDeclaration() override { return &m_Declaration; } 57 CFDE_CSSDeclaration* GetDeclaration() override { return &m_Declaration; }
58 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } 58 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
59 void SetSelector(IFX_MemoryAllocator* pStaticStore, 59 void SetSelector(IFX_MemoryAllocator* pStaticStore,
60 const CFDE_CSSSelectorArray& list); 60 const CFDE_CSSSelectorArray& list);
61 61
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 uint16_t m_wRefCount; 137 uint16_t m_wRefCount;
138 uint32_t m_dwMediaList; 138 uint32_t m_dwMediaList;
139 IFX_MemoryAllocator* m_pAllocator; 139 IFX_MemoryAllocator* m_pAllocator;
140 CFDE_CSSRuleArray m_RuleArray; 140 CFDE_CSSRuleArray m_RuleArray;
141 CFX_WideString m_szUrl; 141 CFX_WideString m_szUrl;
142 CFDE_CSSSelectorArray m_Selectors; 142 CFDE_CSSSelectorArray m_Selectors;
143 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; 143 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache;
144 }; 144 };
145 145
146 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ 146 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssstyleselector.cpp ('k') | xfa/fde/css/fde_cssstylesheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698