| 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_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 30 matching lines...) Expand all Loading... |
| 41 FDE_CSSSELECTORTYPE eType); | 41 FDE_CSSSELECTORTYPE eType); |
| 42 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; } | 42 void SetType(FDE_CSSSELECTORTYPE eType) { m_eType = eType; } |
| 43 FDE_CSSSELECTORTYPE m_eType; | 43 FDE_CSSSELECTORTYPE m_eType; |
| 44 uint32_t m_dwHash; | 44 uint32_t m_dwHash; |
| 45 CFDE_CSSSelector* m_pNext; | 45 CFDE_CSSSelector* m_pNext; |
| 46 }; | 46 }; |
| 47 typedef CFX_ArrayTemplate<CFDE_CSSSelector*> CFDE_CSSSelectorArray; | 47 typedef CFX_ArrayTemplate<CFDE_CSSSelector*> CFDE_CSSSelectorArray; |
| 48 | 48 |
| 49 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target { | 49 class CFDE_CSSStyleRule : public IFDE_CSSStyleRule, public CFX_Target { |
| 50 public: | 50 public: |
| 51 CFDE_CSSStyleRule() : m_ppSelector(NULL), m_iSelectors(0) {} | 51 CFDE_CSSStyleRule() : m_ppSelector(nullptr), m_iSelectors(0) {} |
| 52 int32_t CountSelectorLists() const override { return m_iSelectors; } | 52 int32_t CountSelectorLists() const override { return m_iSelectors; } |
| 53 CFDE_CSSSelector* GetSelectorList(int32_t index) const override { | 53 CFDE_CSSSelector* GetSelectorList(int32_t index) const override { |
| 54 return m_ppSelector[index]; | 54 return m_ppSelector[index]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 CFDE_CSSDeclaration* GetDeclaration() override { return &m_Declaration; } | 57 CFDE_CSSDeclaration* GetDeclaration() override { return &m_Declaration; } |
| 58 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } | 58 CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } |
| 59 void SetSelector(IFX_MemoryAllocator* pStaticStore, | 59 void SetSelector(IFX_MemoryAllocator* pStaticStore, |
| 60 const CFDE_CSSSelectorArray& list); | 60 const CFDE_CSSSelectorArray& list); |
| 61 | 61 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 uint16_t m_wRefCount; | 137 uint16_t m_wRefCount; |
| 138 uint32_t m_dwMediaList; | 138 uint32_t m_dwMediaList; |
| 139 IFX_MemoryAllocator* m_pAllocator; | 139 IFX_MemoryAllocator* m_pAllocator; |
| 140 CFDE_CSSRuleArray m_RuleArray; | 140 CFDE_CSSRuleArray m_RuleArray; |
| 141 CFX_WideString m_szUrl; | 141 CFX_WideString m_szUrl; |
| 142 CFDE_CSSSelectorArray m_Selectors; | 142 CFDE_CSSSelectorArray m_Selectors; |
| 143 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; | 143 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ | 146 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ |
| OLD | NEW |