• 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 "core/fxcrt/css/cfx_cssstylerule.h"
8 
CFX_CSSStyleRule()9 CFX_CSSStyleRule::CFX_CSSStyleRule() {}
10 
~CFX_CSSStyleRule()11 CFX_CSSStyleRule::~CFX_CSSStyleRule() {}
12 
CountSelectorLists() const13 size_t CFX_CSSStyleRule::CountSelectorLists() const {
14   return m_ppSelector.size();
15 }
16 
GetSelectorList(int32_t index) const17 CFX_CSSSelector* CFX_CSSStyleRule::GetSelectorList(int32_t index) const {
18   return m_ppSelector[index].get();
19 }
20 
GetDeclaration()21 CFX_CSSDeclaration* CFX_CSSStyleRule::GetDeclaration() {
22   return &m_Declaration;
23 }
24 
SetSelector(std::vector<std::unique_ptr<CFX_CSSSelector>> * list)25 void CFX_CSSStyleRule::SetSelector(
26     std::vector<std::unique_ptr<CFX_CSSSelector>>* list) {
27   ASSERT(m_ppSelector.empty());
28 
29   m_ppSelector.swap(*list);
30 }
31