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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 protected: | 44 protected: |
45 CXFA_CSSTagProvider* pTag; | 45 CXFA_CSSTagProvider* pTag; |
46 FDE_CSSTagCache* pParent; | 46 FDE_CSSTagCache* pParent; |
47 uint32_t dwIDHash; | 47 uint32_t dwIDHash; |
48 uint32_t dwTagHash; | 48 uint32_t dwTagHash; |
49 int32_t iClassIndex; | 49 int32_t iClassIndex; |
50 CFX_BaseArrayTemplate<uint32_t> dwClassHashs; | 50 CFX_BaseArrayTemplate<uint32_t> dwClassHashs; |
51 }; | 51 }; |
52 typedef CFX_ObjectStackTemplate<FDE_CSSTagCache> CFDE_CSSTagStack; | |
53 | 52 |
54 class CFDE_CSSAccelerator : public CFX_Target { | 53 class CFDE_CSSAccelerator : public CFX_Target { |
55 public: | 54 public: |
56 CFDE_CSSAccelerator(); | 55 CFDE_CSSAccelerator(); |
57 ~CFDE_CSSAccelerator() override; | 56 ~CFDE_CSSAccelerator() override; |
58 | 57 |
59 void OnEnterTag(CXFA_CSSTagProvider* pTag); | 58 void OnEnterTag(CXFA_CSSTagProvider* pTag); |
60 void OnLeaveTag(CXFA_CSSTagProvider* pTag); | 59 void OnLeaveTag(CXFA_CSSTagProvider* pTag); |
61 | 60 |
62 void Clear() { m_Stack.RemoveAll(); } | 61 void Clear() { m_Stack.RemoveAll(FALSE); } |
63 | 62 |
64 FDE_CSSTagCache* GetTopElement() const { return m_Stack.GetTopElement(); } | 63 FDE_CSSTagCache* GetTopElement() const { return m_Stack.GetTopElement(); } |
65 | 64 |
66 protected: | 65 protected: |
67 CFDE_CSSTagStack m_Stack; | 66 CFX_ObjectStackTemplate<FDE_CSSTagCache> m_Stack; |
68 }; | 67 }; |
69 | 68 |
70 #endif // XFA_FDE_CSS_FDE_CSSCACHE_H_ | 69 #endif // XFA_FDE_CSS_FDE_CSSCACHE_H_ |
OLD | NEW |