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

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

Issue 2162503003: Cleanup fgas/crt. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Win fixes Created 4 years, 5 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_csscache.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 21 matching lines...) Expand all
32 void SetNext(CFDE_CSSSelector* pNext) { m_pNext = pNext; } 32 void SetNext(CFDE_CSSSelector* pNext) { m_pNext = pNext; }
33 33
34 protected: 34 protected:
35 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; } 35 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; }
36 36
37 FDE_CSSSELECTORTYPE m_eType; 37 FDE_CSSSELECTORTYPE m_eType;
38 uint32_t m_dwHash; 38 uint32_t m_dwHash;
39 CFDE_CSSSelector* m_pNext; 39 CFDE_CSSSelector* m_pNext;
40 }; 40 };
41 41
42 typedef CFX_ArrayTemplate<CFDE_CSSSelector*> CFDE_CSSSelectorArray;
43
44 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target { 42 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target {
45 public: 43 public:
46 CFDE_CSSStyleRule(); 44 CFDE_CSSStyleRule();
47 45
48 // IFDE_CSSStyleRule 46 // IFDE_CSSStyleRule
49 int32_t CountSelectorLists() const override; 47 int32_t CountSelectorLists() const override;
50 CFDE_CSSSelector* GetSelectorList(int32_t index) const override; 48 CFDE_CSSSelector* GetSelectorList(int32_t index) const override;
51 CFDE_CSSDeclaration* GetDeclaration() override; 49 CFDE_CSSDeclaration* GetDeclaration() override;
52 50
53 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } 51 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
54 void SetSelector(IFX_MemoryAllocator* pStaticStore, 52 void SetSelector(IFX_MemoryAllocator* pStaticStore,
55 const CFDE_CSSSelectorArray& list); 53 const CFX_ArrayTemplate<CFDE_CSSSelector*>& list);
56 54
57 protected: 55 protected:
58 CFDE_CSSDeclaration m_Declaration; 56 CFDE_CSSDeclaration m_Declaration;
59 CFDE_CSSSelector** m_ppSelector; 57 CFDE_CSSSelector** m_ppSelector;
60 int32_t m_iSelectors; 58 int32_t m_iSelectors;
61 }; 59 };
62 60
63 class CFDE_CSSMediaRule : public IFDE_CSSMediaRule, public CFX_Target { 61 class CFDE_CSSMediaRule : public IFDE_CSSMediaRule, public CFX_Target {
64 public: 62 public:
65 explicit CFDE_CSSMediaRule(uint32_t dwMediaList); 63 explicit CFDE_CSSMediaRule(uint32_t dwMediaList);
66 ~CFDE_CSSMediaRule() override; 64 ~CFDE_CSSMediaRule() override;
67 65
68 // IFDE_CSSMediaRule 66 // IFDE_CSSMediaRule
69 uint32_t GetMediaList() const override; 67 uint32_t GetMediaList() const override;
70 int32_t CountRules() const override; 68 int32_t CountRules() const override;
71 IFDE_CSSRule* GetRule(int32_t index) override; 69 IFDE_CSSRule* GetRule(int32_t index) override;
72 70
73 CFDE_CSSRuleArray& GetArray() { return m_RuleArray; } 71 CFX_MassArrayTemplate<IFDE_CSSRule*>& GetArray() { return m_RuleArray; }
74 72
75 protected: 73 protected:
76 uint32_t m_dwMediaList; 74 uint32_t m_dwMediaList;
77 CFDE_CSSRuleArray m_RuleArray; 75 CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray;
78 }; 76 };
79 77
80 class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule, public CFX_Target { 78 class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule, public CFX_Target {
81 public: 79 public:
82 // IFDE_CSSFontFaceRule 80 // IFDE_CSSFontFaceRule
83 CFDE_CSSDeclaration* GetDeclaration() override; 81 CFDE_CSSDeclaration* GetDeclaration() override;
84 82
85 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } 83 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
86 84
87 protected: 85 protected:
(...skipping 27 matching lines...) Expand all
115 IFX_Stream* pStream, 113 IFX_Stream* pStream,
116 uint16_t wCodePage); 114 uint16_t wCodePage);
117 FX_BOOL LoadFromBuffer(const CFX_WideString& szUrl, 115 FX_BOOL LoadFromBuffer(const CFX_WideString& szUrl,
118 const FX_WCHAR* pBuffer, 116 const FX_WCHAR* pBuffer,
119 int32_t iBufSize, 117 int32_t iBufSize,
120 uint16_t wCodePage); 118 uint16_t wCodePage);
121 119
122 protected: 120 protected:
123 void Reset(); 121 void Reset();
124 FX_BOOL LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax); 122 FX_BOOL LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax);
125 FDE_CSSSYNTAXSTATUS LoadStyleRule(CFDE_CSSSyntaxParser* pSyntax, 123 FDE_CSSSYNTAXSTATUS LoadStyleRule(
126 CFDE_CSSRuleArray& ruleArray); 124 CFDE_CSSSyntaxParser* pSyntax,
125 CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray);
127 FDE_CSSSYNTAXSTATUS LoadImportRule(CFDE_CSSSyntaxParser* pSyntax); 126 FDE_CSSSYNTAXSTATUS LoadImportRule(CFDE_CSSSyntaxParser* pSyntax);
128 FDE_CSSSYNTAXSTATUS LoadPageRule(CFDE_CSSSyntaxParser* pSyntax); 127 FDE_CSSSYNTAXSTATUS LoadPageRule(CFDE_CSSSyntaxParser* pSyntax);
129 FDE_CSSSYNTAXSTATUS LoadMediaRule(CFDE_CSSSyntaxParser* pSyntax); 128 FDE_CSSSYNTAXSTATUS LoadMediaRule(CFDE_CSSSyntaxParser* pSyntax);
130 FDE_CSSSYNTAXSTATUS LoadFontFaceRule(CFDE_CSSSyntaxParser* pSyntax, 129 FDE_CSSSYNTAXSTATUS LoadFontFaceRule(
131 CFDE_CSSRuleArray& ruleArray); 130 CFDE_CSSSyntaxParser* pSyntax,
131 CFX_MassArrayTemplate<IFDE_CSSRule*>& ruleArray);
132 FDE_CSSSYNTAXSTATUS SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax); 132 FDE_CSSSYNTAXSTATUS SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax);
133 uint16_t m_wCodePage; 133 uint16_t m_wCodePage;
134 uint16_t m_wRefCount; 134 uint16_t m_wRefCount;
135 uint32_t m_dwMediaList; 135 uint32_t m_dwMediaList;
136 IFX_MemoryAllocator* m_pAllocator; 136 IFX_MemoryAllocator* m_pAllocator;
137 CFDE_CSSRuleArray m_RuleArray; 137 CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray;
138 CFX_WideString m_szUrl; 138 CFX_WideString m_szUrl;
139 CFDE_CSSSelectorArray m_Selectors; 139 CFX_ArrayTemplate<CFDE_CSSSelector*> m_Selectors;
140 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; 140 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache;
141 }; 141 };
142 142
143 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ 143 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_csscache.cpp ('k') | xfa/fde/css/fde_cssstylesheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698