summaryrefslogtreecommitdiff
path: root/core/fxcrt/css/cfx_cssstylerule.h
blob: bba1fc53c8ab8de6600c187ce388b636e85e3b2a (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
// 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 CORE_FXCRT_CSS_CFX_CSSSTYLERULE_H_
#define CORE_FXCRT_CSS_CFX_CSSSTYLERULE_H_

#include <memory>
#include <vector>

#include "core/fxcrt/css/cfx_cssdeclaration.h"
#include "core/fxcrt/css/cfx_cssselector.h"

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

  size_t CountSelectorLists() const;
  CFX_CSSSelector* GetSelectorList(int32_t index) const;
  CFX_CSSDeclaration* GetDeclaration();

  void SetSelector(std::vector<std::unique_ptr<CFX_CSSSelector>>* list);

 private:
  CFX_CSSDeclaration m_Declaration;
  std::vector<std::unique_ptr<CFX_CSSSelector>> m_ppSelector;
};

#endif  // CORE_FXCRT_CSS_CFX_CSSSTYLERULE_H_