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_CSSCACHE_H_ | 7 #ifndef XFA_FDE_CSS_FDE_CSSCACHE_H_ |
8 #define XFA_FDE_CSS_FDE_CSSCACHE_H_ | 8 #define XFA_FDE_CSS_FDE_CSSCACHE_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 protected: | 64 protected: |
65 IFDE_CSSTagProvider* pTag; | 65 IFDE_CSSTagProvider* pTag; |
66 FDE_CSSTagCache* pParent; | 66 FDE_CSSTagCache* pParent; |
67 uint32_t dwIDHash; | 67 uint32_t dwIDHash; |
68 uint32_t dwTagHash; | 68 uint32_t dwTagHash; |
69 int32_t iClassIndex; | 69 int32_t iClassIndex; |
70 CFDE_DWordArray dwClassHashs; | 70 CFDE_DWordArray dwClassHashs; |
71 }; | 71 }; |
72 typedef CFX_ObjectStackTemplate<FDE_CSSTagCache> CFDE_CSSTagStack; | 72 typedef CFX_ObjectStackTemplate<FDE_CSSTagCache> CFDE_CSSTagStack; |
73 | 73 |
74 class CFDE_CSSAccelerator : public IFDE_CSSAccelerator, public CFX_Target { | 74 class CFDE_CSSAccelerator : public CFX_Target { |
75 public: | 75 public: |
76 virtual void OnEnterTag(IFDE_CSSTagProvider* pTag); | 76 void OnEnterTag(IFDE_CSSTagProvider* pTag); |
77 virtual void OnLeaveTag(IFDE_CSSTagProvider* pTag); | 77 void OnLeaveTag(IFDE_CSSTagProvider* pTag); |
| 78 |
78 void Clear() { m_Stack.RemoveAll(); } | 79 void Clear() { m_Stack.RemoveAll(); } |
| 80 |
79 FDE_CSSTagCache* GetTopElement() const { return m_Stack.GetTopElement(); } | 81 FDE_CSSTagCache* GetTopElement() const { return m_Stack.GetTopElement(); } |
80 | 82 |
81 protected: | 83 protected: |
82 CFDE_CSSTagStack m_Stack; | 84 CFDE_CSSTagStack m_Stack; |
83 }; | 85 }; |
84 | 86 |
85 #endif // XFA_FDE_CSS_FDE_CSSCACHE_H_ | 87 #endif // XFA_FDE_CSS_FDE_CSSCACHE_H_ |
OLD | NEW |