• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "xfa/fde/css/cfde_cssstylerule.h"
8 
CFDE_CSSStyleRule()9 CFDE_CSSStyleRule::CFDE_CSSStyleRule() {}
10 
~CFDE_CSSStyleRule()11 CFDE_CSSStyleRule::~CFDE_CSSStyleRule() {}
12 
CountSelectorLists() const13 size_t CFDE_CSSStyleRule::CountSelectorLists() const {
14   return m_ppSelector.size();
15 }
16 
GetSelectorList(int32_t index) const17 CFDE_CSSSelector* CFDE_CSSStyleRule::GetSelectorList(int32_t index) const {
18   return m_ppSelector[index].get();
19 }
20 
GetDeclaration()21 CFDE_CSSDeclaration* CFDE_CSSStyleRule::GetDeclaration() {
22   return &m_Declaration;
23 }
24 
SetSelector(std::vector<std::unique_ptr<CFDE_CSSSelector>> * list)25 void CFDE_CSSStyleRule::SetSelector(
26     std::vector<std::unique_ptr<CFDE_CSSSelector>>* list) {
27   ASSERT(m_ppSelector.empty());
28 
29   m_ppSelector.swap(*list);
30 }
31