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

Side by Side Diff: xfa/fde/css/fde_cssstyleselector.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_cssdeclaration.cpp ('k') | xfa/fde/css/fde_cssstyleselector.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_CSSSTYLESELECTOR_H_ 7 #ifndef XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
8 #define XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ 8 #define XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets, 44 void AddRulesFrom(const CFDE_CSSStyleSheetArray& sheets,
45 uint32_t dwMediaList, 45 uint32_t dwMediaList,
46 IFGAS_FontMgr* pFontMgr); 46 IFGAS_FontMgr* pFontMgr);
47 void Clear(); 47 void Clear();
48 48
49 int32_t CountSelectors() const { return m_iSelectors; } 49 int32_t CountSelectors() const { return m_iSelectors; }
50 FDE_CSSRuleData* GetIDRuleData(uint32_t dwIDHash) { 50 FDE_CSSRuleData* GetIDRuleData(uint32_t dwIDHash) {
51 void* pData; 51 void* pData;
52 return m_IDRules.Lookup((void*)(uintptr_t)dwIDHash, pData) 52 return m_IDRules.Lookup((void*)(uintptr_t)dwIDHash, pData)
53 ? (FDE_CSSRuleData*)pData 53 ? (FDE_CSSRuleData*)pData
54 : NULL; 54 : nullptr;
55 } 55 }
56 FDE_CSSRuleData* GetTagRuleData(uint32_t dwTagHasn) { 56 FDE_CSSRuleData* GetTagRuleData(uint32_t dwTagHasn) {
57 void* pData; 57 void* pData;
58 return m_TagRules.Lookup((void*)(uintptr_t)dwTagHasn, pData) 58 return m_TagRules.Lookup((void*)(uintptr_t)dwTagHasn, pData)
59 ? (FDE_CSSRuleData*)pData 59 ? (FDE_CSSRuleData*)pData
60 : NULL; 60 : nullptr;
61 } 61 }
62 FDE_CSSRuleData* GetClassRuleData(uint32_t dwIDHash) { 62 FDE_CSSRuleData* GetClassRuleData(uint32_t dwIDHash) {
63 void* pData; 63 void* pData;
64 return m_ClassRules.Lookup((void*)(uintptr_t)dwIDHash, pData) 64 return m_ClassRules.Lookup((void*)(uintptr_t)dwIDHash, pData)
65 ? (FDE_CSSRuleData*)pData 65 ? (FDE_CSSRuleData*)pData
66 : NULL; 66 : nullptr;
67 } 67 }
68 FDE_CSSRuleData* GetUniversalRuleData() { return m_pUniversalRules; } 68 FDE_CSSRuleData* GetUniversalRuleData() { return m_pUniversalRules; }
69 FDE_CSSRuleData* GetPersudoRuleData() { return m_pPersudoRules; } 69 FDE_CSSRuleData* GetPersudoRuleData() { return m_pPersudoRules; }
70 70
71 IFX_MemoryAllocator* m_pStaticStore; 71 IFX_MemoryAllocator* m_pStaticStore;
72 72
73 protected: 73 protected:
74 void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, 74 void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet,
75 IFDE_CSSRule* pRule, 75 IFDE_CSSRule* pRule,
76 uint32_t dwMediaList, 76 uint32_t dwMediaList,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 } 577 }
578 578
579 uint32_t m_dwRefCount; 579 uint32_t m_dwRefCount;
580 IFX_MemoryAllocator* m_pAllocator; 580 IFX_MemoryAllocator* m_pAllocator;
581 CFDE_CSSInheritedData m_InheritedData; 581 CFDE_CSSInheritedData m_InheritedData;
582 CFDE_CSSNonInheritedData m_NonInheritedData; 582 CFDE_CSSNonInheritedData m_NonInheritedData;
583 CFX_WideStringArray m_CustomProperties; 583 CFX_WideStringArray m_CustomProperties;
584 }; 584 };
585 585
586 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ 586 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssdeclaration.cpp ('k') | xfa/fde/css/fde_cssstyleselector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698