OLD | NEW |
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_CSSDECLARATION_H_ | 7 #ifndef XFA_FDE_CSS_FDE_CSSDECLARATION_H_ |
8 #define XFA_FDE_CSS_FDE_CSSDECLARATION_H_ | 8 #define XFA_FDE_CSS_FDE_CSSDECLARATION_H_ |
9 | 9 |
| 10 #include <unordered_map> |
| 11 |
10 #include "xfa/fde/css/fde_cssdatatable.h" | 12 #include "xfa/fde/css/fde_cssdatatable.h" |
11 | 13 |
12 class FDE_CSSPropertyHolder : public CFX_Target { | 14 class FDE_CSSPropertyHolder : public CFX_Target { |
13 public: | 15 public: |
14 int16_t eProperty; | 16 int16_t eProperty; |
15 int16_t bImportant; | 17 int16_t bImportant; |
16 IFDE_CSSValue* pValue; | 18 IFDE_CSSValue* pValue; |
17 FDE_CSSPropertyHolder* pNext; | 19 FDE_CSSPropertyHolder* pNext; |
18 }; | 20 }; |
19 | 21 |
20 class FDE_CSSCustomProperty : public CFX_Target { | 22 class FDE_CSSCustomProperty : public CFX_Target { |
21 public: | 23 public: |
22 const FX_WCHAR* pwsName; | 24 const FX_WCHAR* pwsName; |
23 const FX_WCHAR* pwsValue; | 25 const FX_WCHAR* pwsValue; |
24 FDE_CSSCustomProperty* pNext; | 26 FDE_CSSCustomProperty* pNext; |
25 }; | 27 }; |
26 | 28 |
27 struct FDE_CSSPROPERTYARGS { | 29 struct FDE_CSSPROPERTYARGS { |
28 IFX_MemoryAllocator* pStaticStore; | 30 IFX_MemoryAllocator* pStaticStore; |
29 CFX_MapPtrToPtr* pStringCache; | 31 std::unordered_map<uint32_t, FX_WCHAR*>* pStringCache; |
30 FDE_LPCCSSPROPERTYTABLE pProperty; | 32 const FDE_CSSPROPERTYTABLE* pProperty; |
31 }; | 33 }; |
32 | 34 |
33 class CFDE_CSSDeclaration : public CFX_Target { | 35 class CFDE_CSSDeclaration : public CFX_Target { |
34 public: | 36 public: |
35 CFDE_CSSDeclaration() | 37 CFDE_CSSDeclaration() |
36 : m_pFirstProperty(nullptr), | 38 : m_pFirstProperty(nullptr), |
37 m_pLastProperty(nullptr), | 39 m_pLastProperty(nullptr), |
38 m_pFirstCustom(nullptr), | 40 m_pFirstCustom(nullptr), |
39 m_pLastCustom(nullptr) {} | 41 m_pLastCustom(nullptr) {} |
40 | 42 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 FDE_CSSPROPERTYVALUE eValue) const; | 154 FDE_CSSPROPERTYVALUE eValue) const; |
153 | 155 |
154 FDE_CSSPropertyHolder* m_pFirstProperty; | 156 FDE_CSSPropertyHolder* m_pFirstProperty; |
155 FDE_CSSPropertyHolder* m_pLastProperty; | 157 FDE_CSSPropertyHolder* m_pLastProperty; |
156 FDE_CSSCustomProperty* m_pFirstCustom; | 158 FDE_CSSCustomProperty* m_pFirstCustom; |
157 FDE_CSSCustomProperty* m_pLastCustom; | 159 FDE_CSSCustomProperty* m_pLastCustom; |
158 }; | 160 }; |
159 using CFDE_CSSDeclarationArray = CFX_ArrayTemplate<CFDE_CSSDeclaration*>; | 161 using CFDE_CSSDeclarationArray = CFX_ArrayTemplate<CFDE_CSSDeclaration*>; |
160 | 162 |
161 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_ | 163 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_ |
OLD | NEW |