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 <memory> | 10 #include <memory> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 uint32_t Release() override; | 104 uint32_t Release() override; |
105 | 105 |
106 // IFDE_CSSStyleSheet: | 106 // IFDE_CSSStyleSheet: |
107 bool GetUrl(CFX_WideString& szUrl) override; | 107 bool GetUrl(CFX_WideString& szUrl) override; |
108 uint32_t GetMediaList() const override; | 108 uint32_t GetMediaList() const override; |
109 uint16_t GetCodePage() const override; | 109 uint16_t GetCodePage() const override; |
110 int32_t CountRules() const override; | 110 int32_t CountRules() const override; |
111 IFDE_CSSRule* GetRule(int32_t index) override; | 111 IFDE_CSSRule* GetRule(int32_t index) override; |
112 | 112 |
113 bool LoadFromStream(const CFX_WideString& szUrl, | 113 bool LoadFromStream(const CFX_WideString& szUrl, |
114 IFGAS_Stream* pStream, | 114 const CFX_RetainPtr<IFGAS_Stream>& pStream, |
115 uint16_t wCodePage); | 115 uint16_t wCodePage); |
116 bool LoadFromBuffer(const CFX_WideString& szUrl, | 116 bool LoadFromBuffer(const CFX_WideString& szUrl, |
117 const FX_WCHAR* pBuffer, | 117 const FX_WCHAR* pBuffer, |
118 int32_t iBufSize, | 118 int32_t iBufSize, |
119 uint16_t wCodePage); | 119 uint16_t wCodePage); |
120 | 120 |
121 protected: | 121 protected: |
122 void Reset(); | 122 void Reset(); |
123 bool LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax); | 123 bool LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax); |
124 FDE_CSSSYNTAXSTATUS LoadStyleRule( | 124 FDE_CSSSYNTAXSTATUS LoadStyleRule( |
(...skipping 10 matching lines...) Expand all Loading... |
135 uint16_t m_wRefCount; | 135 uint16_t m_wRefCount; |
136 uint32_t m_dwMediaList; | 136 uint32_t m_dwMediaList; |
137 std::unique_ptr<IFX_MemoryAllocator> m_pAllocator; | 137 std::unique_ptr<IFX_MemoryAllocator> m_pAllocator; |
138 CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray; | 138 CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray; |
139 CFX_WideString m_szUrl; | 139 CFX_WideString m_szUrl; |
140 CFX_ArrayTemplate<CFDE_CSSSelector*> m_Selectors; | 140 CFX_ArrayTemplate<CFDE_CSSSelector*> m_Selectors; |
141 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; | 141 std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache; |
142 }; | 142 }; |
143 | 143 |
144 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ | 144 #endif // XFA_FDE_CSS_FDE_CSSSTYLESHEET_H_ |
OLD | NEW |