Chromium Code Reviews| 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 "xfa/fde/css/fde_cssdatatable.h" | 10 #include "xfa/fde/css/fde_cssdatatable.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 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_MEMAllocator* 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 IFDE_CSSDeclaration, public CFX_Target { | 33 class CFDE_CSSDeclaration : public CFX_Target { |
| 34 public: | 34 public: |
| 35 CFDE_CSSDeclaration() | 35 CFDE_CSSDeclaration() |
| 36 : m_pFirstProperty(NULL), | 36 : m_pFirstProperty(nullptr), |
| 37 m_pLastProperty(NULL), | 37 m_pLastProperty(nullptr), |
| 38 m_pFirstCustom(NULL), | 38 m_pFirstCustom(nullptr), |
| 39 m_pLastCustom(NULL) {} | 39 m_pLastCustom(nullptr) {} |
| 40 virtual IFDE_CSSValue* GetProperty(FDE_CSSPROPERTY eProperty, | 40 |
| 41 FX_BOOL& bImportant) const; | 41 IFDE_CSSValue* GetProperty(FDE_CSSPROPERTY eProperty, |
| 42 virtual FX_POSITION GetStartPosition() const; | 42 FX_BOOL& bImportant) const; |
| 43 virtual void GetNextProperty(FX_POSITION& pos, | 43 FX_POSITION GetStartPosition() const; |
| 44 FDE_CSSPROPERTY& eProperty, | 44 void GetNextProperty(FX_POSITION& pos, |
| 45 IFDE_CSSValue*& pValue, | 45 FDE_CSSPROPERTY& eProperty, |
| 46 FX_BOOL& bImportant) const; | 46 IFDE_CSSValue*& pValue, |
| 47 virtual FX_POSITION GetStartCustom() const; | 47 FX_BOOL& bImportant) const; |
| 48 virtual void GetNextCustom(FX_POSITION& pos, | 48 FX_POSITION GetStartCustom() const; |
| 49 CFX_WideString& wsName, | 49 void GetNextCustom(FX_POSITION& pos, |
| 50 CFX_WideString& wsValue) const; | 50 CFX_WideString& wsName, |
| 51 CFX_WideString& wsValue) const; | |
| 51 FX_BOOL AddProperty(const FDE_CSSPROPERTYARGS* pArgs, | 52 FX_BOOL AddProperty(const FDE_CSSPROPERTYARGS* pArgs, |
| 52 const FX_WCHAR* pszValue, | 53 const FX_WCHAR* pszValue, |
| 53 int32_t iValueLen); | 54 int32_t iValueLen); |
| 54 FX_BOOL AddProperty(const FDE_CSSPROPERTYARGS* pArgs, | 55 FX_BOOL AddProperty(const FDE_CSSPROPERTYARGS* pArgs, |
| 55 const FX_WCHAR* pszName, | 56 const FX_WCHAR* pszName, |
| 56 int32_t iNameLen, | 57 int32_t iNameLen, |
| 57 const FX_WCHAR* pszValue, | 58 const FX_WCHAR* pszValue, |
| 58 int32_t iValueLen); | 59 int32_t iValueLen); |
| 59 | 60 |
| 60 protected: | 61 protected: |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 int32_t iValueLen); | 143 int32_t iValueLen); |
| 143 void AddPropertyHolder(IFX_MEMAllocator* pStaticStore, | 144 void AddPropertyHolder(IFX_MEMAllocator* pStaticStore, |
| 144 FDE_CSSPROPERTY eProperty, | 145 FDE_CSSPROPERTY eProperty, |
| 145 IFDE_CSSValue* pValue, | 146 IFDE_CSSValue* pValue, |
| 146 FX_BOOL bImportant); | 147 FX_BOOL bImportant); |
| 147 IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MEMAllocator* pStaticStore, | 148 IFDE_CSSPrimitiveValue* NewNumberValue(IFX_MEMAllocator* pStaticStore, |
| 148 FDE_CSSPRIMITIVETYPE eUnit, | 149 FDE_CSSPRIMITIVETYPE eUnit, |
| 149 FX_FLOAT fValue) const; | 150 FX_FLOAT fValue) const; |
| 150 IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MEMAllocator* pStaticStore, | 151 IFDE_CSSPrimitiveValue* NewEnumValue(IFX_MEMAllocator* pStaticStore, |
| 151 FDE_CSSPROPERTYVALUE eValue) const; | 152 FDE_CSSPROPERTYVALUE eValue) const; |
| 153 | |
| 152 FDE_CSSPropertyHolder* m_pFirstProperty; | 154 FDE_CSSPropertyHolder* m_pFirstProperty; |
| 153 FDE_CSSPropertyHolder* m_pLastProperty; | 155 FDE_CSSPropertyHolder* m_pLastProperty; |
| 154 FDE_CSSCustomProperty* m_pFirstCustom; | 156 FDE_CSSCustomProperty* m_pFirstCustom; |
| 155 FDE_CSSCustomProperty* m_pLastCustom; | 157 FDE_CSSCustomProperty* m_pLastCustom; |
| 156 }; | 158 }; |
| 159 typedef CFX_ArrayTemplate<CFDE_CSSDeclaration*> CFDE_CSSDeclarationArray; | |
|
Tom Sepez
2016/04/27 22:00:01
nit: using
dsinclair
2016/04/28 13:19:50
Done.
| |
| 157 | 160 |
| 158 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_ | 161 #endif // XFA_FDE_CSS_FDE_CSSDECLARATION_H_ |
| OLD | NEW |