| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fde/css/fde_cssstylesheet.h" | 7 #include "xfa/fde/css/fde_cssstylesheet.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ASSERT(FALSE); | 99 ASSERT(FALSE); |
| 100 break; | 100 break; |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 m_RuleArray.RemoveAll(); | 103 m_RuleArray.RemoveAll(); |
| 104 m_Selectors.RemoveAll(); | 104 m_Selectors.RemoveAll(); |
| 105 m_StringCache.clear(); | 105 m_StringCache.clear(); |
| 106 delete m_pAllocator; | 106 delete m_pAllocator; |
| 107 m_pAllocator = nullptr; | 107 m_pAllocator = nullptr; |
| 108 } | 108 } |
| 109 uint32_t CFDE_CSSStyleSheet::AddRef() { | 109 uint32_t CFDE_CSSStyleSheet::Retain() { |
| 110 return ++m_wRefCount; | 110 return ++m_wRefCount; |
| 111 } | 111 } |
| 112 uint32_t CFDE_CSSStyleSheet::Release() { | 112 uint32_t CFDE_CSSStyleSheet::Release() { |
| 113 uint32_t dwRefCount = --m_wRefCount; | 113 uint32_t dwRefCount = --m_wRefCount; |
| 114 if (dwRefCount == 0) { | 114 if (dwRefCount == 0) { |
| 115 delete this; | 115 delete this; |
| 116 } | 116 } |
| 117 return dwRefCount; | 117 return dwRefCount; |
| 118 } | 118 } |
| 119 int32_t CFDE_CSSStyleSheet::CountRules() const { | 119 int32_t CFDE_CSSStyleSheet::CountRules() const { |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 return NULL; | 494 return NULL; |
| 495 } | 495 } |
| 496 } | 496 } |
| 497 if (pPersudoFirst == NULL) { | 497 if (pPersudoFirst == NULL) { |
| 498 return pFirst; | 498 return pFirst; |
| 499 } else { | 499 } else { |
| 500 pPersudoLast->SetNext(pFirst); | 500 pPersudoLast->SetNext(pFirst); |
| 501 return pPersudoFirst; | 501 return pPersudoFirst; |
| 502 } | 502 } |
| 503 } | 503 } |
| OLD | NEW |