summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparsecontext.h
blob: 20d914bc59f9d9520fddd1bc1b82b1c1808fdf92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2017 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_
#define XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_

#include <utility>
#include <vector>

#include "core/fxcrt/css/cfx_css.h"
#include "core/fxcrt/css/cfx_cssdeclaration.h"
#include "third_party/base/stl_util.h"

class CFX_CSSComputedStyle;

class CXFA_TextParseContext {
 public:
  CXFA_TextParseContext();
  ~CXFA_TextParseContext();

  void SetDisplay(CFX_CSSDisplay eDisplay) { m_eDisplay = eDisplay; }
  CFX_CSSDisplay GetDisplay() const { return m_eDisplay; }

  void SetDecls(std::vector<const CFX_CSSDeclaration*>&& decl) {
    decls_ = std::move(decl);
  }
  const std::vector<const CFX_CSSDeclaration*>& GetDecls() { return decls_; }

  RetainPtr<CFX_CSSComputedStyle> m_pParentStyle;

 private:
  std::vector<const CFX_CSSDeclaration*> decls_;
  CFX_CSSDisplay m_eDisplay;
};

#endif  // XFA_FXFA_CXFA_TEXTPARSECONTEXT_H_