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

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

Issue 1944093002: Cleanup XFA-Specific memory allocators. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Dan's comments, remove more unused methods. Created 4 years, 7 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_cssdatatable.cpp ('k') | xfa/fde/css/fde_cssdeclaration.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_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 "xfa/fde/css/fde_cssdatatable.h" 10 #include "xfa/fde/css/fde_cssdatatable.h"
11 11
12 class FDE_CSSPropertyHolder : public CFX_Target { 12 class FDE_CSSPropertyHolder : public CFX_Target {
13 public: 13 public:
14 int16_t eProperty; 14 int16_t eProperty;
15 int16_t bImportant; 15 int16_t bImportant;
16 IFDE_CSSValue* pValue; 16 IFDE_CSSValue* pValue;
17 FDE_CSSPropertyHolder* pNext; 17 FDE_CSSPropertyHolder* pNext;
18 }; 18 };
19 19
20 class FDE_CSSCustomProperty : public CFX_Target { 20 class FDE_CSSCustomProperty : public CFX_Target {
21 public: 21 public:
22 const FX_WCHAR* pwsName; 22 const FX_WCHAR* pwsName;
23 const FX_WCHAR* pwsValue; 23 const FX_WCHAR* pwsValue;
24 FDE_CSSCustomProperty* pNext; 24 FDE_CSSCustomProperty* pNext;
25 }; 25 };
26 26
27 struct FDE_CSSPROPERTYARGS { 27 struct FDE_CSSPROPERTYARGS {
28 IFX_MEMAllocator* pStaticStore; 28 IFX_MemoryAllocator* pStaticStore;
29 CFX_MapPtrToPtr* pStringCache; 29 CFX_MapPtrToPtr* pStringCache;
30 FDE_LPCCSSPROPERTYTABLE pProperty; 30 FDE_LPCCSSPROPERTYTABLE pProperty;
31 }; 31 };
32 32
33 class CFDE_CSSDeclaration : public CFX_Target { 33 class CFDE_CSSDeclaration : public CFX_Target {
34 public: 34 public:
35 CFDE_CSSDeclaration() 35 CFDE_CSSDeclaration()
36 : m_pFirstProperty(nullptr), 36 : m_pFirstProperty(nullptr),
37 m_pLastProperty(nullptr), 37 m_pLastProperty(nullptr),
38 m_pFirstCustom(nullptr), 38 m_pFirstCustom(nullptr),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 int32_t iValueLen, 80 int32_t iValueLen,
81 FX_BOOL bImportant); 81 FX_BOOL bImportant);
82 FX_BOOL ParseBackgroundProperty(const FDE_CSSPROPERTYARGS* pArgs, 82 FX_BOOL ParseBackgroundProperty(const FDE_CSSPROPERTYARGS* pArgs,
83 const FX_WCHAR* pszValue, 83 const FX_WCHAR* pszValue,
84 int32_t iValueLen, 84 int32_t iValueLen,
85 FX_BOOL bImportant); 85 FX_BOOL bImportant);
86 FX_BOOL ParseListStyleProperty(const FDE_CSSPROPERTYARGS* pArgs, 86 FX_BOOL ParseListStyleProperty(const FDE_CSSPROPERTYARGS* pArgs,
87 const FX_WCHAR* pszValue, 87 const FX_WCHAR* pszValue,
88 int32_t iValueLen, 88 int32_t iValueLen,
89 FX_BOOL bImportant); 89 FX_BOOL bImportant);
90 FX_BOOL ParseBorderPropoerty(IFX_MEMAllocator* pStaticStore, 90 FX_BOOL ParseBorderPropoerty(IFX_MemoryAllocator* pStaticStore,
91 const FX_WCHAR* pszValue, 91 const FX_WCHAR* pszValue,
92 int32_t iValueLen, 92 int32_t iValueLen,
93 IFDE_CSSValue*& pColor, 93 IFDE_CSSValue*& pColor,
94 IFDE_CSSValue*& pStyle, 94 IFDE_CSSValue*& pStyle,
95 IFDE_CSSValue*& pWidth) const; 95 IFDE_CSSValue*& pWidth) const;
96 void AddBorderProperty(IFX_MEMAllocator* pStaticStore, 96 void AddBorderProperty(IFX_MemoryAllocator* pStaticStore,
97 IFDE_CSSValue* pColor, 97 IFDE_CSSValue* pColor,
98 IFDE_CSSValue* pStyle, 98 IFDE_CSSValue* pStyle,
99 IFDE_CSSValue* pWidth, 99 IFDE_CSSValue* pWidth,
100 FX_BOOL bImportant, 100 FX_BOOL bImportant,
101 FDE_CSSPROPERTY eColor, 101 FDE_CSSPROPERTY eColor,
102 FDE_CSSPROPERTY eStyle, 102 FDE_CSSPROPERTY eStyle,
103 FDE_CSSPROPERTY eWidth); 103 FDE_CSSPROPERTY eWidth);
104 FX_BOOL ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs, 104 FX_BOOL ParseContentProperty(const FDE_CSSPROPERTYARGS* pArgs,
105 const FX_WCHAR* pszValue, 105 const FX_WCHAR* pszValue,
106 int32_t iValueLen, 106 int32_t iValueLen,
107 FX_BOOL bImportant); 107 FX_BOOL bImportant);
108 FX_BOOL ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs, 108 FX_BOOL ParseCounterProperty(const FDE_CSSPROPERTYARGS* pArgs,
109 const FX_WCHAR* pszValue, 109 const FX_WCHAR* pszValue,
110 int32_t iValueLen, 110 int32_t iValueLen,
111 FX_BOOL bImportant); 111 FX_BOOL bImportant);
112 FX_BOOL ParseValueListProperty(const FDE_CSSPROPERTYARGS* pArgs, 112 FX_BOOL ParseValueListProperty(const FDE_CSSPROPERTYARGS* pArgs,
113 const FX_WCHAR* pszValue, 113 const FX_WCHAR* pszValue,
114 int32_t iValueLen, 114 int32_t iValueLen,
115 FX_BOOL bImportant); 115 FX_BOOL bImportant);
116 FX_BOOL Add4ValuesProperty(IFX_MEMAllocator* pStaticStore, 116 FX_BOOL Add4ValuesProperty(IFX_MemoryAllocator* pStaticStore,
117 const CFDE_CSSValueArray& list, 117 const CFDE_CSSValueArray& list,
118 FX_BOOL bImportant, 118 FX_BOOL bImportant,
119 FDE_CSSPROPERTY eLeft, 119 FDE_CSSPROPERTY eLeft,
120 FDE_CSSPROPERTY eTop, 120 FDE_CSSPROPERTY eTop,
121 FDE_CSSPROPERTY eRight, 121 FDE_CSSPROPERTY eRight,
122 FDE_CSSPROPERTY eBottom); 122 FDE_CSSPROPERTY eBottom);
123 IFDE_CSSValue* ParseNumber(const FDE_CSSPROPERTYARGS* pArgs, 123 IFDE_CSSValue* ParseNumber(const FDE_CSSPROPERTYARGS* pArgs,
124 const FX_WCHAR* pszValue, 124 const FX_WCHAR* pszValue,
125 int32_t iValueLen); 125 int32_t iValueLen);
126 IFDE_CSSValue* ParseEnum(const FDE_CSSPROPERTYARGS* pArgs, 126 IFDE_CSSValue* ParseEnum(const FDE_CSSPROPERTYARGS* pArgs,
127 const FX_WCHAR* pszValue, 127 const FX_WCHAR* pszValue,
128 int32_t iValueLen); 128 int32_t iValueLen);
129 IFDE_CSSValue* ParseColor(const FDE_CSSPROPERTYARGS* pArgs, 129 IFDE_CSSValue* ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
130 const FX_WCHAR* pszValue, 130 const FX_WCHAR* pszValue,
131 int32_t iValueLen); 131 int32_t iValueLen);
132 IFDE_CSSValue* ParseURI(const FDE_CSSPROPERTYARGS* pArgs, 132 IFDE_CSSValue* ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
133 const FX_WCHAR* pszValue, 133 const FX_WCHAR* pszValue,
134 int32_t iValueLen); 134 int32_t iValueLen);
135 IFDE_CSSValue* ParseString(const FDE_CSSPROPERTYARGS* pArgs, 135 IFDE_CSSValue* ParseString(const FDE_CSSPROPERTYARGS* pArgs,
136 const FX_WCHAR* pszValue, 136 const FX_WCHAR* pszValue,
137 int32_t iValueLen); 137 int32_t iValueLen);
138 IFDE_CSSValue* ParseFunction(const FDE_CSSPROPERTYARGS* pArgs, 138 IFDE_CSSValue* ParseFunction(const FDE_CSSPROPERTYARGS* pArgs,
139 const FX_WCHAR* pszValue, 139 const FX_WCHAR* pszValue,
140 int32_t iValueLen); 140 int32_t iValueLen);
141 const FX_WCHAR* CopyToLocal(const FDE_CSSPROPERTYARGS* pArgs, 141 const FX_WCHAR* CopyToLocal(const FDE_CSSPROPERTYARGS* pArgs,
142 const FX_WCHAR* pszValue, 142 const FX_WCHAR* pszValue,
143 int32_t iValueLen); 143 int32_t iValueLen);
144 void AddPropertyHolder(IFX_MEMAllocator* pStaticStore, 144 void AddPropertyHolder(IFX_MemoryAllocator* pStaticStore,
145 FDE_CSSPROPERTY eProperty, 145 FDE_CSSPROPERTY eProperty,
146 IFDE_CSSValue* pValue, 146 IFDE_CSSValue* pValue,
147 FX_BOOL bImportant); 147 FX_BOOL bImportant);
148 IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MEMAllocator* pStaticStore, 148 IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MemoryAllocator* pStaticStore,
149 FDE_CSSPRIMITIVETYPE eUnit, 149 FDE_CSSPRIMITIVETYPE eUnit,
150 FX_FLOAT fValue) const; 150 FX_FLOAT fValue) const;
151 IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MEMAllocator* pStaticStore, 151 IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MemoryAllocator* pStaticStore,
152 FDE_CSSPROPERTYVALUE eValue) const; 152 FDE_CSSPROPERTYVALUE eValue) const;
153 153
154 FDE_CSSPropertyHolder* m_pFirstProperty; 154 FDE_CSSPropertyHolder* m_pFirstProperty;
155 FDE_CSSPropertyHolder* m_pLastProperty; 155 FDE_CSSPropertyHolder* m_pLastProperty;
156 FDE_CSSCustomProperty* m_pFirstCustom; 156 FDE_CSSCustomProperty* m_pFirstCustom;
157 FDE_CSSCustomProperty* m_pLastCustom; 157 FDE_CSSCustomProperty* m_pLastCustom;
158 }; 158 };
159 using CFDE_CSSDeclarationArray = CFX_ArrayTemplate<CFDE_CSSDeclaration*>; 159 using CFDE_CSSDeclarationArray = CFX_ArrayTemplate<CFDE_CSSDeclaration*>;
160 160
161 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_ 161 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssdatatable.cpp ('k') | xfa/fde/css/fde_cssdeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698