blob: 04f6cfff089473cc537fbfe5752608a9d466afbd [file] [log] [blame]
Dan Sinclair95bec802017-01-19 10:27:58 -05001// 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#include "xfa/fde/css/cfde_cssstylerule.h"
8
Dan Sinclair6414b272017-01-23 13:54:53 -05009CFDE_CSSStyleRule::CFDE_CSSStyleRule() {}
Dan Sinclair95bec802017-01-19 10:27:58 -050010
11CFDE_CSSStyleRule::~CFDE_CSSStyleRule() {}
12
13size_t CFDE_CSSStyleRule::CountSelectorLists() const {
14 return m_ppSelector.size();
15}
16
17CFDE_CSSSelector* CFDE_CSSStyleRule::GetSelectorList(int32_t index) const {
18 return m_ppSelector[index].get();
19}
20
21CFDE_CSSDeclaration* CFDE_CSSStyleRule::GetDeclaration() {
22 return &m_Declaration;
23}
24
25void CFDE_CSSStyleRule::SetSelector(
26 std::vector<std::unique_ptr<CFDE_CSSSelector>>* list) {
27 ASSERT(m_ppSelector.empty());
28
29 m_ppSelector.swap(*list);
30}