Dan Sinclair | 95bec80 | 2017-01-19 10:27:58 -0500 | [diff] [blame] | 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 | |
Dan Sinclair | 6414b27 | 2017-01-23 13:54:53 -0500 | [diff] [blame] | 9 | CFDE_CSSStyleRule::CFDE_CSSStyleRule() {} |
Dan Sinclair | 95bec80 | 2017-01-19 10:27:58 -0500 | [diff] [blame] | 10 | |
| 11 | CFDE_CSSStyleRule::~CFDE_CSSStyleRule() {} |
| 12 | |
| 13 | size_t CFDE_CSSStyleRule::CountSelectorLists() const { |
| 14 | return m_ppSelector.size(); |
| 15 | } |
| 16 | |
| 17 | CFDE_CSSSelector* CFDE_CSSStyleRule::GetSelectorList(int32_t index) const { |
| 18 | return m_ppSelector[index].get(); |
| 19 | } |
| 20 | |
| 21 | CFDE_CSSDeclaration* CFDE_CSSStyleRule::GetDeclaration() { |
| 22 | return &m_Declaration; |
| 23 | } |
| 24 | |
| 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 | } |