1 // Copyright 2017 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_
8 #define XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_
9 
10 #include <utility>
11 #include <vector>
12 
13 #include "core/fxcrt/css/cfx_css.h"
14 #include "core/fxcrt/css/cfx_cssdeclaration.h"
15 
16 class CFX_CSSComputedStyle;
17 
18 class CXFA_TextParseContext {
19  public:
20   CXFA_TextParseContext();
21   ~CXFA_TextParseContext();
22 
SetDisplay(CFX_CSSDisplay eDisplay)23   void SetDisplay(CFX_CSSDisplay eDisplay) { m_eDisplay = eDisplay; }
GetDisplay()24   CFX_CSSDisplay GetDisplay() const { return m_eDisplay; }
25 
SetDecls(std::vector<const CFX_CSSDeclaration * > && decl)26   void SetDecls(std::vector<const CFX_CSSDeclaration*>&& decl) {
27     decls_ = std::move(decl);
28   }
GetDecls()29   const std::vector<const CFX_CSSDeclaration*>& GetDecls() { return decls_; }
30 
31   RetainPtr<CFX_CSSComputedStyle> m_pParentStyle;
32 
33  private:
34   std::vector<const CFX_CSSDeclaration*> decls_;
35   CFX_CSSDisplay m_eDisplay;
36 };
37 
38 #endif  // XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_
39